modernc.org/z@v1.7.4/lib/z_openbsd_arm64.go (about) 1 // Code generated by 'ccgo -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -o lib/z_openbsd_arm64.go -pkgname z -trace-translation-units /home/jnml/tmpdir/go-generate-382458099/cdb.json libz.a', DO NOT EDIT. 2 3 package z 4 5 import ( 6 "math" 7 "reflect" 8 "sync/atomic" 9 "unsafe" 10 11 "modernc.org/libc" 12 "modernc.org/libc/sys/types" 13 ) 14 15 var _ = math.Pi 16 var _ reflect.Kind 17 var _ atomic.Value 18 var _ unsafe.Pointer 19 var _ *libc.TLS 20 var _ types.Size_t 21 22 const ( 23 ARG_MAX = 524288 // syslimits.h:38:1: 24 BASE = 65521 // adler32.c:12:1: 25 BC_BASE_MAX = 2147483647 // syslimits.h:51:1: 26 BC_DIM_MAX = 65535 // syslimits.h:52:1: 27 BC_SCALE_MAX = 2147483647 // syslimits.h:53:1: 28 BC_STRING_MAX = 2147483647 // syslimits.h:54:1: 29 BIG_ENDIAN = 4321 // endian.h:45:1: 30 BYTE_ORDER = 1234 // endian.h:47:1: 31 CHAR_BIT = 8 // limits.h:36:1: 32 CHAR_MAX = 0xff // limits.h:44:1: 33 CHAR_MIN = 0 // limits.h:43:1: 34 CHILD_MAX = 80 // syslimits.h:39:1: 35 COLL_WEIGHTS_MAX = 2 // syslimits.h:55:1: 36 DEF_MEM_LEVEL = 8 // zutil.h:66:1: 37 DEF_WBITS = 15 // zutil.h:61:1: 38 DYN_TREES = 2 // zutil.h:74:1: 39 EXIT_FAILURE = 1 // stdlib.h:80:1: 40 EXIT_SUCCESS = 0 // stdlib.h:81:1: 41 EXPR_NEST_MAX = 32 // syslimits.h:56:1: 42 FAR = 0 // zconf.h:387:1: 43 F_LOCK = 1 // unistd.h:48:1: 44 F_OK = 0 // unistd.h:49:1: 45 F_TEST = 3 // unistd.h:50:1: 46 F_TLOCK = 2 // unistd.h:49:1: 47 F_ULOCK = 0 // unistd.h:47:1: 48 GID_MAX = 4294967295 // limits.h:84:1: 49 HAVE_HIDDEN = 1 // <defines>:1:1: 50 HAVE_MEMCPY = 0 // zutil.h:218:1: 51 HOST_NAME_MAX = 255 // syslimits.h:76:1: 52 INT_MAX = 0x7fffffff // limits.h:57:1: 53 INT_MIN = -2147483648 // limits.h:58:1: 54 IOV_MAX = 1024 // syslimits.h:64:1: 55 KBIND_BLOCK_MAX = 2 // unistd.h:77:1: 56 KBIND_DATA_MAX = 24 // unistd.h:78:1: 57 LINE_MAX = 2048 // syslimits.h:57:1: 58 LINK_MAX = 32767 // syslimits.h:40:1: 59 LITTLE_ENDIAN = 1234 // endian.h:44:1: 60 LLONG_MAX = 0x7fffffffffffffff // limits.h:76:1: 61 LLONG_MIN = -9223372036854775808 // limits.h:78:1: 62 LOGIN_NAME_MAX = 32 // syslimits.h:72:1: 63 LONG_BIT = 64 // limits.h:89:1: 64 LONG_MAX = 0x7fffffffffffffff // limits.h:63:1: 65 LONG_MIN = -9223372036854775808 // limits.h:65:1: 66 L_INCR = 1 // unistd.h:62:1: 67 L_SET = 0 // unistd.h:61:1: 68 L_XTND = 2 // unistd.h:63:1: 69 MAX_CANON = 255 // syslimits.h:41:1: 70 MAX_INPUT = 255 // syslimits.h:42:1: 71 MAX_MATCH = 258 // zutil.h:78:1: 72 MAX_MEM_LEVEL = 9 // zconf.h:260:1: 73 MAX_WBITS = 15 // zconf.h:270:1: 74 MB_LEN_MAX = 4 // limits.h:50:1: 75 MIN_MATCH = 3 // zutil.h:77:1: 76 NAME_MAX = 255 // syslimits.h:43:1: 77 NGROUPS_MAX = 16 // syslimits.h:44:1: 78 NL_ARGMAX = 9 // limits.h:89:1: 79 NL_LANGMAX = 14 // limits.h:90:1: 80 NL_MSGMAX = 32767 // limits.h:91:1: 81 NL_SETMAX = 255 // limits.h:92:1: 82 NL_TEXTMAX = 255 // limits.h:93:1: 83 NMAX = 5552 // adler32.c:13:1: 84 NZERO = 20 // syslimits.h:65:1: 85 OPEN_MAX = 64 // syslimits.h:45:1: 86 OS_CODE = 3 // zutil.h:198:1: 87 PATH_MAX = 1024 // syslimits.h:46:1: 88 PDP_ENDIAN = 3412 // endian.h:46:1: 89 PIPE_BUF = 512 // syslimits.h:47:1: 90 PRESET_DICT = 0x20 // zutil.h:81:1: 91 QUAD_MAX = 0x7fffffffffffffff // limits.h:51:1: 92 QUAD_MIN = -9223372036854775808 // limits.h:52:1: 93 RAND_MAX = 0x7fffffff // stdlib.h:83:1: 94 RE_DUP_MAX = 255 // syslimits.h:59:1: 95 R_OK = 0x04 // unistd.h:52:1: 96 SCHAR_MAX = 0x7f // limits.h:38:1: 97 SCHAR_MIN = -128 // limits.h:39:1: 98 SEEK_CUR = 1 // unistd.h:56:1: 99 SEEK_END = 2 // unistd.h:57:1: 100 SEEK_SET = 0 // unistd.h:55:1: 101 SEM_VALUE_MAX = 4294967295 // syslimits.h:60:1: 102 SHRT_MAX = 0x7fff // limits.h:53:1: 103 SHRT_MIN = -32768 // limits.h:54:1: 104 SIZE_MAX = 18446744073709551615 // limits.h:42:1: 105 SIZE_T_MAX = 18446744073709551615 // limits.h:48:1: 106 SSIZE_MAX = 9223372036854775807 // limits.h:44:1: 107 STATIC_TREES = 1 // zutil.h:73:1: 108 STDC = 0 // zconf.h:203:1: 109 STDC99 = 0 // zconf.h:207:1: 110 STDERR_FILENO = 2 // unistd.h:44:1: 111 STDIN_FILENO = 0 // unistd.h:42:1: 112 STDOUT_FILENO = 1 // unistd.h:43:1: 113 STORED_BLOCK = 0 // zutil.h:72:1: 114 SYMLINK_MAX = 1024 // syslimits.h:48:1: 115 SYMLOOP_MAX = 32 // syslimits.h:49:1: 116 TTY_NAME_MAX = 260 // syslimits.h:71:1: 117 UCHAR_MAX = 0xff // limits.h:41:1: 118 UID_MAX = 4294967295 // limits.h:83:1: 119 UINT_MAX = 0xffffffff // limits.h:56:1: 120 ULLONG_MAX = 0xffffffffffffffff // limits.h:74:1: 121 ULONG_MAX = 0xffffffffffffffff // limits.h:61:1: 122 UQUAD_MAX = 0xffffffffffffffff // limits.h:50:1: 123 USHRT_MAX = 0xffff // limits.h:52:1: 124 WORD_BIT = 32 // limits.h:93:1: 125 W_OK = 0x02 // unistd.h:51:1: 126 X_OK = 0x01 // unistd.h:50:1: 127 ZCONF_H = 0 // zconf.h:9:1: 128 ZEXPORT = 0 // zconf.h:380:1: 129 ZEXPORTVA = 0 // zconf.h:383:1: 130 ZLIB_H = 0 // zlib.h:32:1: 131 ZLIB_VERNUM = 0x12b0 // zlib.h:41:1: 132 ZLIB_VERSION = "1.2.11" // zlib.h:40:1: 133 ZLIB_VER_MAJOR = 1 // zlib.h:42:1: 134 ZLIB_VER_MINOR = 2 // zlib.h:43:1: 135 ZLIB_VER_REVISION = 11 // zlib.h:44:1: 136 ZLIB_VER_SUBREVISION = 0 // zlib.h:45:1: 137 ZUTIL_H = 0 // zutil.h:14:1: 138 Z_ASCII = 1 // zlib.h:205:1: 139 Z_BEST_COMPRESSION = 9 // zlib.h:192:1: 140 Z_BEST_SPEED = 1 // zlib.h:191:1: 141 Z_BINARY = 0 // zlib.h:203:1: 142 Z_BLOCK = 5 // zlib.h:173:1: 143 Z_BUF_ERROR = -5 // zlib.h:184:1: 144 Z_DATA_ERROR = -3 // zlib.h:182:1: 145 Z_DEFAULT_COMPRESSION = -1 // zlib.h:193:1: 146 Z_DEFAULT_STRATEGY = 0 // zlib.h:200:1: 147 Z_DEFLATED = 8 // zlib.h:209:1: 148 Z_ERRNO = -1 // zlib.h:180:1: 149 Z_FILTERED = 1 // zlib.h:196:1: 150 Z_FINISH = 4 // zlib.h:172:1: 151 Z_FIXED = 4 // zlib.h:199:1: 152 Z_FULL_FLUSH = 3 // zlib.h:171:1: 153 Z_HAVE_STDARG_H = 0 // zconf.h:439:1: 154 Z_HAVE_UNISTD_H = 0 // zconf.h:435:1: 155 Z_HUFFMAN_ONLY = 2 // zlib.h:197:1: 156 Z_MEM_ERROR = -4 // zlib.h:183:1: 157 Z_NEED_DICT = 2 // zlib.h:179:1: 158 Z_NO_COMPRESSION = 0 // zlib.h:190:1: 159 Z_NO_FLUSH = 0 // zlib.h:168:1: 160 Z_NULL = 0 // zlib.h:212:1: 161 Z_OK = 0 // zlib.h:177:1: 162 Z_PARTIAL_FLUSH = 1 // zlib.h:169:1: 163 Z_RLE = 3 // zlib.h:198:1: 164 Z_STREAM_END = 1 // zlib.h:178:1: 165 Z_STREAM_ERROR = -2 // zlib.h:181:1: 166 Z_SYNC_FLUSH = 2 // zlib.h:170:1: 167 Z_TEXT = 1 // zlib.h:204:1: 168 Z_TREES = 6 // zlib.h:174:1: 169 Z_UNKNOWN = 2 // zlib.h:206:1: 170 Z_VERSION_ERROR = -6 // zlib.h:185:1: 171 X_BIG_ENDIAN = 4321 // _endian.h:43:1: 172 X_BYTE_ORDER = 1234 // endian.h:60:1: 173 X_CLOCKID_T_DEFINED_ = 0 // types.h:162:1: 174 X_CLOCK_T_DEFINED_ = 0 // types.h:157:1: 175 X_CS_PATH = 1 // unistd.h:286:1: 176 X_CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 // unistd.h:287:1: 177 X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 // unistd.h:288:1: 178 X_CS_POSIX_V6_ILP32_OFF32_LIBS = 4 // unistd.h:289:1: 179 X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 // unistd.h:290:1: 180 X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 // unistd.h:291:1: 181 X_CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 // unistd.h:292:1: 182 X_CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 // unistd.h:293:1: 183 X_CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 // unistd.h:294:1: 184 X_CS_POSIX_V6_LP64_OFF64_LIBS = 10 // unistd.h:295:1: 185 X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 // unistd.h:296:1: 186 X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 // unistd.h:297:1: 187 X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 // unistd.h:298:1: 188 X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 // unistd.h:299:1: 189 X_CS_POSIX_V7_ILP32_OFF32_CFLAGS = 16 // unistd.h:301:1: 190 X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 17 // unistd.h:302:1: 191 X_CS_POSIX_V7_ILP32_OFF32_LIBS = 18 // unistd.h:303:1: 192 X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 19 // unistd.h:304:1: 193 X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 20 // unistd.h:305:1: 194 X_CS_POSIX_V7_ILP32_OFFBIG_LIBS = 21 // unistd.h:306:1: 195 X_CS_POSIX_V7_LP64_OFF64_CFLAGS = 22 // unistd.h:307:1: 196 X_CS_POSIX_V7_LP64_OFF64_LDFLAGS = 23 // unistd.h:308:1: 197 X_CS_POSIX_V7_LP64_OFF64_LIBS = 24 // unistd.h:309:1: 198 X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 25 // unistd.h:310:1: 199 X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 26 // unistd.h:311:1: 200 X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 27 // unistd.h:312:1: 201 X_CS_POSIX_V7_THREADS_CFLAGS = 28 // unistd.h:313:1: 202 X_CS_POSIX_V7_THREADS_LDFLAGS = 29 // unistd.h:314:1: 203 X_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS = 30 // unistd.h:315:1: 204 X_CS_V6_ENV = 15 // unistd.h:300:1: 205 X_CS_V7_ENV = 31 // unistd.h:316:1: 206 X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: 207 X_GETOPT_DEFINED_ = 0 // unistd.h:385:1: 208 X_INT16_T_DEFINED_ = 0 // types.h:84:1: 209 X_INT32_T_DEFINED_ = 0 // types.h:94:1: 210 X_INT64_T_DEFINED_ = 0 // types.h:104:1: 211 X_INT8_T_DEFINED_ = 0 // types.h:74:1: 212 X_INTPTR_T_DEFINED_ = 0 // unistd.h:319:1: 213 X_LIMITS_H_ = 0 // limits.h:36:1: 214 X_LITTLE_ENDIAN = 1234 // _endian.h:42:1: 215 X_LOCALE_T_DEFINED_ = 0 // strings.h:52:1: 216 X_LP64 = 1 // <predefined>:1:1: 217 X_MACHINE_CDEFS_H_ = 0 // cdefs.h:4:1: 218 X_MACHINE_ENDIAN_H_ = 0 // endian.h:20:1: 219 X_MACHINE_LIMITS_H_ = 0 // limits.h:36:1: 220 X_MACHINE__TYPES_H_ = 0 // _types.h:35:1: 221 X_MAXCOMLEN = 24 // syslimits.h:79:1: 222 X_MAX_PAGE_SHIFT = 12 // _types.h:57:1: 223 X_MBSTATE_T_DEFINED_ = 0 // stddef.h:64:1: 224 X_OFF_T_DEFINED_ = 0 // types.h:192:1: 225 X_PC_2_SYMLINKS = 10 // unistd.h:93:1: 226 X_PC_ALLOC_SIZE_MIN = 11 // unistd.h:94:1: 227 X_PC_ASYNC_IO = 12 // unistd.h:95:1: 228 X_PC_CHOWN_RESTRICTED = 7 // unistd.h:90:1: 229 X_PC_FILESIZEBITS = 13 // unistd.h:96:1: 230 X_PC_LINK_MAX = 1 // unistd.h:84:1: 231 X_PC_MAX_CANON = 2 // unistd.h:85:1: 232 X_PC_MAX_INPUT = 3 // unistd.h:86:1: 233 X_PC_NAME_MAX = 4 // unistd.h:87:1: 234 X_PC_NO_TRUNC = 8 // unistd.h:91:1: 235 X_PC_PATH_MAX = 5 // unistd.h:88:1: 236 X_PC_PIPE_BUF = 6 // unistd.h:89:1: 237 X_PC_PRIO_IO = 14 // unistd.h:97:1: 238 X_PC_REC_INCR_XFER_SIZE = 15 // unistd.h:98:1: 239 X_PC_REC_MAX_XFER_SIZE = 16 // unistd.h:99:1: 240 X_PC_REC_MIN_XFER_SIZE = 17 // unistd.h:100:1: 241 X_PC_REC_XFER_ALIGN = 18 // unistd.h:101:1: 242 X_PC_SYMLINK_MAX = 19 // unistd.h:102:1: 243 X_PC_SYNC_IO = 20 // unistd.h:103:1: 244 X_PC_TIMESTAMP_RESOLUTION = 21 // unistd.h:104:1: 245 X_PC_VDISABLE = 9 // unistd.h:92:1: 246 X_PDP_ENDIAN = 3412 // _endian.h:44:1: 247 X_PID_T_DEFINED_ = 0 // types.h:167:1: 248 X_POSIX2_BC_BASE_MAX = 99 // limits.h:71:1: 249 X_POSIX2_BC_DIM_MAX = 2048 // limits.h:72:1: 250 X_POSIX2_BC_SCALE_MAX = 99 // limits.h:73:1: 251 X_POSIX2_BC_STRING_MAX = 1000 // limits.h:74:1: 252 X_POSIX2_CHARCLASS_NAME_MAX = 14 // limits.h:79:1: 253 X_POSIX2_CHAR_TERM = 1 // unistd.h:116:1: 254 X_POSIX2_COLL_WEIGHTS_MAX = 2 // limits.h:75:1: 255 X_POSIX2_C_BIND = 200112 // unistd.h:114:1: 256 X_POSIX2_C_DEV = -1 // unistd.h:115:1: 257 X_POSIX2_EXPR_NEST_MAX = 32 // limits.h:76:1: 258 X_POSIX2_FORT_DEV = -1 // unistd.h:117:1: 259 X_POSIX2_FORT_RUN = -1 // unistd.h:118:1: 260 X_POSIX2_LINE_MAX = 2048 // limits.h:77:1: 261 X_POSIX2_LOCALEDEF = -1 // unistd.h:119:1: 262 X_POSIX2_PBS = -1 // unistd.h:120:1: 263 X_POSIX2_PBS_ACCOUNTING = -1 // unistd.h:121:1: 264 X_POSIX2_PBS_CHECKPOINT = -1 // unistd.h:122:1: 265 X_POSIX2_PBS_LOCATE = -1 // unistd.h:123:1: 266 X_POSIX2_PBS_MESSAGE = -1 // unistd.h:124:1: 267 X_POSIX2_PBS_TRACK = -1 // unistd.h:125:1: 268 X_POSIX2_RE_DUP_MAX = 255 // limits.h:78:1: 269 X_POSIX2_SW_DEV = 200112 // unistd.h:126:1: 270 X_POSIX2_UPE = 200112 // unistd.h:127:1: 271 X_POSIX2_VERSION = 200809 // unistd.h:148:1: 272 X_POSIX_ADVISORY_INFO = -1 // unistd.h:65:1: 273 X_POSIX_ARG_MAX = 4096 // limits.h:41:1: 274 X_POSIX_ASYNCHRONOUS_IO = -1 // unistd.h:66:1: 275 X_POSIX_ASYNC_IO = -1 // unistd.h:41:1: 276 X_POSIX_BARRIERS = 200112 // unistd.h:67:1: 277 X_POSIX_CHILD_MAX = 25 // limits.h:42:1: 278 X_POSIX_CHOWN_RESTRICTED = 1 // unistd.h:68:1: 279 X_POSIX_CLOCKRES_MIN = 20000000 // limits.h:61:1: 280 X_POSIX_CLOCK_SELECTION = -1 // unistd.h:69:1: 281 X_POSIX_CPUTIME = 200809 // unistd.h:70:1: 282 X_POSIX_FSYNC = 200112 // unistd.h:71:1: 283 X_POSIX_HOST_NAME_MAX = 255 // limits.h:82:1: 284 X_POSIX_IPV6 = 0 // unistd.h:72:1: 285 X_POSIX_JOB_CONTROL = 1 // unistd.h:73:1: 286 X_POSIX_LINK_MAX = 8 // limits.h:43:1: 287 X_POSIX_LOGIN_NAME_MAX = 9 // limits.h:83:1: 288 X_POSIX_MAPPED_FILES = 200112 // unistd.h:74:1: 289 X_POSIX_MAX_CANON = 255 // limits.h:44:1: 290 X_POSIX_MAX_INPUT = 255 // limits.h:45:1: 291 X_POSIX_MEMLOCK = 200112 // unistd.h:75:1: 292 X_POSIX_MEMLOCK_RANGE = 200112 // unistd.h:76:1: 293 X_POSIX_MEMORY_PROTECTION = 200112 // unistd.h:77:1: 294 X_POSIX_MESSAGE_PASSING = -1 // unistd.h:78:1: 295 X_POSIX_MONOTONIC_CLOCK = 200112 // unistd.h:79:1: 296 X_POSIX_NAME_MAX = 14 // limits.h:46:1: 297 X_POSIX_NGROUPS_MAX = 8 // limits.h:62:1: 298 X_POSIX_NO_TRUNC = 1 // unistd.h:80:1: 299 X_POSIX_OPEN_MAX = 20 // limits.h:63:1: 300 X_POSIX_PATH_MAX = 256 // limits.h:47:1: 301 X_POSIX_PIPE_BUF = 512 // limits.h:48:1: 302 X_POSIX_PRIORITIZED_IO = -1 // unistd.h:81:1: 303 X_POSIX_PRIORITY_SCHEDULING = -1 // unistd.h:82:1: 304 X_POSIX_PRIO_IO = -1 // unistd.h:42:1: 305 X_POSIX_RAW_SOCKETS = 200112 // unistd.h:83:1: 306 X_POSIX_READER_WRITER_LOCKS = 200112 // unistd.h:84:1: 307 X_POSIX_REALTIME_SIGNALS = -1 // unistd.h:85:1: 308 X_POSIX_REGEXP = 1 // unistd.h:86:1: 309 X_POSIX_RE_DUP_MAX = 255 // limits.h:49:1: 310 X_POSIX_SAVED_IDS = 1 // unistd.h:87:1: 311 X_POSIX_SEMAPHORES = 200112 // unistd.h:88:1: 312 X_POSIX_SEM_NSEMS_MAX = 256 // limits.h:50:1: 313 X_POSIX_SEM_VALUE_MAX = 32767 // limits.h:51:1: 314 X_POSIX_SHARED_MEMORY_OBJECTS = 200809 // unistd.h:89:1: 315 X_POSIX_SHELL = 1 // unistd.h:90:1: 316 X_POSIX_SPAWN = 200112 // unistd.h:91:1: 317 X_POSIX_SPIN_LOCKS = 200112 // unistd.h:92:1: 318 X_POSIX_SPORADIC_SERVER = -1 // unistd.h:93:1: 319 X_POSIX_SSIZE_MAX = 32767 // limits.h:52:1: 320 X_POSIX_STREAM_MAX = 8 // limits.h:53:1: 321 X_POSIX_SYMLINK_MAX = 255 // limits.h:54:1: 322 X_POSIX_SYMLOOP_MAX = 8 // limits.h:55:1: 323 X_POSIX_SYNCHRONIZED_IO = -1 // unistd.h:94:1: 324 X_POSIX_SYNC_IO = -1 // unistd.h:43:1: 325 X_POSIX_THREADS = 200112 // unistd.h:106:1: 326 X_POSIX_THREAD_ATTR_STACKADDR = 200112 // unistd.h:95:1: 327 X_POSIX_THREAD_ATTR_STACKSIZE = 200112 // unistd.h:96:1: 328 X_POSIX_THREAD_CPUTIME = 200809 // unistd.h:97:1: 329 X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4 // limits.h:56:1: 330 X_POSIX_THREAD_KEYS_MAX = 128 // limits.h:57:1: 331 X_POSIX_THREAD_PRIORITY_SCHEDULING = -1 // unistd.h:100:1: 332 X_POSIX_THREAD_PRIO_INHERIT = -1 // unistd.h:98:1: 333 X_POSIX_THREAD_PRIO_PROTECT = -1 // unistd.h:99:1: 334 X_POSIX_THREAD_PROCESS_SHARED = -1 // unistd.h:101:1: 335 X_POSIX_THREAD_ROBUST_PRIO_INHERIT = -1 // unistd.h:102:1: 336 X_POSIX_THREAD_ROBUST_PRIO_PROTECT = -1 // unistd.h:103:1: 337 X_POSIX_THREAD_SAFE_FUNCTIONS = 200112 // unistd.h:104:1: 338 X_POSIX_THREAD_SPORADIC_SERVER = -1 // unistd.h:105:1: 339 X_POSIX_THREAD_THREADS_MAX = 4 // limits.h:58:1: 340 X_POSIX_TIMEOUTS = 200112 // unistd.h:107:1: 341 X_POSIX_TIMERS = -1 // unistd.h:108:1: 342 X_POSIX_TRACE = -1 // unistd.h:109:1: 343 X_POSIX_TRACE_EVENT_FILTER = -1 // unistd.h:110:1: 344 X_POSIX_TRACE_INHERIT = -1 // unistd.h:111:1: 345 X_POSIX_TRACE_LOG = -1 // unistd.h:112:1: 346 X_POSIX_TTY_NAME_MAX = 9 // limits.h:84:1: 347 X_POSIX_TYPED_MEMORY_OBJECTS = -1 // unistd.h:113:1: 348 X_POSIX_TZNAME_MAX = 6 // limits.h:64:1: 349 X_POSIX_V6_ILP32_OFF32 = -1 // unistd.h:128:1: 350 X_POSIX_V6_ILP32_OFFBIG = 0 // unistd.h:129:1: 351 X_POSIX_V6_LP64_OFF64 = 0 // unistd.h:130:1: 352 X_POSIX_V6_LPBIG_OFFBIG = 0 // unistd.h:131:1: 353 X_POSIX_V7_ILP32_OFF32 = -1 // unistd.h:132:1: 354 X_POSIX_V7_ILP32_OFFBIG = 0 // unistd.h:133:1: 355 X_POSIX_V7_LP64_OFF64 = 0 // unistd.h:134:1: 356 X_POSIX_V7_LPBIG_OFFBIG = 0 // unistd.h:135:1: 357 X_POSIX_VDISABLE = 255 // unistd.h:40:1: 358 X_POSIX_VERSION = 200809 // unistd.h:46:1: 359 X_PTRDIFF_T_DEFINED_ = 0 // stddef.h:43:1: 360 X_QUAD_HIGHWORD = 1 // _endian.h:95:1: 361 X_QUAD_LOWWORD = 0 // _endian.h:96:1: 362 X_RET_PROTECTOR = 1 // <predefined>:2:1: 363 X_SC_2_CHAR_TERM = 20 // unistd.h:172:1: 364 X_SC_2_C_BIND = 18 // unistd.h:170:1: 365 X_SC_2_C_DEV = 19 // unistd.h:171:1: 366 X_SC_2_FORT_DEV = 21 // unistd.h:173:1: 367 X_SC_2_FORT_RUN = 22 // unistd.h:174:1: 368 X_SC_2_LOCALEDEF = 23 // unistd.h:175:1: 369 X_SC_2_PBS = 35 // unistd.h:188:1: 370 X_SC_2_PBS_ACCOUNTING = 36 // unistd.h:189:1: 371 X_SC_2_PBS_CHECKPOINT = 37 // unistd.h:190:1: 372 X_SC_2_PBS_LOCATE = 38 // unistd.h:191:1: 373 X_SC_2_PBS_MESSAGE = 39 // unistd.h:192:1: 374 X_SC_2_PBS_TRACK = 40 // unistd.h:193:1: 375 X_SC_2_SW_DEV = 24 // unistd.h:176:1: 376 X_SC_2_UPE = 25 // unistd.h:177:1: 377 X_SC_2_VERSION = 17 // unistd.h:169:1: 378 X_SC_ADVISORY_INFO = 41 // unistd.h:194:1: 379 X_SC_AIO_LISTIO_MAX = 42 // unistd.h:195:1: 380 X_SC_AIO_MAX = 43 // unistd.h:196:1: 381 X_SC_AIO_PRIO_DELTA_MAX = 44 // unistd.h:197:1: 382 X_SC_ARG_MAX = 1 // unistd.h:153:1: 383 X_SC_ASYNCHRONOUS_IO = 45 // unistd.h:198:1: 384 X_SC_ATEXIT_MAX = 46 // unistd.h:199:1: 385 X_SC_AVPHYS_PAGES = 501 // unistd.h:281:1: 386 X_SC_BARRIERS = 47 // unistd.h:200:1: 387 X_SC_BC_BASE_MAX = 9 // unistd.h:161:1: 388 X_SC_BC_DIM_MAX = 10 // unistd.h:162:1: 389 X_SC_BC_SCALE_MAX = 11 // unistd.h:163:1: 390 X_SC_BC_STRING_MAX = 12 // unistd.h:164:1: 391 X_SC_CHILD_MAX = 2 // unistd.h:154:1: 392 X_SC_CLK_TCK = 3 // unistd.h:155:1: 393 X_SC_CLOCK_SELECTION = 48 // unistd.h:201:1: 394 X_SC_COLL_WEIGHTS_MAX = 13 // unistd.h:165:1: 395 X_SC_CPUTIME = 49 // unistd.h:202:1: 396 X_SC_DELAYTIMER_MAX = 50 // unistd.h:203:1: 397 X_SC_EXPR_NEST_MAX = 14 // unistd.h:166:1: 398 X_SC_FSYNC = 29 // unistd.h:182:1: 399 X_SC_GETGR_R_SIZE_MAX = 100 // unistd.h:253:1: 400 X_SC_GETPW_R_SIZE_MAX = 101 // unistd.h:254:1: 401 X_SC_HOST_NAME_MAX = 33 // unistd.h:186:1: 402 X_SC_IOV_MAX = 51 // unistd.h:204:1: 403 X_SC_IPV6 = 52 // unistd.h:205:1: 404 X_SC_JOB_CONTROL = 6 // unistd.h:158:1: 405 X_SC_LINE_MAX = 15 // unistd.h:167:1: 406 X_SC_LOGIN_NAME_MAX = 102 // unistd.h:255:1: 407 X_SC_MAPPED_FILES = 53 // unistd.h:206:1: 408 X_SC_MEMLOCK = 54 // unistd.h:207:1: 409 X_SC_MEMLOCK_RANGE = 55 // unistd.h:208:1: 410 X_SC_MEMORY_PROTECTION = 56 // unistd.h:209:1: 411 X_SC_MESSAGE_PASSING = 57 // unistd.h:210:1: 412 X_SC_MONOTONIC_CLOCK = 34 // unistd.h:187:1: 413 X_SC_MQ_OPEN_MAX = 58 // unistd.h:211:1: 414 X_SC_MQ_PRIO_MAX = 59 // unistd.h:212:1: 415 X_SC_NGROUPS_MAX = 4 // unistd.h:156:1: 416 X_SC_NPROCESSORS_CONF = 502 // unistd.h:282:1: 417 X_SC_NPROCESSORS_ONLN = 503 // unistd.h:283:1: 418 X_SC_OPEN_MAX = 5 // unistd.h:157:1: 419 X_SC_PAGESIZE = 28 // unistd.h:180:1: 420 X_SC_PAGE_SIZE = 28 // unistd.h:181:1: 421 X_SC_PHYS_PAGES = 500 // unistd.h:280:1: 422 X_SC_PRIORITIZED_IO = 60 // unistd.h:213:1: 423 X_SC_PRIORITY_SCHEDULING = 61 // unistd.h:214:1: 424 X_SC_RAW_SOCKETS = 62 // unistd.h:215:1: 425 X_SC_READER_WRITER_LOCKS = 63 // unistd.h:216:1: 426 X_SC_REALTIME_SIGNALS = 64 // unistd.h:217:1: 427 X_SC_REGEXP = 65 // unistd.h:218:1: 428 X_SC_RE_DUP_MAX = 16 // unistd.h:168:1: 429 X_SC_RTSIG_MAX = 66 // unistd.h:219:1: 430 X_SC_SAVED_IDS = 7 // unistd.h:159:1: 431 X_SC_SEMAPHORES = 67 // unistd.h:220:1: 432 X_SC_SEM_NSEMS_MAX = 31 // unistd.h:184:1: 433 X_SC_SEM_VALUE_MAX = 32 // unistd.h:185:1: 434 X_SC_SHARED_MEMORY_OBJECTS = 68 // unistd.h:221:1: 435 X_SC_SHELL = 69 // unistd.h:222:1: 436 X_SC_SIGQUEUE_MAX = 70 // unistd.h:223:1: 437 X_SC_SPAWN = 71 // unistd.h:224:1: 438 X_SC_SPIN_LOCKS = 72 // unistd.h:225:1: 439 X_SC_SPORADIC_SERVER = 73 // unistd.h:226:1: 440 X_SC_SS_REPL_MAX = 74 // unistd.h:227:1: 441 X_SC_STREAM_MAX = 26 // unistd.h:178:1: 442 X_SC_SYMLOOP_MAX = 76 // unistd.h:229:1: 443 X_SC_SYNCHRONIZED_IO = 75 // unistd.h:228:1: 444 X_SC_THREADS = 91 // unistd.h:244:1: 445 X_SC_THREAD_ATTR_STACKADDR = 77 // unistd.h:230:1: 446 X_SC_THREAD_ATTR_STACKSIZE = 78 // unistd.h:231:1: 447 X_SC_THREAD_CPUTIME = 79 // unistd.h:232:1: 448 X_SC_THREAD_DESTRUCTOR_ITERATIONS = 80 // unistd.h:233:1: 449 X_SC_THREAD_KEYS_MAX = 81 // unistd.h:234:1: 450 X_SC_THREAD_PRIORITY_SCHEDULING = 84 // unistd.h:237:1: 451 X_SC_THREAD_PRIO_INHERIT = 82 // unistd.h:235:1: 452 X_SC_THREAD_PRIO_PROTECT = 83 // unistd.h:236:1: 453 X_SC_THREAD_PROCESS_SHARED = 85 // unistd.h:238:1: 454 X_SC_THREAD_ROBUST_PRIO_INHERIT = 86 // unistd.h:239:1: 455 X_SC_THREAD_ROBUST_PRIO_PROTECT = 87 // unistd.h:240:1: 456 X_SC_THREAD_SAFE_FUNCTIONS = 103 // unistd.h:256:1: 457 X_SC_THREAD_SPORADIC_SERVER = 88 // unistd.h:241:1: 458 X_SC_THREAD_STACK_MIN = 89 // unistd.h:242:1: 459 X_SC_THREAD_THREADS_MAX = 90 // unistd.h:243:1: 460 X_SC_TIMEOUTS = 92 // unistd.h:245:1: 461 X_SC_TIMERS = 94 // unistd.h:247:1: 462 X_SC_TIMER_MAX = 93 // unistd.h:246:1: 463 X_SC_TRACE = 95 // unistd.h:248:1: 464 X_SC_TRACE_EVENT_FILTER = 96 // unistd.h:249:1: 465 X_SC_TRACE_EVENT_NAME_MAX = 97 // unistd.h:250:1: 466 X_SC_TRACE_INHERIT = 98 // unistd.h:251:1: 467 X_SC_TRACE_LOG = 99 // unistd.h:252:1: 468 X_SC_TRACE_NAME_MAX = 104 // unistd.h:257:1: 469 X_SC_TRACE_SYS_MAX = 105 // unistd.h:258:1: 470 X_SC_TRACE_USER_EVENT_MAX = 106 // unistd.h:259:1: 471 X_SC_TTY_NAME_MAX = 107 // unistd.h:260:1: 472 X_SC_TYPED_MEMORY_OBJECTS = 108 // unistd.h:261:1: 473 X_SC_TZNAME_MAX = 27 // unistd.h:179:1: 474 X_SC_V6_ILP32_OFF32 = 109 // unistd.h:262:1: 475 X_SC_V6_ILP32_OFFBIG = 110 // unistd.h:263:1: 476 X_SC_V6_LP64_OFF64 = 111 // unistd.h:264:1: 477 X_SC_V6_LPBIG_OFFBIG = 112 // unistd.h:265:1: 478 X_SC_V7_ILP32_OFF32 = 113 // unistd.h:266:1: 479 X_SC_V7_ILP32_OFFBIG = 114 // unistd.h:267:1: 480 X_SC_V7_LP64_OFF64 = 115 // unistd.h:268:1: 481 X_SC_V7_LPBIG_OFFBIG = 116 // unistd.h:269:1: 482 X_SC_VERSION = 8 // unistd.h:160:1: 483 X_SC_XOPEN_CRYPT = 117 // unistd.h:270:1: 484 X_SC_XOPEN_ENH_I18N = 118 // unistd.h:271:1: 485 X_SC_XOPEN_LEGACY = 119 // unistd.h:272:1: 486 X_SC_XOPEN_REALTIME = 120 // unistd.h:273:1: 487 X_SC_XOPEN_REALTIME_THREADS = 121 // unistd.h:274:1: 488 X_SC_XOPEN_SHM = 30 // unistd.h:183:1: 489 X_SC_XOPEN_STREAMS = 122 // unistd.h:275:1: 490 X_SC_XOPEN_UNIX = 123 // unistd.h:276:1: 491 X_SC_XOPEN_UUCP = 124 // unistd.h:277:1: 492 X_SC_XOPEN_VERSION = 125 // unistd.h:278:1: 493 X_SIZE_T_DEFINED_ = 0 // stddef.h:48:1: 494 X_SSIZE_T_DEFINED_ = 0 // types.h:177:1: 495 X_STACKALIGNBYTES = 15 // _types.h:54:1: 496 X_STDARG_H_ = 0 // stdarg.h:19:1: 497 X_STDDEF_H_ = 0 // stddef.h:36:1: 498 X_STDLIB_H_ = 0 // stdlib.h:36:1: 499 X_STRINGS_H_ = 0 // strings.h:35:1: 500 X_STRING_H_ = 0 // string.h:36:1: 501 X_SYS_CDEFS_H_ = 0 // cdefs.h:39:1: 502 X_SYS_ENDIAN_H_ = 0 // endian.h:38:1: 503 X_SYS_LIMITS_H_ = 0 // limits.h:27:1: 504 X_SYS_TYPES_H_ = 0 // types.h:41:1: 505 X_SYS_UNISTD_H_ = 0 // unistd.h:36:1: 506 X_SYS__ENDIAN_H_ = 0 // _endian.h:34:1: 507 X_SYS__TYPES_H_ = 0 // _types.h:35:1: 508 X_TIMER_T_DEFINED_ = 0 // types.h:187:1: 509 X_TIME_T_DEFINED_ = 0 // types.h:182:1: 510 X_UINT16_T_DEFINED_ = 0 // types.h:89:1: 511 X_UINT32_T_DEFINED_ = 0 // types.h:99:1: 512 X_UINT64_T_DEFINED_ = 0 // types.h:109:1: 513 X_UINT8_T_DEFINED_ = 0 // types.h:79:1: 514 X_UNISTD_H_ = 0 // unistd.h:36:1: 515 X_WCHAR_T_DEFINED_ = 0 // stddef.h:54:1: 516 X_WINT_T_DEFINED_ = 0 // stddef.h:59:1: 517 X_XOPEN_CRYPT = 1 // unistd.h:137:1: 518 X_XOPEN_ENH_I18N = -1 // unistd.h:138:1: 519 X_XOPEN_IOV_MAX = 16 // limits.h:106:1: 520 X_XOPEN_LEGACY = -1 // unistd.h:139:1: 521 X_XOPEN_NAME_MAX = 255 // limits.h:107:1: 522 X_XOPEN_PATH_MAX = 1024 // limits.h:108:1: 523 X_XOPEN_REALTIME = -1 // unistd.h:140:1: 524 X_XOPEN_REALTIME_THREADS = -1 // unistd.h:141:1: 525 X_XOPEN_SHM = 1 // unistd.h:142:1: 526 X_XOPEN_STREAMS = -1 // unistd.h:143:1: 527 X_XOPEN_UNIX = -1 // unistd.h:145:1: 528 X_XOPEN_UUCP = -1 // unistd.h:144:1: 529 Unix = 1 // <predefined>:360:1: 530 Z_const = 0 // zconf.h:237:1: 531 BYFOUR = 0 // crc32.c:35:1: 532 GF2_DIM = 32 // crc32.c:341:1: 533 TBLS = 8 // crc32.c:42:1: 534 BL_CODES = 19 // deflate.h:42:1: 535 BUSY_STATE = 113 // deflate.h:62:1: 536 Buf_size = 16 // deflate.h:51:1: 537 COMMENT_STATE = 91 // deflate.h:60:1: 538 DEFLATE_H = 0 // deflate.h:14:1: 539 D_CODES = 30 // deflate.h:39:1: 540 EXTRA_STATE = 69 // deflate.h:58:1: 541 FINISH_STATE = 666 // deflate.h:63:1: 542 GZIP = 0 // deflate.h:23:1: 543 GZIP_STATE = 57 // deflate.h:56:1: 544 HCRC_STATE = 103 // deflate.h:61:1: 545 HEAP_SIZE = 573 // deflate.h:45:1: 546 INIT_STATE = 42 // deflate.h:54:1: 547 LENGTH_CODES = 29 // deflate.h:30:1: 548 LITERALS = 256 // deflate.h:33:1: 549 L_CODES = 286 // deflate.h:36:1: 550 MAX_BITS = 15 // deflate.h:48:1: 551 MAX_STORED = 65535 // deflate.c:1623:1: 552 MIN_LOOKAHEAD = 262 // deflate.h:284:1: 553 NAME_STATE = 73 // deflate.h:59:1: 554 NIL = 0 // deflate.c:107:1: 555 TOO_FAR = 4096 // deflate.c:111:1: 556 WIN_INIT = 258 // deflate.h:294:1: 557 AT_EACCESS = 0x01 // fcntl.h:200:1: 558 AT_FDCWD = -100 // fcntl.h:198:1: 559 AT_REMOVEDIR = 0x08 // fcntl.h:203:1: 560 AT_SYMLINK_FOLLOW = 0x04 // fcntl.h:202:1: 561 AT_SYMLINK_NOFOLLOW = 0x02 // fcntl.h:201:1: 562 BUFSIZ = 1024 // stdio.h:168:1: 563 COPY1 = 1 // gzguts.h:166:1: 564 E2BIG = 7 // errno.h:48:1: 565 EACCES = 13 // errno.h:55:1: 566 EADDRINUSE = 48 // errno.h:103:1: 567 EADDRNOTAVAIL = 49 // errno.h:104:1: 568 EAFNOSUPPORT = 47 // errno.h:102:1: 569 EAGAIN = 35 // errno.h:83:1: 570 EALREADY = 37 // errno.h:86:1: 571 EAUTH = 80 // errno.h:155:1: 572 EBADF = 9 // errno.h:50:1: 573 EBADMSG = 92 // errno.h:170:1: 574 EBADRPC = 72 // errno.h:143:1: 575 EBUSY = 16 // errno.h:60:1: 576 ECANCELED = 88 // errno.h:166:1: 577 ECHILD = 10 // errno.h:51:1: 578 ECONNABORTED = 53 // errno.h:110:1: 579 ECONNREFUSED = 61 // errno.h:120:1: 580 ECONNRESET = 54 // errno.h:111:1: 581 EDEADLK = 11 // errno.h:52:1: 582 EDESTADDRREQ = 39 // errno.h:90:1: 583 EDOM = 33 // errno.h:79:1: 584 EDQUOT = 69 // errno.h:137:1: 585 EEXIST = 17 // errno.h:61:1: 586 EFAULT = 14 // errno.h:56:1: 587 EFBIG = 27 // errno.h:71:1: 588 EFTYPE = 79 // errno.h:154:1: 589 EHOSTDOWN = 64 // errno.h:127:1: 590 EHOSTUNREACH = 65 // errno.h:129:1: 591 EIDRM = 89 // errno.h:167:1: 592 EILSEQ = 84 // errno.h:160:1: 593 EINPROGRESS = 36 // errno.h:85:1: 594 EINTR = 4 // errno.h:45:1: 595 EINVAL = 22 // errno.h:66:1: 596 EIO = 5 // errno.h:46:1: 597 EIPSEC = 82 // errno.h:157:1: 598 EISCONN = 56 // errno.h:113:1: 599 EISDIR = 21 // errno.h:65:1: 600 ELAST = 95 // errno.h:175:1: 601 ELOOP = 62 // errno.h:122:1: 602 EMEDIUMTYPE = 86 // errno.h:163:1: 603 EMFILE = 24 // errno.h:68:1: 604 EMLINK = 31 // errno.h:75:1: 605 EMSGSIZE = 40 // errno.h:91:1: 606 ENAMETOOLONG = 63 // errno.h:123:1: 607 ENEEDAUTH = 81 // errno.h:156:1: 608 ENETDOWN = 50 // errno.h:107:1: 609 ENETRESET = 52 // errno.h:109:1: 610 ENETUNREACH = 51 // errno.h:108:1: 611 ENFILE = 23 // errno.h:67:1: 612 ENOATTR = 83 // errno.h:158:1: 613 ENOBUFS = 55 // errno.h:112:1: 614 ENODEV = 19 // errno.h:63:1: 615 ENOENT = 2 // errno.h:43:1: 616 ENOEXEC = 8 // errno.h:49:1: 617 ENOLCK = 77 // errno.h:150:1: 618 ENOMEDIUM = 85 // errno.h:162:1: 619 ENOMEM = 12 // errno.h:54:1: 620 ENOMSG = 90 // errno.h:168:1: 621 ENOPROTOOPT = 42 // errno.h:93:1: 622 ENOSPC = 28 // errno.h:72:1: 623 ENOSYS = 78 // errno.h:151:1: 624 ENOTBLK = 15 // errno.h:58:1: 625 ENOTCONN = 57 // errno.h:114:1: 626 ENOTDIR = 20 // errno.h:64:1: 627 ENOTEMPTY = 66 // errno.h:130:1: 628 ENOTRECOVERABLE = 93 // errno.h:171:1: 629 ENOTSOCK = 38 // errno.h:89:1: 630 ENOTSUP = 91 // errno.h:169:1: 631 ENOTTY = 25 // errno.h:69:1: 632 ENXIO = 6 // errno.h:47:1: 633 EOF = -1 // stdio.h:170:1: 634 EOPNOTSUPP = 45 // errno.h:98:1: 635 EOVERFLOW = 87 // errno.h:165:1: 636 EOWNERDEAD = 94 // errno.h:172:1: 637 EPERM = 1 // errno.h:42:1: 638 EPFNOSUPPORT = 46 // errno.h:100:1: 639 EPIPE = 32 // errno.h:76:1: 640 EPROCLIM = 67 // errno.h:134:1: 641 EPROCUNAVAIL = 76 // errno.h:147:1: 642 EPROGMISMATCH = 75 // errno.h:146:1: 643 EPROGUNAVAIL = 74 // errno.h:145:1: 644 EPROTO = 95 // errno.h:173:1: 645 EPROTONOSUPPORT = 43 // errno.h:94:1: 646 EPROTOTYPE = 41 // errno.h:92:1: 647 ERANGE = 34 // errno.h:80:1: 648 EREMOTE = 71 // errno.h:142:1: 649 EROFS = 30 // errno.h:74:1: 650 ERPCMISMATCH = 73 // errno.h:144:1: 651 ESHUTDOWN = 58 // errno.h:116:1: 652 ESOCKTNOSUPPORT = 44 // errno.h:96:1: 653 ESPIPE = 29 // errno.h:73:1: 654 ESRCH = 3 // errno.h:44:1: 655 ESTALE = 70 // errno.h:140:1: 656 ETIMEDOUT = 60 // errno.h:119:1: 657 ETOOMANYREFS = 59 // errno.h:117:1: 658 ETXTBSY = 26 // errno.h:70:1: 659 EUSERS = 68 // errno.h:135:1: 660 EWOULDBLOCK = 35 // errno.h:84:1: 661 EXDEV = 18 // errno.h:62:1: 662 FAPPEND = 8 // fcntl.h:130:1: 663 FASYNC = 64 // fcntl.h:131:1: 664 FD_CLOEXEC = 1 // fcntl.h:163:1: 665 FFSYNC = 128 // fcntl.h:132:1: 666 FILENAME_MAX = 1024 // stdio.h:178:1: 667 FNDELAY = 4 // fcntl.h:134:1: 668 FNONBLOCK = 4 // fcntl.h:133:1: 669 FOPEN_MAX = 20 // stdio.h:177:1: 670 FREAD = 0x0001 // fcntl.h:76:1: 671 FWRITE = 0x0002 // fcntl.h:77:1: 672 F_DUPFD = 0 // fcntl.h:143:1: 673 F_DUPFD_CLOEXEC = 10 // fcntl.h:156:1: 674 F_GETFD = 1 // fcntl.h:144:1: 675 F_GETFL = 3 // fcntl.h:146:1: 676 F_GETLK = 7 // fcntl.h:152:1: 677 F_GETOWN = 5 // fcntl.h:149:1: 678 F_ISATTY = 11 // fcntl.h:159:1: 679 F_RDLCK = 1 // fcntl.h:166:1: 680 F_SETFD = 2 // fcntl.h:145:1: 681 F_SETFL = 4 // fcntl.h:147:1: 682 F_SETLK = 8 // fcntl.h:153:1: 683 F_SETLKW = 9 // fcntl.h:154:1: 684 F_SETOWN = 6 // fcntl.h:150:1: 685 F_UNLCK = 2 // fcntl.h:167:1: 686 F_WRLCK = 3 // fcntl.h:168:1: 687 GZBUFSIZE = 8192 // gzguts.h:156:1: 688 GZ_APPEND = 1 // gzguts.h:162:1: 689 GZ_NONE = 0 // gzguts.h:159:1: 690 GZ_READ = 7247 // gzguts.h:160:1: 691 GZ_WRITE = 31153 // gzguts.h:161:1: 692 HAVE_VSNPRINTF = 0 // gzguts.h:59:1: 693 LOCK_EX = 0x02 // fcntl.h:192:1: 694 LOCK_NB = 0x04 // fcntl.h:193:1: 695 LOCK_SH = 0x01 // fcntl.h:191:1: 696 LOCK_UN = 0x08 // fcntl.h:194:1: 697 LOOK = 0 // gzguts.h:165:1: 698 L_ctermid = 1024 // stdio.h:306:1: 699 L_tmpnam = 1024 // stdio.h:184:1: 700 O_ACCMODE = 0x0003 // fcntl.h:65:1: 701 O_APPEND = 0x0008 // fcntl.h:80:1: 702 O_ASYNC = 0x0040 // fcntl.h:84:1: 703 O_CLOEXEC = 0x10000 // fcntl.h:107:1: 704 O_CREAT = 0x0200 // fcntl.h:91:1: 705 O_DIRECTORY = 0x20000 // fcntl.h:108:1: 706 O_DSYNC = 128 // fcntl.h:100:1: 707 O_EXCL = 0x0800 // fcntl.h:93:1: 708 O_EXLOCK = 0x0020 // fcntl.h:83:1: 709 O_FSYNC = 0x0080 // fcntl.h:85:1: 710 O_NDELAY = 4 // fcntl.h:135:1: 711 O_NOCTTY = 0x8000 // fcntl.h:104:1: 712 O_NOFOLLOW = 0x0100 // fcntl.h:86:1: 713 O_NONBLOCK = 0x0004 // fcntl.h:79:1: 714 O_RDONLY = 0x0000 // fcntl.h:62:1: 715 O_RDWR = 0x0002 // fcntl.h:64:1: 716 O_RSYNC = 128 // fcntl.h:101:1: 717 O_SHLOCK = 0x0010 // fcntl.h:82:1: 718 O_SYNC = 0x0080 // fcntl.h:89:1: 719 O_TRUNC = 0x0400 // fcntl.h:92:1: 720 O_WRONLY = 0x0001 // fcntl.h:63:1: 721 P_tmpdir = "/tmp/" // stdio.h:182:1: 722 TMP_MAX = 0x7fffffff // stdio.h:185:1: 723 X_ERRNO_H_ = 0 // errno.h:40:1: 724 X_FSTDIO = 0 // stdio.h:59:1: 725 X_IOFBF = 0 // stdio.h:164:1: 726 X_IOLBF = 1 // stdio.h:165:1: 727 X_IONBF = 2 // stdio.h:166:1: 728 X_POSIX_SOURCE = 0 // gzguts.h:30:1: 729 X_STDIO_H_ = 0 // stdio.h:39:1: 730 X_SYS_FCNTL_H_ = 0 // fcntl.h:41:1: 731 ENOUGH = 1444 // inftrees.h:51:1: 732 ENOUGH_DISTS = 592 // inftrees.h:50:1: 733 ENOUGH_LENS = 852 // inftrees.h:49:1: 734 GUNZIP = 0 // inflate.h:16:1: 735 MAXBITS = 15 // inftrees.c:9:1: 736 DIST_CODE_LEN = 512 // trees.c:81:1: 737 END_BLOCK = 256 // trees.c:50:1: 738 MAX_BL_BITS = 7 // trees.c:47:1: 739 REPZ_11_138 = 18 // trees.c:59:1: 740 REPZ_3_10 = 17 // trees.c:56:1: 741 REP_3_6 = 16 // trees.c:53:1: 742 SMALLEST = 1 // trees.c:422:1: 743 ) 744 745 // 746 // If you use the zlib library in a product, an acknowledgment is welcome 747 // in the documentation of your product. If for some reason you cannot 748 // include such an acknowledgment, I would appreciate that you keep this 749 // copyright string in the executable of your product. 750 // 751 752 // =========================================================================== 753 // 754 // Function prototypes. 755 const ( /* deflate.c:66:1: */ 756 Need_more = 0 // block not completed, need more input or more output 757 Block_done = 1 // block flush performed 758 Finish_started = 2 // finish started, need only more output at next deflate 759 Finish_done = 3 760 ) 761 762 // inflate.h -- internal inflate state definition 763 // Copyright (C) 1995-2016 Mark Adler 764 // For conditions of distribution and use, see copyright notice in zlib.h 765 766 // WARNING: this file should *not* be used by applications. It is 767 // part of the implementation of the compression library and is 768 // subject to change. Applications should only use zlib.h. 769 // 770 771 // define NO_GZIP when compiling if you want to disable gzip header and 772 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 773 // the crc code when it is not needed. For shared libraries, gzip decoding 774 // should be left enabled. 775 776 // Possible inflate modes between inflate() calls 777 const ( /* inflate.h:20:1: */ 778 HEAD = 16180 // i: waiting for magic header 779 FLAGS = 16181 // i: waiting for method and flags (gzip) 780 TIME = 16182 // i: waiting for modification time (gzip) 781 OS = 16183 // i: waiting for extra flags and operating system (gzip) 782 EXLEN = 16184 // i: waiting for extra length (gzip) 783 EXTRA = 16185 // i: waiting for extra bytes (gzip) 784 NAME = 16186 // i: waiting for end of file name (gzip) 785 COMMENT = 16187 // i: waiting for end of comment (gzip) 786 HCRC = 16188 // i: waiting for header crc (gzip) 787 DICTID = 16189 // i: waiting for dictionary check value 788 DICT = 16190 // waiting for inflateSetDictionary() call 789 TYPE = 16191 // i: waiting for type bits, including last-flag bit 790 TYPEDO = 16192 // i: same, but skip check to exit inflate on new block 791 STORED = 16193 // i: waiting for stored size (length and complement) 792 COPY_ = 16194 // i/o: same as COPY below, but only first time in 793 COPY = 16195 // i/o: waiting for input or output to copy stored block 794 TABLE = 16196 // i: waiting for dynamic block table lengths 795 LENLENS = 16197 // i: waiting for code length code lengths 796 CODELENS = 16198 // i: waiting for length/lit and distance code lengths 797 LEN_ = 16199 // i: same as LEN below, but only first time in 798 LEN = 16200 // i: waiting for length/lit/eob code 799 LENEXT = 16201 // i: waiting for length extra bits 800 DIST = 16202 // i: waiting for distance code 801 DISTEXT = 16203 // i: waiting for distance extra bits 802 MATCH = 16204 // o: waiting for output space to copy string 803 LIT = 16205 // o: waiting for output space to write literal 804 CHECK = 16206 // i: waiting for 32-bit check value 805 LENGTH = 16207 // i: waiting for 32-bit length (gzip) 806 DONE = 16208 // finished check, done -- remain here until reset 807 BAD = 16209 // got a data error -- remain here until reset 808 MEM = 16210 // got an inflate() memory error -- remain here until reset 809 SYNC = 16211 810 ) 811 812 // op values as set by inflate_table(): 813 // 00000000 - literal 814 // 0000tttt - table link, tttt != 0 is the number of table index bits 815 // 0001eeee - length or distance, eeee is the number of extra bits 816 // 01100000 - end of block 817 // 01000000 - invalid code 818 // 819 820 // Maximum size of the dynamic table. The maximum number of code structures is 821 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 822 // codes. These values were found by exhaustive searches using the program 823 // examples/enough.c found in the zlib distribtution. The arguments to that 824 // program are the number of symbols, the initial root table size, and the 825 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 826 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 827 // The initial root table size (9 or 6) is found in the fifth argument of the 828 // inflate_table() calls in inflate.c and infback.c. If the root table size is 829 // changed, then these maximum sizes would be need to be recalculated and 830 // updated. 831 832 // Type of code to build for inflate_table() 833 const ( /* inftrees.h:54:1: */ 834 CODES = 0 835 LENS = 1 836 DISTS = 2 837 ) 838 839 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 840 841 type Size_t = uint64 /* <builtin>:9:23 */ 842 843 type Wchar_t = int32 /* <builtin>:15:24 */ 844 845 type X__int128_t = struct { 846 Flo int64 847 Fhi int64 848 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 849 type X__uint128_t = struct { 850 Flo uint64 851 Fhi uint64 852 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 853 854 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 855 type X__float128 = float64 /* <builtin>:47:21 */ 856 857 // adler32.c -- compute the Adler-32 checksum of a data stream 858 // Copyright (C) 1995-2011, 2016 Mark Adler 859 // For conditions of distribution and use, see copyright notice in zlib.h 860 861 // @(#) $Id$ 862 863 // zutil.h -- internal interface and configuration of the compression library 864 // Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler 865 // For conditions of distribution and use, see copyright notice in zlib.h 866 867 // WARNING: this file should *not* be used by applications. It is 868 // part of the implementation of the compression library and is 869 // subject to change. Applications should only use zlib.h. 870 // 871 872 // @(#) $Id$ 873 874 // zlib.h -- interface of the 'zlib' general purpose compression library 875 // version 1.2.11, January 15th, 2017 876 // 877 // Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler 878 // 879 // This software is provided 'as-is', without any express or implied 880 // warranty. In no event will the authors be held liable for any damages 881 // arising from the use of this software. 882 // 883 // Permission is granted to anyone to use this software for any purpose, 884 // including commercial applications, and to alter it and redistribute it 885 // freely, subject to the following restrictions: 886 // 887 // 1. The origin of this software must not be misrepresented; you must not 888 // claim that you wrote the original software. If you use this software 889 // in a product, an acknowledgment in the product documentation would be 890 // appreciated but is not required. 891 // 2. Altered source versions must be plainly marked as such, and must not be 892 // misrepresented as being the original software. 893 // 3. This notice may not be removed or altered from any source distribution. 894 // 895 // Jean-loup Gailly Mark Adler 896 // jloup@gzip.org madler@alumni.caltech.edu 897 // 898 // 899 // The data format used by the zlib library is described by RFCs (Request for 900 // Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 901 // (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). 902 903 // zconf.h -- configuration of the zlib compression library 904 // Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler 905 // For conditions of distribution and use, see copyright notice in zlib.h 906 907 // @(#) $Id$ 908 909 // If you *really* need a unique prefix for all types and library functions, 910 // compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. 911 // Even better than compiling with -DZ_PREFIX would be to use configure to set 912 // this permanently in zconf.h using "./configure --zprefix". 913 914 // Compile with -DMAXSEG_64K if the alloc function cannot allocate more 915 // than 64k bytes at a time (needed on systems with 16-bit int). 916 917 // $OpenBSD: stddef.h,v 1.14 2017/01/06 14:36:50 kettenis Exp $ 918 // $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ 919 920 // - 921 // Copyright (c) 1990 The Regents of the University of California. 922 // All rights reserved. 923 // 924 // Redistribution and use in source and binary forms, with or without 925 // modification, are permitted provided that the following conditions 926 // are met: 927 // 1. Redistributions of source code must retain the above copyright 928 // notice, this list of conditions and the following disclaimer. 929 // 2. Redistributions in binary form must reproduce the above copyright 930 // notice, this list of conditions and the following disclaimer in the 931 // documentation and/or other materials provided with the distribution. 932 // 3. Neither the name of the University nor the names of its contributors 933 // may be used to endorse or promote products derived from this software 934 // without specific prior written permission. 935 // 936 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 937 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 938 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 939 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 940 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 941 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 942 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 943 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 944 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 945 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 946 // SUCH DAMAGE. 947 // 948 // @(#)stddef.h 5.5 (Berkeley) 4/3/91 949 950 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 951 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 952 953 // Copyright (c) 1991, 1993 954 // The Regents of the University of California. All rights reserved. 955 // 956 // This code is derived from software contributed to Berkeley by 957 // Berkeley Software Design, Inc. 958 // 959 // Redistribution and use in source and binary forms, with or without 960 // modification, are permitted provided that the following conditions 961 // are met: 962 // 1. Redistributions of source code must retain the above copyright 963 // notice, this list of conditions and the following disclaimer. 964 // 2. Redistributions in binary form must reproduce the above copyright 965 // notice, this list of conditions and the following disclaimer in the 966 // documentation and/or other materials provided with the distribution. 967 // 3. Neither the name of the University nor the names of its contributors 968 // may be used to endorse or promote products derived from this software 969 // without specific prior written permission. 970 // 971 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 972 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 973 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 974 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 975 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 976 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 977 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 978 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 979 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 980 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 981 // SUCH DAMAGE. 982 // 983 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 984 985 // $OpenBSD: cdefs.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ 986 987 // Macro to test if we're using a specific version of gcc or later. 988 989 // The __CONCAT macro is used to concatenate parts of symbol names, e.g. 990 // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. 991 // The __CONCAT macro is a bit tricky -- make sure you don't put spaces 992 // in between its arguments. Do not use __CONCAT on double-quoted strings, 993 // such as those from the __STRING macro: to concatenate strings just put 994 // them next to each other. 995 996 // GCC1 and some versions of GCC2 declare dead (non-returning) and 997 // pure (no side effects) functions using "volatile" and "const"; 998 // unfortunately, these then cause warnings under "-ansi -pedantic". 999 // GCC >= 2.5 uses the __attribute__((attrs)) style. All of these 1000 // work for GNU C++ (modulo a slight glitch in the C++ grammar in 1001 // the distribution version of 2.5.5). 1002 1003 // __returns_twice makes the compiler not assume the function 1004 // only returns once. This affects registerisation of variables: 1005 // even local variables need to be in memory across such a call. 1006 // Example: setjmp() 1007 1008 // __only_inline makes the compiler only use this function definition 1009 // for inlining; references that can't be inlined will be left as 1010 // external references instead of generating a local copy. The 1011 // matching library should include a simple extern definition for 1012 // the function to handle those references. c.f. ctype.h 1013 1014 // GNU C version 2.96 adds explicit branch prediction so that 1015 // the CPU back-end can hint the processor and also so that 1016 // code blocks can be reordered such that the predicted path 1017 // sees a more linear flow, thus improving cache behavior, etc. 1018 // 1019 // The following two macros provide us with a way to utilize this 1020 // compiler feature. Use __predict_true() if you expect the expression 1021 // to evaluate to true, and __predict_false() if you expect the 1022 // expression to evaluate to false. 1023 // 1024 // A few notes about usage: 1025 // 1026 // * Generally, __predict_false() error condition checks (unless 1027 // you have some _strong_ reason to do otherwise, in which case 1028 // document it), and/or __predict_true() `no-error' condition 1029 // checks, assuming you want to optimize for the no-error case. 1030 // 1031 // * Other than that, if you don't know the likelihood of a test 1032 // succeeding from empirical or other `hard' evidence, don't 1033 // make predictions. 1034 // 1035 // * These are meant to be used in places that are run `a lot'. 1036 // It is wasteful to make predictions in code that is run 1037 // seldomly (e.g. at subsystem initialization time) as the 1038 // basic block reordering that this affects can often generate 1039 // larger code. 1040 1041 // Delete pseudo-keywords wherever they are not available or needed. 1042 1043 // The __packed macro indicates that a variable or structure members 1044 // should have the smallest possible alignment, despite any host CPU 1045 // alignment requirements. 1046 // 1047 // The __aligned(x) macro specifies the minimum alignment of a 1048 // variable or structure. 1049 // 1050 // These macros together are useful for describing the layout and 1051 // alignment of messages exchanged with hardware or other systems. 1052 1053 // "The nice thing about standards is that there are so many to choose from." 1054 // There are a number of "feature test macros" specified by (different) 1055 // standards that determine which interfaces and types the header files 1056 // should expose. 1057 // 1058 // Because of inconsistencies in these macros, we define our own 1059 // set in the private name space that end in _VISIBLE. These are 1060 // always defined and so headers can test their values easily. 1061 // Things can get tricky when multiple feature macros are defined. 1062 // We try to take the union of all the features requested. 1063 // 1064 // The following macros are guaranteed to have a value after cdefs.h 1065 // has been included: 1066 // __POSIX_VISIBLE 1067 // __XPG_VISIBLE 1068 // __ISO_C_VISIBLE 1069 // __BSD_VISIBLE 1070 1071 // X/Open Portability Guides and Single Unix Specifications. 1072 // _XOPEN_SOURCE XPG3 1073 // _XOPEN_SOURCE && _XOPEN_VERSION = 4 XPG4 1074 // _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED = 1 XPG4v2 1075 // _XOPEN_SOURCE == 500 XPG5 1076 // _XOPEN_SOURCE == 520 XPG5v2 1077 // _XOPEN_SOURCE == 600 POSIX 1003.1-2001 with XSI 1078 // _XOPEN_SOURCE == 700 POSIX 1003.1-2008 with XSI 1079 // 1080 // The XPG spec implies a specific value for _POSIX_C_SOURCE. 1081 1082 // POSIX macros, these checks must follow the XOPEN ones above. 1083 // 1084 // _POSIX_SOURCE == 1 1003.1-1988 (superseded by _POSIX_C_SOURCE) 1085 // _POSIX_C_SOURCE == 1 1003.1-1990 1086 // _POSIX_C_SOURCE == 2 1003.2-1992 1087 // _POSIX_C_SOURCE == 199309L 1003.1b-1993 1088 // _POSIX_C_SOURCE == 199506L 1003.1c-1995, 1003.1i-1995, 1089 // and the omnibus ISO/IEC 9945-1:1996 1090 // _POSIX_C_SOURCE == 200112L 1003.1-2001 1091 // _POSIX_C_SOURCE == 200809L 1003.1-2008 1092 // 1093 // The POSIX spec implies a specific value for __ISO_C_VISIBLE, though 1094 // this may be overridden by the _ISOC99_SOURCE macro later. 1095 1096 // _ANSI_SOURCE means to expose ANSI C89 interfaces only. 1097 // If the user defines it in addition to one of the POSIX or XOPEN 1098 // macros, assume the POSIX/XOPEN macro(s) should take precedence. 1099 1100 // _ISOC99_SOURCE, _ISOC11_SOURCE, __STDC_VERSION__, and __cplusplus 1101 // override any of the other macros since they are non-exclusive. 1102 1103 // Finally deal with BSD-specific interfaces that are not covered 1104 // by any standards. We expose these when none of the POSIX or XPG 1105 // macros is defined or if the user explicitly asks for them. 1106 1107 // Default values. 1108 1109 // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ 1110 1111 // Written by Todd C. Miller, September 9, 2016 1112 // Public domain. 1113 1114 // $OpenBSD: _types.h,v 1.10 2022/08/06 13:31:13 semarie Exp $ 1115 1116 // - 1117 // Copyright (c) 1990, 1993 1118 // The Regents of the University of California. All rights reserved. 1119 // 1120 // Redistribution and use in source and binary forms, with or without 1121 // modification, are permitted provided that the following conditions 1122 // are met: 1123 // 1. Redistributions of source code must retain the above copyright 1124 // notice, this list of conditions and the following disclaimer. 1125 // 2. Redistributions in binary form must reproduce the above copyright 1126 // notice, this list of conditions and the following disclaimer in the 1127 // documentation and/or other materials provided with the distribution. 1128 // 3. Neither the name of the University nor the names of its contributors 1129 // may be used to endorse or promote products derived from this software 1130 // without specific prior written permission. 1131 // 1132 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1133 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1134 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1135 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1136 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1137 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1138 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1139 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1140 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1141 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1142 // SUCH DAMAGE. 1143 // 1144 // @(#)types.h 8.3 (Berkeley) 1/5/94 1145 1146 // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ 1147 // - 1148 // Copyright (c) 1990, 1993 1149 // The Regents of the University of California. All rights reserved. 1150 // 1151 // Redistribution and use in source and binary forms, with or without 1152 // modification, are permitted provided that the following conditions 1153 // are met: 1154 // 1. Redistributions of source code must retain the above copyright 1155 // notice, this list of conditions and the following disclaimer. 1156 // 2. Redistributions in binary form must reproduce the above copyright 1157 // notice, this list of conditions and the following disclaimer in the 1158 // documentation and/or other materials provided with the distribution. 1159 // 3. Neither the name of the University nor the names of its contributors 1160 // may be used to endorse or promote products derived from this software 1161 // without specific prior written permission. 1162 // 1163 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1164 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1165 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1166 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1167 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1168 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1169 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1170 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1171 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1172 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1173 // SUCH DAMAGE. 1174 // 1175 // @(#)types.h 8.3 (Berkeley) 1/5/94 1176 // @(#)ansi.h 8.2 (Berkeley) 1/4/94 1177 1178 // _ALIGN(p) rounds p (pointer or byte index) up to a correctly-aligned 1179 // value for all data types (int, long, ...). The result is an 1180 // unsigned long and must be cast to any desired pointer type. 1181 // 1182 // _ALIGNED_POINTER is a boolean macro that checks whether an address 1183 // is valid to fetch data elements of type t from on this architecture. 1184 // This does not reflect the optimal alignment, just the possibility 1185 // (within reasonable limits). 1186 1187 // 7.18.1.1 Exact-width integer types 1188 type X__int8_t = int8 /* _types.h:60:22 */ 1189 type X__uint8_t = uint8 /* _types.h:61:24 */ 1190 type X__int16_t = int16 /* _types.h:62:17 */ 1191 type X__uint16_t = uint16 /* _types.h:63:25 */ 1192 type X__int32_t = int32 /* _types.h:64:15 */ 1193 type X__uint32_t = uint32 /* _types.h:65:23 */ 1194 // LONGLONG 1195 type X__int64_t = int64 /* _types.h:67:20 */ 1196 // LONGLONG 1197 type X__uint64_t = uint64 /* _types.h:69:28 */ 1198 1199 // 7.18.1.2 Minimum-width integer types 1200 type X__int_least8_t = X__int8_t /* _types.h:72:19 */ 1201 type X__uint_least8_t = X__uint8_t /* _types.h:73:20 */ 1202 type X__int_least16_t = X__int16_t /* _types.h:74:20 */ 1203 type X__uint_least16_t = X__uint16_t /* _types.h:75:21 */ 1204 type X__int_least32_t = X__int32_t /* _types.h:76:20 */ 1205 type X__uint_least32_t = X__uint32_t /* _types.h:77:21 */ 1206 type X__int_least64_t = X__int64_t /* _types.h:78:20 */ 1207 type X__uint_least64_t = X__uint64_t /* _types.h:79:21 */ 1208 1209 // 7.18.1.3 Fastest minimum-width integer types 1210 type X__int_fast8_t = X__int32_t /* _types.h:82:20 */ 1211 type X__uint_fast8_t = X__uint32_t /* _types.h:83:21 */ 1212 type X__int_fast16_t = X__int32_t /* _types.h:84:20 */ 1213 type X__uint_fast16_t = X__uint32_t /* _types.h:85:21 */ 1214 type X__int_fast32_t = X__int32_t /* _types.h:86:20 */ 1215 type X__uint_fast32_t = X__uint32_t /* _types.h:87:21 */ 1216 type X__int_fast64_t = X__int64_t /* _types.h:88:20 */ 1217 type X__uint_fast64_t = X__uint64_t /* _types.h:89:21 */ 1218 1219 // 7.18.1.4 Integer types capable of holding object pointers 1220 type X__intptr_t = int64 /* _types.h:104:16 */ 1221 type X__uintptr_t = uint64 /* _types.h:105:24 */ 1222 1223 // 7.18.1.5 Greatest-width integer types 1224 type X__intmax_t = X__int64_t /* _types.h:108:20 */ 1225 type X__uintmax_t = X__uint64_t /* _types.h:109:21 */ 1226 1227 // Register size 1228 type X__register_t = int64 /* _types.h:112:16 */ 1229 1230 // VM system types 1231 type X__vaddr_t = uint64 /* _types.h:115:24 */ 1232 type X__paddr_t = uint64 /* _types.h:116:24 */ 1233 type X__vsize_t = uint64 /* _types.h:117:24 */ 1234 type X__psize_t = uint64 /* _types.h:118:24 */ 1235 1236 // Standard system types 1237 type X__double_t = float64 /* _types.h:121:18 */ 1238 type X__float_t = float32 /* _types.h:122:17 */ 1239 type X__ptrdiff_t = int64 /* _types.h:123:16 */ 1240 type X__size_t = uint64 /* _types.h:124:24 */ 1241 type X__ssize_t = int64 /* _types.h:125:16 */ 1242 type X__va_list = X__builtin_va_list /* _types.h:127:27 */ 1243 1244 // Wide character support types 1245 type X__wchar_t = int32 /* _types.h:137:15 */ 1246 type X__wint_t = int32 /* _types.h:140:15 */ 1247 type X__rune_t = int32 /* _types.h:141:15 */ 1248 type X__wctrans_t = uintptr /* _types.h:142:14 */ 1249 type X__wctype_t = uintptr /* _types.h:143:14 */ 1250 1251 type X__blkcnt_t = X__int64_t /* _types.h:39:19 */ // blocks allocated for file 1252 type X__blksize_t = X__int32_t /* _types.h:40:19 */ // optimal blocksize for I/O 1253 type X__clock_t = X__int64_t /* _types.h:41:19 */ // ticks in CLOCKS_PER_SEC 1254 type X__clockid_t = X__int32_t /* _types.h:42:19 */ // CLOCK_* identifiers 1255 type X__cpuid_t = uint64 /* _types.h:43:23 */ // CPU id 1256 type X__dev_t = X__int32_t /* _types.h:44:19 */ // device number 1257 type X__fixpt_t = X__uint32_t /* _types.h:45:20 */ // fixed point number 1258 type X__fsblkcnt_t = X__uint64_t /* _types.h:46:20 */ // file system block count 1259 type X__fsfilcnt_t = X__uint64_t /* _types.h:47:20 */ // file system file count 1260 type X__gid_t = X__uint32_t /* _types.h:48:20 */ // group id 1261 type X__id_t = X__uint32_t /* _types.h:49:20 */ // may contain pid, uid or gid 1262 type X__in_addr_t = X__uint32_t /* _types.h:50:20 */ // base type for internet address 1263 type X__in_port_t = X__uint16_t /* _types.h:51:20 */ // IP port type 1264 type X__ino_t = X__uint64_t /* _types.h:52:20 */ // inode number 1265 type X__key_t = int64 /* _types.h:53:15 */ // IPC key (for Sys V IPC) 1266 type X__mode_t = X__uint32_t /* _types.h:54:20 */ // permissions 1267 type X__nlink_t = X__uint32_t /* _types.h:55:20 */ // link count 1268 type X__off_t = X__int64_t /* _types.h:56:19 */ // file offset or size 1269 type X__pid_t = X__int32_t /* _types.h:57:19 */ // process id 1270 type X__rlim_t = X__uint64_t /* _types.h:58:20 */ // resource limit 1271 type X__sa_family_t = X__uint8_t /* _types.h:59:19 */ // sockaddr address family type 1272 type X__segsz_t = X__int32_t /* _types.h:60:19 */ // segment size 1273 type X__socklen_t = X__uint32_t /* _types.h:61:20 */ // length type for network syscalls 1274 type X__suseconds_t = int64 /* _types.h:62:15 */ // microseconds (signed) 1275 type X__time_t = X__int64_t /* _types.h:63:19 */ // epoch time 1276 type X__timer_t = X__int32_t /* _types.h:64:19 */ // POSIX timer identifiers 1277 type X__uid_t = X__uint32_t /* _types.h:65:20 */ // user id 1278 type X__useconds_t = X__uint32_t /* _types.h:66:20 */ // microseconds 1279 1280 // mbstate_t is an opaque object to keep conversion state, during multibyte 1281 // stream conversions. The content must not be referenced by user programs. 1282 type X__mbstate_t = struct { 1283 F__ccgo_pad1 [0]uint64 1284 F__mbstate8 [128]int8 1285 } /* _types.h:75:3 */ 1286 1287 type Wint_t = X__wint_t /* stddef.h:60:18 */ 1288 1289 type Mbstate_t = X__mbstate_t /* stddef.h:65:21 */ 1290 1291 type Max_align_t = struct { 1292 F__max_align_ll int64 1293 F__max_align_ld float64 1294 } /* stddef.h:80:3 */ 1295 1296 type Z_size_t = Size_t /* zconf.h:248:21 */ 1297 1298 // Maximum value for memLevel in deflateInit2 1299 1300 // Maximum value for windowBits in deflateInit2 and inflateInit2. 1301 // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 1302 // created by gzip. (Files created by minigzip can still be extracted by 1303 // gzip.) 1304 1305 // The memory requirements for deflate are (in bytes): 1306 // (1 << (windowBits+2)) + (1 << (memLevel+9)) 1307 // that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 1308 // plus a few kilobytes for small objects. For example, if you want to reduce 1309 // the default memory requirements from 256K to 128K, compile with 1310 // make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 1311 // Of course this will generally degrade compression (there's no free lunch). 1312 // 1313 // The memory requirements for inflate are (in bytes) 1 << windowBits 1314 // that is, 32K for windowBits=15 (default value) plus about 7 kilobytes 1315 // for small objects. 1316 1317 // Type declarations 1318 1319 // The following definitions for FAR are needed only for MSDOS mixed 1320 // model programming (small or medium model with some far allocations). 1321 // This was tested only with MSC; for other MSDOS compilers you may have 1322 // to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 1323 // just define FAR to be empty. 1324 1325 type Byte = uint8 /* zconf.h:391:24 */ // 8 bits 1326 type UInt = uint32 /* zconf.h:393:24 */ // 16 bits or more 1327 type ULong = uint64 /* zconf.h:394:24 */ // 32 bits or more 1328 1329 type Bytef = Byte /* zconf.h:400:22 */ 1330 type Charf = int8 /* zconf.h:402:19 */ 1331 type Intf = int32 /* zconf.h:403:19 */ 1332 type UIntf = UInt /* zconf.h:404:19 */ 1333 type ULongf = ULong /* zconf.h:405:19 */ 1334 1335 type Voidpc = uintptr /* zconf.h:408:23 */ 1336 type Voidpf = uintptr /* zconf.h:409:23 */ 1337 type Voidp = uintptr /* zconf.h:410:23 */ 1338 1339 // $OpenBSD: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $ 1340 // $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ 1341 1342 // Copyright (c) 1988 The Regents of the University of California. 1343 // All rights reserved. 1344 // 1345 // Redistribution and use in source and binary forms, with or without 1346 // modification, are permitted provided that the following conditions 1347 // are met: 1348 // 1. Redistributions of source code must retain the above copyright 1349 // notice, this list of conditions and the following disclaimer. 1350 // 2. Redistributions in binary form must reproduce the above copyright 1351 // notice, this list of conditions and the following disclaimer in the 1352 // documentation and/or other materials provided with the distribution. 1353 // 3. Neither the name of the University nor the names of its contributors 1354 // may be used to endorse or promote products derived from this software 1355 // without specific prior written permission. 1356 // 1357 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1358 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1359 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1360 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1361 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1362 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1363 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1364 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1365 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1366 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1367 // SUCH DAMAGE. 1368 // 1369 // @(#)limits.h 5.9 (Berkeley) 4/3/91 1370 1371 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 1372 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 1373 1374 // Copyright (c) 1991, 1993 1375 // The Regents of the University of California. All rights reserved. 1376 // 1377 // This code is derived from software contributed to Berkeley by 1378 // Berkeley Software Design, Inc. 1379 // 1380 // Redistribution and use in source and binary forms, with or without 1381 // modification, are permitted provided that the following conditions 1382 // are met: 1383 // 1. Redistributions of source code must retain the above copyright 1384 // notice, this list of conditions and the following disclaimer. 1385 // 2. Redistributions in binary form must reproduce the above copyright 1386 // notice, this list of conditions and the following disclaimer in the 1387 // documentation and/or other materials provided with the distribution. 1388 // 3. Neither the name of the University nor the names of its contributors 1389 // may be used to endorse or promote products derived from this software 1390 // without specific prior written permission. 1391 // 1392 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1393 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1394 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1395 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1396 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1397 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1398 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1399 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1400 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1401 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1402 // SUCH DAMAGE. 1403 // 1404 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 1405 1406 // $OpenBSD: limits.h,v 1.10 2012/06/30 20:21:10 guenther Exp $ 1407 // Copyright (c) 2002 Marc Espie. 1408 // 1409 // Redistribution and use in source and binary forms, with or without 1410 // modification, are permitted provided that the following conditions 1411 // are met: 1412 // 1. Redistributions of source code must retain the above copyright 1413 // notice, this list of conditions and the following disclaimer. 1414 // 2. Redistributions in binary form must reproduce the above copyright 1415 // notice, this list of conditions and the following disclaimer in the 1416 // documentation and/or other materials provided with the distribution. 1417 // 1418 // THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS 1419 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1420 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1421 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD 1422 // PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1423 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1424 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1425 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1426 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1427 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1428 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1429 1430 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 1431 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 1432 1433 // Copyright (c) 1991, 1993 1434 // The Regents of the University of California. All rights reserved. 1435 // 1436 // This code is derived from software contributed to Berkeley by 1437 // Berkeley Software Design, Inc. 1438 // 1439 // Redistribution and use in source and binary forms, with or without 1440 // modification, are permitted provided that the following conditions 1441 // are met: 1442 // 1. Redistributions of source code must retain the above copyright 1443 // notice, this list of conditions and the following disclaimer. 1444 // 2. Redistributions in binary form must reproduce the above copyright 1445 // notice, this list of conditions and the following disclaimer in the 1446 // documentation and/or other materials provided with the distribution. 1447 // 3. Neither the name of the University nor the names of its contributors 1448 // may be used to endorse or promote products derived from this software 1449 // without specific prior written permission. 1450 // 1451 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1452 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1453 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1454 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1455 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1456 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1457 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1458 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1459 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1460 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1461 // SUCH DAMAGE. 1462 // 1463 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 1464 1465 // Common definitions for limits.h. 1466 1467 // Legacy 1468 // $OpenBSD: limits.h,v 1.1 2016/12/17 23:38:33 patrick Exp $ 1469 // $NetBSD: limits.h,v 1.4 2003/04/28 23:16:18 bjh21 Exp $ 1470 1471 // Copyright (c) 1988 The Regents of the University of California. 1472 // All rights reserved. 1473 // 1474 // Redistribution and use in source and binary forms, with or without 1475 // modification, are permitted provided that the following conditions 1476 // are met: 1477 // 1. Redistributions of source code must retain the above copyright 1478 // notice, this list of conditions and the following disclaimer. 1479 // 2. Redistributions in binary form must reproduce the above copyright 1480 // notice, this list of conditions and the following disclaimer in the 1481 // documentation and/or other materials provided with the distribution. 1482 // 3. Neither the name of the University nor the names of its contributors 1483 // may be used to endorse or promote products derived from this software 1484 // without specific prior written permission. 1485 // 1486 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1487 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1488 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1489 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1490 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1491 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1492 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1493 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1494 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1495 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1496 // SUCH DAMAGE. 1497 // 1498 // from: @(#)limits.h 7.2 (Berkeley) 6/28/90 1499 1500 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 1501 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 1502 1503 // Copyright (c) 1991, 1993 1504 // The Regents of the University of California. All rights reserved. 1505 // 1506 // This code is derived from software contributed to Berkeley by 1507 // Berkeley Software Design, Inc. 1508 // 1509 // Redistribution and use in source and binary forms, with or without 1510 // modification, are permitted provided that the following conditions 1511 // are met: 1512 // 1. Redistributions of source code must retain the above copyright 1513 // notice, this list of conditions and the following disclaimer. 1514 // 2. Redistributions in binary form must reproduce the above copyright 1515 // notice, this list of conditions and the following disclaimer in the 1516 // documentation and/or other materials provided with the distribution. 1517 // 3. Neither the name of the University nor the names of its contributors 1518 // may be used to endorse or promote products derived from this software 1519 // without specific prior written permission. 1520 // 1521 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1522 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1523 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1524 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1525 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1526 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1527 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1528 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1529 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1530 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1531 // SUCH DAMAGE. 1532 // 1533 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 1534 1535 // max value for unsigned long 1536 // max value for a signed long 1537 // min value for a signed long 1538 1539 // max value for unsigned long long 1540 // max value for a signed long long 1541 // min value for a signed long long 1542 1543 // $OpenBSD: syslimits.h,v 1.15 2022/02/22 16:58:08 deraadt Exp $ 1544 // $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ 1545 1546 // Copyright (c) 1988, 1993 1547 // The Regents of the University of California. All rights reserved. 1548 // 1549 // Redistribution and use in source and binary forms, with or without 1550 // modification, are permitted provided that the following conditions 1551 // are met: 1552 // 1. Redistributions of source code must retain the above copyright 1553 // notice, this list of conditions and the following disclaimer. 1554 // 2. Redistributions in binary form must reproduce the above copyright 1555 // notice, this list of conditions and the following disclaimer in the 1556 // documentation and/or other materials provided with the distribution. 1557 // 3. Neither the name of the University nor the names of its contributors 1558 // may be used to endorse or promote products derived from this software 1559 // without specific prior written permission. 1560 // 1561 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1562 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1563 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1564 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1565 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1566 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1567 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1568 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1569 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1570 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1571 // SUCH DAMAGE. 1572 // 1573 // @(#)syslimits.h 8.1 (Berkeley) 6/2/93 1574 1575 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 1576 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 1577 1578 // Copyright (c) 1991, 1993 1579 // The Regents of the University of California. All rights reserved. 1580 // 1581 // This code is derived from software contributed to Berkeley by 1582 // Berkeley Software Design, Inc. 1583 // 1584 // Redistribution and use in source and binary forms, with or without 1585 // modification, are permitted provided that the following conditions 1586 // are met: 1587 // 1. Redistributions of source code must retain the above copyright 1588 // notice, this list of conditions and the following disclaimer. 1589 // 2. Redistributions in binary form must reproduce the above copyright 1590 // notice, this list of conditions and the following disclaimer in the 1591 // documentation and/or other materials provided with the distribution. 1592 // 3. Neither the name of the University nor the names of its contributors 1593 // may be used to endorse or promote products derived from this software 1594 // without specific prior written permission. 1595 // 1596 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1597 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1598 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1599 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1600 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1601 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1602 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1603 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1604 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1605 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1606 // SUCH DAMAGE. 1607 // 1608 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 1609 1610 type Z_crc_t = uint32 /* zconf.h:429:17 */ 1611 1612 // Tell sys/endian.h we have MD variants of the swap macros. 1613 1614 // Note that these macros evaluate their arguments several times. 1615 1616 // Public names 1617 1618 // These are specified to be function-like macros to match the spec 1619 1620 // POSIX names 1621 1622 // original BSD names 1623 1624 // these were exposed here before 1625 1626 // ancient stuff 1627 1628 type U_char = uint8 /* types.h:51:23 */ 1629 type U_short = uint16 /* types.h:52:24 */ 1630 type U_int = uint32 /* types.h:53:22 */ 1631 type U_long = uint64 /* types.h:54:23 */ 1632 1633 type Unchar = uint8 /* types.h:56:23 */ // Sys V compatibility 1634 type Ushort = uint16 /* types.h:57:24 */ // Sys V compatibility 1635 type Uint = uint32 /* types.h:58:22 */ // Sys V compatibility 1636 type Ulong = uint64 /* types.h:59:23 */ // Sys V compatibility 1637 1638 type Cpuid_t = X__cpuid_t /* types.h:61:19 */ // CPU id 1639 type Register_t = X__register_t /* types.h:62:22 */ // register-sized type 1640 1641 // XXX The exact-width bit types should only be exposed if __BSD_VISIBLE 1642 // but the rest of the includes are not ready for that yet. 1643 1644 type Int8_t = X__int8_t /* types.h:75:19 */ 1645 1646 type Uint8_t = X__uint8_t /* types.h:80:20 */ 1647 1648 type Int16_t = X__int16_t /* types.h:85:20 */ 1649 1650 type Uint16_t = X__uint16_t /* types.h:90:21 */ 1651 1652 type Int32_t = X__int32_t /* types.h:95:20 */ 1653 1654 type Uint32_t = X__uint32_t /* types.h:100:21 */ 1655 1656 type Int64_t = X__int64_t /* types.h:105:20 */ 1657 1658 type Uint64_t = X__uint64_t /* types.h:110:21 */ 1659 1660 // BSD-style unsigned bits types 1661 type U_int8_t = X__uint8_t /* types.h:114:19 */ 1662 type U_int16_t = X__uint16_t /* types.h:115:20 */ 1663 type U_int32_t = X__uint32_t /* types.h:116:20 */ 1664 type U_int64_t = X__uint64_t /* types.h:117:20 */ 1665 1666 // quads, deprecated in favor of 64 bit int types 1667 type Quad_t = X__int64_t /* types.h:120:19 */ 1668 type U_quad_t = X__uint64_t /* types.h:121:20 */ 1669 1670 // VM system types 1671 type Vaddr_t = X__vaddr_t /* types.h:125:19 */ 1672 type Paddr_t = X__paddr_t /* types.h:126:19 */ 1673 type Vsize_t = X__vsize_t /* types.h:127:19 */ 1674 type Psize_t = X__psize_t /* types.h:128:19 */ 1675 1676 // Standard system types 1677 type Blkcnt_t = X__blkcnt_t /* types.h:132:20 */ // blocks allocated for file 1678 type Blksize_t = X__blksize_t /* types.h:133:21 */ // optimal blocksize for I/O 1679 type Caddr_t = uintptr /* types.h:134:14 */ // core address 1680 type Daddr32_t = X__int32_t /* types.h:135:19 */ // 32-bit disk address 1681 type Daddr_t = X__int64_t /* types.h:136:19 */ // 64-bit disk address 1682 type Dev_t = X__dev_t /* types.h:137:18 */ // device number 1683 type Fixpt_t = X__fixpt_t /* types.h:138:19 */ // fixed point number 1684 type Gid_t = X__gid_t /* types.h:139:18 */ // group id 1685 type Id_t = X__id_t /* types.h:140:17 */ // may contain pid, uid or gid 1686 type Ino_t = X__ino_t /* types.h:141:18 */ // inode number 1687 type Key_t = X__key_t /* types.h:142:18 */ // IPC key (for Sys V IPC) 1688 type Mode_t = X__mode_t /* types.h:143:18 */ // permissions 1689 type Nlink_t = X__nlink_t /* types.h:144:19 */ // link count 1690 type Rlim_t = X__rlim_t /* types.h:145:18 */ // resource limit 1691 type Segsz_t = X__segsz_t /* types.h:146:19 */ // segment size 1692 type Uid_t = X__uid_t /* types.h:147:18 */ // user id 1693 type Useconds_t = X__useconds_t /* types.h:148:22 */ // microseconds 1694 type Suseconds_t = X__suseconds_t /* types.h:149:23 */ // microseconds (signed) 1695 type Fsblkcnt_t = X__fsblkcnt_t /* types.h:150:22 */ // file system block count 1696 type Fsfilcnt_t = X__fsfilcnt_t /* types.h:151:22 */ // file system file count 1697 1698 // The following types may be defined in multiple header files. 1699 type Clock_t = X__clock_t /* types.h:158:19 */ 1700 1701 type Clockid_t = X__clockid_t /* types.h:163:21 */ 1702 1703 type Pid_t = X__pid_t /* types.h:168:18 */ 1704 1705 type Ssize_t = X__ssize_t /* types.h:178:19 */ 1706 1707 type Time_t = X__time_t /* types.h:183:18 */ 1708 1709 type Timer_t = X__timer_t /* types.h:188:19 */ 1710 1711 type Off_t = X__off_t /* types.h:193:18 */ 1712 1713 // Major, minor numbers, dev_t's. 1714 1715 // $OpenBSD: stdarg.h,v 1.10 2020/07/21 23:09:00 daniel Exp $ 1716 // Copyright (c) 2003, 2004 Marc espie <espie@openbsd.org> 1717 // 1718 // Permission to use, copy, modify, and distribute this software for any 1719 // purpose with or without fee is hereby granted, provided that the above 1720 // copyright notice and this permission notice appear in all copies. 1721 // 1722 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1723 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1724 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1725 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1726 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 1727 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 1728 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 1729 1730 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 1731 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 1732 1733 // Copyright (c) 1991, 1993 1734 // The Regents of the University of California. All rights reserved. 1735 // 1736 // This code is derived from software contributed to Berkeley by 1737 // Berkeley Software Design, Inc. 1738 // 1739 // Redistribution and use in source and binary forms, with or without 1740 // modification, are permitted provided that the following conditions 1741 // are met: 1742 // 1. Redistributions of source code must retain the above copyright 1743 // notice, this list of conditions and the following disclaimer. 1744 // 2. Redistributions in binary form must reproduce the above copyright 1745 // notice, this list of conditions and the following disclaimer in the 1746 // documentation and/or other materials provided with the distribution. 1747 // 3. Neither the name of the University nor the names of its contributors 1748 // may be used to endorse or promote products derived from this software 1749 // without specific prior written permission. 1750 // 1751 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1752 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1753 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1754 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1755 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1756 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1757 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1758 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1759 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1760 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1761 // SUCH DAMAGE. 1762 // 1763 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 1764 1765 // Define __gnuc_va_list. 1766 1767 type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:27:27 */ 1768 1769 // Note that the type used in va_arg is supposed to match the 1770 // actual type **after default promotions**. 1771 // Thus, va_arg (..., short) is not valid. 1772 1773 type Va_list = X__gnuc_va_list /* stdarg.h:39:24 */ 1774 1775 // a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 1776 // "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 1777 // though the former does not conform to the LFS document), but considering 1778 // both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 1779 // equivalently requesting no 64-bit operations 1780 1781 // $OpenBSD: unistd.h,v 1.106 2018/07/13 09:25:22 beck Exp $ 1782 // $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ 1783 1784 // - 1785 // Copyright (c) 1991 The Regents of the University of California. 1786 // All rights reserved. 1787 // 1788 // Redistribution and use in source and binary forms, with or without 1789 // modification, are permitted provided that the following conditions 1790 // are met: 1791 // 1. Redistributions of source code must retain the above copyright 1792 // notice, this list of conditions and the following disclaimer. 1793 // 2. Redistributions in binary form must reproduce the above copyright 1794 // notice, this list of conditions and the following disclaimer in the 1795 // documentation and/or other materials provided with the distribution. 1796 // 3. Neither the name of the University nor the names of its contributors 1797 // may be used to endorse or promote products derived from this software 1798 // without specific prior written permission. 1799 // 1800 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1801 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1802 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1803 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1804 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1805 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1806 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1807 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1808 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1809 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1810 // SUCH DAMAGE. 1811 // 1812 // @(#)unistd.h 5.13 (Berkeley) 6/17/91 1813 1814 // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ 1815 1816 // Written by Todd C. Miller, September 9, 2016 1817 // Public domain. 1818 1819 // $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ 1820 // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ 1821 1822 // - 1823 // Copyright (c) 1982, 1986, 1991, 1993 1824 // The Regents of the University of California. All rights reserved. 1825 // (c) UNIX System Laboratories, Inc. 1826 // All or some portions of this file are derived from material licensed 1827 // to the University of California by American Telephone and Telegraph 1828 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 1829 // the permission of UNIX System Laboratories, Inc. 1830 // 1831 // Redistribution and use in source and binary forms, with or without 1832 // modification, are permitted provided that the following conditions 1833 // are met: 1834 // 1. Redistributions of source code must retain the above copyright 1835 // notice, this list of conditions and the following disclaimer. 1836 // 2. Redistributions in binary form must reproduce the above copyright 1837 // notice, this list of conditions and the following disclaimer in the 1838 // documentation and/or other materials provided with the distribution. 1839 // 3. Neither the name of the University nor the names of its contributors 1840 // may be used to endorse or promote products derived from this software 1841 // without specific prior written permission. 1842 // 1843 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1844 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1845 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1846 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1847 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1848 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1849 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1850 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1851 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1852 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1853 // SUCH DAMAGE. 1854 // 1855 // @(#)types.h 8.4 (Berkeley) 1/21/94 1856 1857 // $OpenBSD: unistd.h,v 1.31 2015/07/20 00:56:10 guenther Exp $ 1858 // $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd Exp $ 1859 1860 // Copyright (c) 1989, 1993 1861 // The Regents of the University of California. All rights reserved. 1862 // 1863 // Redistribution and use in source and binary forms, with or without 1864 // modification, are permitted provided that the following conditions 1865 // are met: 1866 // 1. Redistributions of source code must retain the above copyright 1867 // notice, this list of conditions and the following disclaimer. 1868 // 2. Redistributions in binary form must reproduce the above copyright 1869 // notice, this list of conditions and the following disclaimer in the 1870 // documentation and/or other materials provided with the distribution. 1871 // 3. Neither the name of the University nor the names of its contributors 1872 // may be used to endorse or promote products derived from this software 1873 // without specific prior written permission. 1874 // 1875 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1876 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1877 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1878 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1879 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1880 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1881 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1882 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1883 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1884 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1885 // SUCH DAMAGE. 1886 // 1887 // @(#)unistd.h 8.2 (Berkeley) 1/7/94 1888 1889 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 1890 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 1891 1892 // Copyright (c) 1991, 1993 1893 // The Regents of the University of California. All rights reserved. 1894 // 1895 // This code is derived from software contributed to Berkeley by 1896 // Berkeley Software Design, Inc. 1897 // 1898 // Redistribution and use in source and binary forms, with or without 1899 // modification, are permitted provided that the following conditions 1900 // are met: 1901 // 1. Redistributions of source code must retain the above copyright 1902 // notice, this list of conditions and the following disclaimer. 1903 // 2. Redistributions in binary form must reproduce the above copyright 1904 // notice, this list of conditions and the following disclaimer in the 1905 // documentation and/or other materials provided with the distribution. 1906 // 3. Neither the name of the University nor the names of its contributors 1907 // may be used to endorse or promote products derived from this software 1908 // without specific prior written permission. 1909 // 1910 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1911 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1912 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1913 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1914 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1915 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1916 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1917 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1918 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1919 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1920 // SUCH DAMAGE. 1921 // 1922 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 1923 1924 // Define the POSIX.1 version we target for compliance. 1925 1926 // access function 1927 1928 // whence values for lseek(2) 1929 1930 // old BSD whence values for lseek(2); renamed by POSIX 1003.1 1931 1932 // the parameters argument passed to the __tfork() syscall 1933 type X__tfork = struct { 1934 Ftf_tcb uintptr 1935 Ftf_tid uintptr 1936 Ftf_stack uintptr 1937 } /* unistd.h:66:1 */ 1938 1939 // the parameters argument for the kbind() syscall 1940 type X__kbind = struct { 1941 Fkb_addr uintptr 1942 Fkb_size Size_t 1943 } /* unistd.h:73:1 */ 1944 1945 // the pathconf(2) variable values are part of the ABI 1946 1947 // configurable pathname variables 1948 1949 // POSIX options and option groups we unconditionally do or don't 1950 // implement. Please keep this list in alphabetical order. 1951 // 1952 // Anything which is defined as zero below **must** have an 1953 // implementation for the corresponding sysconf() which is able to 1954 // determine conclusively whether or not the feature is supported. 1955 // Anything which is defined as other than -1 below **must** have 1956 // complete headers, types, and function declarations as specified by 1957 // the POSIX standard; however, if the relevant sysconf() function 1958 // returns -1, the functions may be stubbed out. 1959 1960 // Define the POSIX.2 version we target for compliance. 1961 1962 // the sysconf(3) variable values are part of the ABI 1963 1964 // configurable system variables 1965 1966 // configurable system strings 1967 1968 type Intptr_t = X__intptr_t /* unistd.h:320:21 */ 1969 1970 // MVS linker does not support external names larger than 8 bytes 1971 1972 // 1973 // The 'zlib' compression library provides in-memory compression and 1974 // decompression functions, including integrity checks of the uncompressed data. 1975 // This version of the library supports only one compression method (deflation) 1976 // but other algorithms will be added later and will have the same stream 1977 // interface. 1978 // 1979 // Compression can be done in a single step if the buffers are large enough, 1980 // or can be done by repeated calls of the compression function. In the latter 1981 // case, the application must provide more input and/or consume the output 1982 // (providing more output space) before each call. 1983 // 1984 // The compressed data format used by default by the in-memory functions is 1985 // the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped 1986 // around a deflate stream, which is itself documented in RFC 1951. 1987 // 1988 // The library also supports reading and writing files in gzip (.gz) format 1989 // with an interface similar to that of stdio using the functions that start 1990 // with "gz". The gzip format is different from the zlib format. gzip is a 1991 // gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. 1992 // 1993 // This library can optionally read and write gzip and raw deflate streams in 1994 // memory as well. 1995 // 1996 // The zlib format was designed to be compact and fast for use in memory 1997 // and on communications channels. The gzip format was designed for single- 1998 // file compression on file systems, has a larger header than zlib to maintain 1999 // directory information, and uses a different, slower check method than zlib. 2000 // 2001 // The library does not install any signal handler. The decoder checks 2002 // the consistency of the compressed data, so the library should never crash 2003 // even in the case of corrupted input. 2004 2005 type Alloc_func = uintptr /* zlib.h:81:16 */ 2006 type Free_func = uintptr /* zlib.h:82:16 */ 2007 2008 type Internal_state = struct { 2009 Fstrm Z_streamp 2010 Fstatus int32 2011 F__ccgo_pad1 [4]byte 2012 Fpending_buf uintptr 2013 Fpending_buf_size Ulg 2014 Fpending_out uintptr 2015 Fpending Ulg 2016 Fwrap int32 2017 F__ccgo_pad2 [4]byte 2018 Fgzhead Gz_headerp 2019 Fgzindex Ulg 2020 Fmethod Byte 2021 F__ccgo_pad3 [3]byte 2022 Flast_flush int32 2023 Fw_size UInt 2024 Fw_bits UInt 2025 Fw_mask UInt 2026 F__ccgo_pad4 [4]byte 2027 Fwindow uintptr 2028 Fwindow_size Ulg 2029 Fprev uintptr 2030 Fhead uintptr 2031 Fins_h UInt 2032 Fhash_size UInt 2033 Fhash_bits UInt 2034 Fhash_mask UInt 2035 Fhash_shift UInt 2036 F__ccgo_pad5 [4]byte 2037 Fblock_start int64 2038 Fmatch_length UInt 2039 Fprev_match IPos 2040 Fmatch_available int32 2041 Fstrstart UInt 2042 Fmatch_start UInt 2043 Flookahead UInt 2044 Fprev_length UInt 2045 Fmax_chain_length UInt 2046 Fmax_lazy_match UInt 2047 Flevel int32 2048 Fstrategy int32 2049 Fgood_match UInt 2050 Fnice_match int32 2051 Fdyn_ltree [573]struct { 2052 Ffc struct{ Ffreq Ush } 2053 Fdl struct{ Fdad Ush } 2054 } 2055 Fdyn_dtree [61]struct { 2056 Ffc struct{ Ffreq Ush } 2057 Fdl struct{ Fdad Ush } 2058 } 2059 Fbl_tree [39]struct { 2060 Ffc struct{ Ffreq Ush } 2061 Fdl struct{ Fdad Ush } 2062 } 2063 Fl_desc struct { 2064 Fdyn_tree uintptr 2065 Fmax_code int32 2066 F__ccgo_pad1 [4]byte 2067 Fstat_desc uintptr 2068 } 2069 Fd_desc struct { 2070 Fdyn_tree uintptr 2071 Fmax_code int32 2072 F__ccgo_pad1 [4]byte 2073 Fstat_desc uintptr 2074 } 2075 Fbl_desc struct { 2076 Fdyn_tree uintptr 2077 Fmax_code int32 2078 F__ccgo_pad1 [4]byte 2079 Fstat_desc uintptr 2080 } 2081 Fbl_count [16]Ush 2082 Fheap [573]int32 2083 Fheap_len int32 2084 Fheap_max int32 2085 Fdepth [573]Uch 2086 F__ccgo_pad6 [7]byte 2087 Fl_buf uintptr 2088 Flit_bufsize UInt 2089 Flast_lit UInt 2090 Fd_buf uintptr 2091 Fopt_len Ulg 2092 Fstatic_len Ulg 2093 Fmatches UInt 2094 Finsert UInt 2095 Fbi_buf Ush 2096 F__ccgo_pad7 [2]byte 2097 Fbi_valid int32 2098 Fhigh_water Ulg 2099 } /* zlib.h:84:1 */ 2100 2101 type Z_stream_s = struct { 2102 Fnext_in uintptr 2103 Favail_in UInt 2104 F__ccgo_pad1 [4]byte 2105 Ftotal_in ULong 2106 Fnext_out uintptr 2107 Favail_out UInt 2108 F__ccgo_pad2 [4]byte 2109 Ftotal_out ULong 2110 Fmsg uintptr 2111 Fstate uintptr 2112 Fzalloc Alloc_func 2113 Fzfree Free_func 2114 Fopaque Voidpf 2115 Fdata_type int32 2116 F__ccgo_pad3 [4]byte 2117 Fadler ULong 2118 Freserved ULong 2119 } /* zlib.h:86:9 */ 2120 2121 type Z_stream = Z_stream_s /* zlib.h:106:3 */ 2122 2123 type Z_streamp = uintptr /* zlib.h:108:22 */ 2124 2125 // gzip header information passed to and from zlib routines. See RFC 1952 2126 // 2127 // for more details on the meanings of these fields. 2128 type Gz_header_s = struct { 2129 Ftext int32 2130 F__ccgo_pad1 [4]byte 2131 Ftime ULong 2132 Fxflags int32 2133 Fos int32 2134 Fextra uintptr 2135 Fextra_len UInt 2136 Fextra_max UInt 2137 Fname uintptr 2138 Fname_max UInt 2139 F__ccgo_pad2 [4]byte 2140 Fcomment uintptr 2141 Fcomm_max UInt 2142 Fhcrc int32 2143 Fdone int32 2144 F__ccgo_pad3 [4]byte 2145 } /* zlib.h:114:9 */ 2146 2147 // gzip header information passed to and from zlib routines. See RFC 1952 2148 // 2149 // for more details on the meanings of these fields. 2150 type Gz_header = Gz_header_s /* zlib.h:129:3 */ 2151 2152 type Gz_headerp = uintptr /* zlib.h:131:23 */ 2153 // 2154 // inflateGetHeader() requests that gzip header information be stored in the 2155 // provided gz_header structure. inflateGetHeader() may be called after 2156 // inflateInit2() or inflateReset(), and before the first call of inflate(). 2157 // As inflate() processes the gzip stream, head->done is zero until the header 2158 // is completed, at which time head->done is set to one. If a zlib stream is 2159 // being decoded, then head->done is set to -1 to indicate that there will be 2160 // no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be 2161 // used to force inflate() to return immediately after header processing is 2162 // complete and before any actual data is decompressed. 2163 // 2164 // The text, time, xflags, and os fields are filled in with the gzip header 2165 // contents. hcrc is set to true if there is a header CRC. (The header CRC 2166 // was valid if done is set to one.) If extra is not Z_NULL, then extra_max 2167 // contains the maximum number of bytes to write to extra. Once done is true, 2168 // extra_len contains the actual extra field length, and extra contains the 2169 // extra field, or that field truncated if extra_max is less than extra_len. 2170 // If name is not Z_NULL, then up to name_max characters are written there, 2171 // terminated with a zero unless the length is greater than name_max. If 2172 // comment is not Z_NULL, then up to comm_max characters are written there, 2173 // terminated with a zero unless the length is greater than comm_max. When any 2174 // of extra, name, or comment are not Z_NULL and the respective field is not 2175 // present in the header, then that field is set to Z_NULL to signal its 2176 // absence. This allows the use of deflateSetHeader() with the returned 2177 // structure to duplicate the header. However if those fields are set to 2178 // allocated memory, then the application will need to save those pointers 2179 // elsewhere so that they can be eventually freed. 2180 // 2181 // If inflateGetHeader is not used, then the header information is simply 2182 // discarded. The header is always checked for validity, including the header 2183 // CRC if present. inflateReset() will reset the process to discard the header 2184 // information. The application would need to call inflateGetHeader() again to 2185 // retrieve the header from the next gzip stream. 2186 // 2187 // inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source 2188 // stream state was inconsistent. 2189 2190 // 2191 // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, 2192 // unsigned char FAR *window)); 2193 // 2194 // Initialize the internal stream state for decompression using inflateBack() 2195 // calls. The fields zalloc, zfree and opaque in strm must be initialized 2196 // before the call. If zalloc and zfree are Z_NULL, then the default library- 2197 // derived memory allocation routines are used. windowBits is the base two 2198 // logarithm of the window size, in the range 8..15. window is a caller 2199 // supplied buffer of that size. Except for special applications where it is 2200 // assured that deflate was used with small window sizes, windowBits must be 15 2201 // and a 32K byte window must be supplied to be able to decompress general 2202 // deflate streams. 2203 // 2204 // See inflateBack() for the usage of these routines. 2205 // 2206 // inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of 2207 // the parameters are invalid, Z_MEM_ERROR if the internal state could not be 2208 // allocated, or Z_VERSION_ERROR if the version of the library does not match 2209 // the version of the header file. 2210 2211 type In_func = uintptr /* zlib.h:1092:18 */ 2212 type Out_func = uintptr /* zlib.h:1094:13 */ 2213 // 2214 // Same as uncompress, except that sourceLen is a pointer, where the 2215 // length of the source is *sourceLen. On return, *sourceLen is the number of 2216 // source bytes consumed. 2217 2218 // gzip file access functions 2219 2220 // 2221 // This library supports reading and writing files in gzip (.gz) format with 2222 // an interface similar to that of stdio, using the functions that start with 2223 // "gz". The gzip format is different from the zlib format. gzip is a gzip 2224 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 2225 2226 type GzFile_s = struct { 2227 Fhave uint32 2228 F__ccgo_pad1 [4]byte 2229 Fnext uintptr 2230 Fpos Off_t 2231 } /* zlib.h:1300:9 */ 2232 2233 // 2234 // Same as uncompress, except that sourceLen is a pointer, where the 2235 // length of the source is *sourceLen. On return, *sourceLen is the number of 2236 // source bytes consumed. 2237 2238 // gzip file access functions 2239 2240 // 2241 // This library supports reading and writing files in gzip (.gz) format with 2242 // an interface similar to that of stdio, using the functions that start with 2243 // "gz". The gzip format is different from the zlib format. gzip is a gzip 2244 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 2245 2246 type GzFile = uintptr /* zlib.h:1300:25 */ 2247 2248 // $OpenBSD: stddef.h,v 1.14 2017/01/06 14:36:50 kettenis Exp $ 2249 // $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ 2250 2251 // - 2252 // Copyright (c) 1990 The Regents of the University of California. 2253 // All rights reserved. 2254 // 2255 // Redistribution and use in source and binary forms, with or without 2256 // modification, are permitted provided that the following conditions 2257 // are met: 2258 // 1. Redistributions of source code must retain the above copyright 2259 // notice, this list of conditions and the following disclaimer. 2260 // 2. Redistributions in binary form must reproduce the above copyright 2261 // notice, this list of conditions and the following disclaimer in the 2262 // documentation and/or other materials provided with the distribution. 2263 // 3. Neither the name of the University nor the names of its contributors 2264 // may be used to endorse or promote products derived from this software 2265 // without specific prior written permission. 2266 // 2267 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2268 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2269 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2270 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2271 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2272 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2273 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2274 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2275 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2276 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2277 // SUCH DAMAGE. 2278 // 2279 // @(#)stddef.h 5.5 (Berkeley) 4/3/91 2280 2281 // $OpenBSD: string.h,v 1.32 2017/09/05 03:16:13 schwarze Exp $ 2282 // $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ 2283 2284 // - 2285 // Copyright (c) 1990 The Regents of the University of California. 2286 // All rights reserved. 2287 // 2288 // Redistribution and use in source and binary forms, with or without 2289 // modification, are permitted provided that the following conditions 2290 // are met: 2291 // 1. Redistributions of source code must retain the above copyright 2292 // notice, this list of conditions and the following disclaimer. 2293 // 2. Redistributions in binary form must reproduce the above copyright 2294 // notice, this list of conditions and the following disclaimer in the 2295 // documentation and/or other materials provided with the distribution. 2296 // 3. Neither the name of the University nor the names of its contributors 2297 // may be used to endorse or promote products derived from this software 2298 // without specific prior written permission. 2299 // 2300 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2301 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2302 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2303 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2304 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2305 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2306 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2307 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2308 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2309 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2310 // SUCH DAMAGE. 2311 // 2312 // @(#)string.h 5.10 (Berkeley) 3/9/91 2313 2314 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 2315 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 2316 2317 // Copyright (c) 1991, 1993 2318 // The Regents of the University of California. All rights reserved. 2319 // 2320 // This code is derived from software contributed to Berkeley by 2321 // Berkeley Software Design, Inc. 2322 // 2323 // Redistribution and use in source and binary forms, with or without 2324 // modification, are permitted provided that the following conditions 2325 // are met: 2326 // 1. Redistributions of source code must retain the above copyright 2327 // notice, this list of conditions and the following disclaimer. 2328 // 2. Redistributions in binary form must reproduce the above copyright 2329 // notice, this list of conditions and the following disclaimer in the 2330 // documentation and/or other materials provided with the distribution. 2331 // 3. Neither the name of the University nor the names of its contributors 2332 // may be used to endorse or promote products derived from this software 2333 // without specific prior written permission. 2334 // 2335 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2336 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2337 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2338 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2339 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2340 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2341 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2342 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2343 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2344 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2345 // SUCH DAMAGE. 2346 // 2347 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 2348 2349 // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ 2350 2351 // Written by Todd C. Miller, September 9, 2016 2352 // Public domain. 2353 2354 // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ 2355 // - 2356 // Copyright (c) 1990, 1993 2357 // The Regents of the University of California. All rights reserved. 2358 // 2359 // Redistribution and use in source and binary forms, with or without 2360 // modification, are permitted provided that the following conditions 2361 // are met: 2362 // 1. Redistributions of source code must retain the above copyright 2363 // notice, this list of conditions and the following disclaimer. 2364 // 2. Redistributions in binary form must reproduce the above copyright 2365 // notice, this list of conditions and the following disclaimer in the 2366 // documentation and/or other materials provided with the distribution. 2367 // 3. Neither the name of the University nor the names of its contributors 2368 // may be used to endorse or promote products derived from this software 2369 // without specific prior written permission. 2370 // 2371 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2372 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2373 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2374 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2375 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2376 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2377 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2378 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2379 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2380 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2381 // SUCH DAMAGE. 2382 // 2383 // @(#)types.h 8.3 (Berkeley) 1/5/94 2384 // @(#)ansi.h 8.2 (Berkeley) 1/4/94 2385 2386 // POSIX mandates that certain string functions not present in ISO C 2387 // be prototyped in strings.h. Historically, we've included them here. 2388 // $OpenBSD: strings.h,v 1.6 2017/09/10 21:50:36 schwarze Exp $ 2389 2390 // - 2391 // Copyright (c) 1990 The Regents of the University of California. 2392 // All rights reserved. 2393 // 2394 // Redistribution and use in source and binary forms, with or without 2395 // modification, are permitted provided that the following conditions 2396 // are met: 2397 // 1. Redistributions of source code must retain the above copyright 2398 // notice, this list of conditions and the following disclaimer. 2399 // 2. Redistributions in binary form must reproduce the above copyright 2400 // notice, this list of conditions and the following disclaimer in the 2401 // documentation and/or other materials provided with the distribution. 2402 // 3. Neither the name of the University nor the names of its contributors 2403 // may be used to endorse or promote products derived from this software 2404 // without specific prior written permission. 2405 // 2406 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2407 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2408 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2409 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2410 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2411 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2412 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2413 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2414 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2415 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2416 // SUCH DAMAGE. 2417 // 2418 // @(#)strings.h 5.8 (Berkeley) 5/15/90 2419 2420 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 2421 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 2422 2423 // Copyright (c) 1991, 1993 2424 // The Regents of the University of California. All rights reserved. 2425 // 2426 // This code is derived from software contributed to Berkeley by 2427 // Berkeley Software Design, Inc. 2428 // 2429 // Redistribution and use in source and binary forms, with or without 2430 // modification, are permitted provided that the following conditions 2431 // are met: 2432 // 1. Redistributions of source code must retain the above copyright 2433 // notice, this list of conditions and the following disclaimer. 2434 // 2. Redistributions in binary form must reproduce the above copyright 2435 // notice, this list of conditions and the following disclaimer in the 2436 // documentation and/or other materials provided with the distribution. 2437 // 3. Neither the name of the University nor the names of its contributors 2438 // may be used to endorse or promote products derived from this software 2439 // without specific prior written permission. 2440 // 2441 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2442 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2443 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2444 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2445 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2446 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2447 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2448 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2449 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2450 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2451 // SUCH DAMAGE. 2452 // 2453 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 2454 2455 // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ 2456 // - 2457 // Copyright (c) 1990, 1993 2458 // The Regents of the University of California. All rights reserved. 2459 // 2460 // Redistribution and use in source and binary forms, with or without 2461 // modification, are permitted provided that the following conditions 2462 // are met: 2463 // 1. Redistributions of source code must retain the above copyright 2464 // notice, this list of conditions and the following disclaimer. 2465 // 2. Redistributions in binary form must reproduce the above copyright 2466 // notice, this list of conditions and the following disclaimer in the 2467 // documentation and/or other materials provided with the distribution. 2468 // 3. Neither the name of the University nor the names of its contributors 2469 // may be used to endorse or promote products derived from this software 2470 // without specific prior written permission. 2471 // 2472 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2473 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2474 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2475 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2476 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2477 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2478 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2479 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2480 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2481 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2482 // SUCH DAMAGE. 2483 // 2484 // @(#)types.h 8.3 (Berkeley) 1/5/94 2485 // @(#)ansi.h 8.2 (Berkeley) 1/4/94 2486 2487 // POSIX mandates that certain string functions not present in ISO C 2488 // be prototyped in strings.h. 2489 2490 type Locale_t = uintptr /* strings.h:53:14 */ 2491 2492 // $OpenBSD: stdlib.h,v 1.76 2019/05/10 15:03:24 otto Exp $ 2493 // $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ 2494 2495 // - 2496 // Copyright (c) 1990 The Regents of the University of California. 2497 // All rights reserved. 2498 // 2499 // Redistribution and use in source and binary forms, with or without 2500 // modification, are permitted provided that the following conditions 2501 // are met: 2502 // 1. Redistributions of source code must retain the above copyright 2503 // notice, this list of conditions and the following disclaimer. 2504 // 2. Redistributions in binary form must reproduce the above copyright 2505 // notice, this list of conditions and the following disclaimer in the 2506 // documentation and/or other materials provided with the distribution. 2507 // 3. Neither the name of the University nor the names of its contributors 2508 // may be used to endorse or promote products derived from this software 2509 // without specific prior written permission. 2510 // 2511 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2512 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2513 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2514 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2515 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2516 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2517 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2518 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2519 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2520 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2521 // SUCH DAMAGE. 2522 // 2523 // @(#)stdlib.h 5.13 (Berkeley) 6/4/91 2524 2525 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 2526 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 2527 2528 // Copyright (c) 1991, 1993 2529 // The Regents of the University of California. All rights reserved. 2530 // 2531 // This code is derived from software contributed to Berkeley by 2532 // Berkeley Software Design, Inc. 2533 // 2534 // Redistribution and use in source and binary forms, with or without 2535 // modification, are permitted provided that the following conditions 2536 // are met: 2537 // 1. Redistributions of source code must retain the above copyright 2538 // notice, this list of conditions and the following disclaimer. 2539 // 2. Redistributions in binary form must reproduce the above copyright 2540 // notice, this list of conditions and the following disclaimer in the 2541 // documentation and/or other materials provided with the distribution. 2542 // 3. Neither the name of the University nor the names of its contributors 2543 // may be used to endorse or promote products derived from this software 2544 // without specific prior written permission. 2545 // 2546 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2547 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2548 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2549 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2550 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2551 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2552 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2553 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2554 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2555 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2556 // SUCH DAMAGE. 2557 // 2558 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 2559 2560 // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ 2561 2562 // Written by Todd C. Miller, September 9, 2016 2563 // Public domain. 2564 2565 // $OpenBSD: _types.h,v 1.4 2018/03/05 01:15:25 deraadt Exp $ 2566 // - 2567 // Copyright (c) 1990, 1993 2568 // The Regents of the University of California. All rights reserved. 2569 // 2570 // Redistribution and use in source and binary forms, with or without 2571 // modification, are permitted provided that the following conditions 2572 // are met: 2573 // 1. Redistributions of source code must retain the above copyright 2574 // notice, this list of conditions and the following disclaimer. 2575 // 2. Redistributions in binary form must reproduce the above copyright 2576 // notice, this list of conditions and the following disclaimer in the 2577 // documentation and/or other materials provided with the distribution. 2578 // 3. Neither the name of the University nor the names of its contributors 2579 // may be used to endorse or promote products derived from this software 2580 // without specific prior written permission. 2581 // 2582 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2583 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2584 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2585 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2586 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2587 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2588 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2589 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2590 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2591 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2592 // SUCH DAMAGE. 2593 // 2594 // @(#)types.h 8.3 (Berkeley) 1/5/94 2595 // @(#)ansi.h 8.2 (Berkeley) 1/4/94 2596 2597 // $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ 2598 // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ 2599 2600 // - 2601 // Copyright (c) 1982, 1986, 1991, 1993 2602 // The Regents of the University of California. All rights reserved. 2603 // (c) UNIX System Laboratories, Inc. 2604 // All or some portions of this file are derived from material licensed 2605 // to the University of California by American Telephone and Telegraph 2606 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 2607 // the permission of UNIX System Laboratories, Inc. 2608 // 2609 // Redistribution and use in source and binary forms, with or without 2610 // modification, are permitted provided that the following conditions 2611 // are met: 2612 // 1. Redistributions of source code must retain the above copyright 2613 // notice, this list of conditions and the following disclaimer. 2614 // 2. Redistributions in binary form must reproduce the above copyright 2615 // notice, this list of conditions and the following disclaimer in the 2616 // documentation and/or other materials provided with the distribution. 2617 // 3. Neither the name of the University nor the names of its contributors 2618 // may be used to endorse or promote products derived from this software 2619 // without specific prior written permission. 2620 // 2621 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2622 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2623 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2624 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2625 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2626 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2627 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2628 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2629 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2630 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2631 // SUCH DAMAGE. 2632 // 2633 // @(#)types.h 8.4 (Berkeley) 1/21/94 2634 2635 // in C++, wchar_t is a built-in type 2636 2637 type Div_t = struct { 2638 Fquot int32 2639 Frem int32 2640 } /* stdlib.h:59:3 */ 2641 2642 type Ldiv_t = struct { 2643 Fquot int64 2644 Frem int64 2645 } /* stdlib.h:64:3 */ 2646 2647 type Lldiv_t = struct { 2648 Fquot int64 2649 Frem int64 2650 } /* stdlib.h:70:3 */ 2651 2652 type Qdiv_t = struct { 2653 Fquot Quad_t 2654 Frem Quad_t 2655 } /* stdlib.h:77:3 */ 2656 2657 // since "static" is used to mean two completely different things in C, we 2658 // define "local" for the non-static meaning of "static", for readability 2659 // (compile with -Dlocal if your debugger can't find static symbols) 2660 2661 type Uch = uint8 /* zutil.h:43:24 */ 2662 type Uchf = Uch /* zutil.h:44:17 */ 2663 type Ush = uint16 /* zutil.h:45:24 */ 2664 type Ushf = Ush /* zutil.h:46:17 */ 2665 type Ulg = uint64 /* zutil.h:47:24 */ 2666 2667 // NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 2668 2669 // use NO_DIVIDE if your processor does not do division in hardware -- 2670 // try it both ways to see which is faster 2671 2672 // ========================================================================= 2673 func Xadler32_z(tls *libc.TLS, adler ULong, buf uintptr, len Z_size_t) ULong { /* adler32.c:63:15: */ 2674 var sum2 uint64 2675 var n uint32 2676 2677 // split Adler-32 into component sums 2678 sum2 = adler >> 16 & uint64(0xffff) 2679 adler = adler & uint64(0xffff) 2680 2681 // in case user likes doing a byte at a time, keep it fast 2682 if len == uint64(1) { 2683 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf))) 2684 if adler >= uint64(BASE) { 2685 adler = adler - uint64(BASE) 2686 } 2687 sum2 = sum2 + adler 2688 if sum2 >= uint64(BASE) { 2689 sum2 = sum2 - uint64(BASE) 2690 } 2691 return adler | sum2<<16 2692 } 2693 2694 // initial Adler-32 value (deferred check for len == 1 speed) 2695 if buf == uintptr(Z_NULL) { 2696 return uint64(1) 2697 } 2698 2699 // in case short lengths are provided, keep it somewhat fast 2700 if len < uint64(16) { 2701 for libc.PostDecUint64(&len, 1) != 0 { 2702 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))) 2703 sum2 = sum2 + adler 2704 } 2705 if adler >= uint64(BASE) { 2706 adler = adler - uint64(BASE) 2707 } 2708 sum2 = sum2 % uint64(BASE) // only added so many BASE's 2709 return adler | sum2<<16 2710 } 2711 2712 // do length NMAX blocks -- requires just one modulo operation 2713 for len >= uint64(NMAX) { 2714 len = len - uint64(NMAX) 2715 n = uint32(NMAX / 16) // NMAX is divisible by 16 2716 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 { 2717 { 2718 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf))) 2719 sum2 = sum2 + adler 2720 } 2721 { 2722 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 1))) 2723 sum2 = sum2 + adler 2724 } 2725 2726 { 2727 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 2))) 2728 sum2 = sum2 + adler 2729 } 2730 { 2731 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 3))) 2732 sum2 = sum2 + adler 2733 } 2734 2735 { 2736 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 4))) 2737 sum2 = sum2 + adler 2738 } 2739 { 2740 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 5))) 2741 sum2 = sum2 + adler 2742 } 2743 2744 { 2745 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 6))) 2746 sum2 = sum2 + adler 2747 } 2748 { 2749 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 7))) 2750 sum2 = sum2 + adler 2751 } 2752 2753 { 2754 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 8))) 2755 sum2 = sum2 + adler 2756 } 2757 { 2758 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 9))) 2759 sum2 = sum2 + adler 2760 } 2761 2762 { 2763 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 10))) 2764 sum2 = sum2 + adler 2765 } 2766 { 2767 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 11))) 2768 sum2 = sum2 + adler 2769 } 2770 2771 { 2772 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 12))) 2773 sum2 = sum2 + adler 2774 } 2775 { 2776 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 13))) 2777 sum2 = sum2 + adler 2778 } 2779 2780 { 2781 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 14))) 2782 sum2 = sum2 + adler 2783 } 2784 { 2785 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 15))) 2786 sum2 = sum2 + adler 2787 } 2788 2789 // 16 sums unrolled 2790 buf += uintptr(16) 2791 } 2792 adler = adler % uint64(BASE) 2793 sum2 = sum2 % uint64(BASE) 2794 } 2795 2796 // do remaining bytes (less than NMAX, still just one modulo) 2797 if len != 0 { // avoid modulos if none remaining 2798 for len >= uint64(16) { 2799 len = len - uint64(16) 2800 { 2801 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf))) 2802 sum2 = sum2 + adler 2803 } 2804 { 2805 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 1))) 2806 sum2 = sum2 + adler 2807 } 2808 2809 { 2810 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 2))) 2811 sum2 = sum2 + adler 2812 } 2813 { 2814 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 3))) 2815 sum2 = sum2 + adler 2816 } 2817 2818 { 2819 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 4))) 2820 sum2 = sum2 + adler 2821 } 2822 { 2823 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 5))) 2824 sum2 = sum2 + adler 2825 } 2826 2827 { 2828 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 6))) 2829 sum2 = sum2 + adler 2830 } 2831 { 2832 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 7))) 2833 sum2 = sum2 + adler 2834 } 2835 2836 { 2837 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 8))) 2838 sum2 = sum2 + adler 2839 } 2840 { 2841 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 9))) 2842 sum2 = sum2 + adler 2843 } 2844 2845 { 2846 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 10))) 2847 sum2 = sum2 + adler 2848 } 2849 { 2850 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 11))) 2851 sum2 = sum2 + adler 2852 } 2853 2854 { 2855 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 12))) 2856 sum2 = sum2 + adler 2857 } 2858 { 2859 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 13))) 2860 sum2 = sum2 + adler 2861 } 2862 2863 { 2864 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 14))) 2865 sum2 = sum2 + adler 2866 } 2867 { 2868 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 15))) 2869 sum2 = sum2 + adler 2870 } 2871 2872 buf += uintptr(16) 2873 } 2874 for libc.PostDecUint64(&len, 1) != 0 { 2875 adler = adler + ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))) 2876 sum2 = sum2 + adler 2877 } 2878 adler = adler % uint64(BASE) 2879 sum2 = sum2 % uint64(BASE) 2880 } 2881 2882 // return recombined sums 2883 return adler | sum2<<16 2884 } 2885 2886 // ========================================================================= 2887 func Xadler32(tls *libc.TLS, adler ULong, buf uintptr, len UInt) ULong { /* adler32.c:134:15: */ 2888 return Xadler32_z(tls, adler, buf, uint64(len)) 2889 } 2890 2891 // ========================================================================= 2892 func adler32_combine_(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:143:13: */ 2893 var sum1 uint64 2894 var sum2 uint64 2895 var rem uint32 2896 2897 // for negative len, return invalid adler32 as a clue for debugging 2898 if len2 < int64(0) { 2899 return 0xffffffff 2900 } 2901 2902 // the derivation of this formula is left as an exercise for the reader 2903 len2 = len2 % int64(BASE) // assumes len2 >= 0 2904 rem = uint32(len2) 2905 sum1 = adler1 & uint64(0xffff) 2906 sum2 = uint64(rem) * sum1 2907 sum2 = sum2 % uint64(BASE) 2908 sum1 = sum1 + (adler2&uint64(0xffff) + uint64(BASE) - uint64(1)) 2909 sum2 = sum2 + (adler1>>16&uint64(0xffff) + adler2>>16&uint64(0xffff) + uint64(BASE) - ULong(rem)) 2910 if sum1 >= uint64(BASE) { 2911 sum1 = sum1 - uint64(BASE) 2912 } 2913 if sum1 >= uint64(BASE) { 2914 sum1 = sum1 - uint64(BASE) 2915 } 2916 if sum2 >= uint64(uint64(BASE))<<1 { 2917 sum2 = sum2 - uint64(uint64(BASE))<<1 2918 } 2919 if sum2 >= uint64(BASE) { 2920 sum2 = sum2 - uint64(BASE) 2921 } 2922 return sum1 | sum2<<16 2923 } 2924 2925 // ========================================================================= 2926 func Xadler32_combine(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:172:15: */ 2927 return adler32_combine_(tls, adler1, adler2, len2) 2928 } 2929 2930 func Xadler32_combine64(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:180:15: */ 2931 return adler32_combine_(tls, adler1, adler2, len2) 2932 } 2933 2934 // =========================================================================== 2935 // 2936 // Compresses the source buffer into the destination buffer. The level 2937 // parameter has the same meaning as in deflateInit. sourceLen is the byte 2938 // length of the source buffer. Upon entry, destLen is the total size of the 2939 // destination buffer, which must be at least 0.1% larger than sourceLen plus 2940 // 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 2941 // 2942 // compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 2943 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, 2944 // Z_STREAM_ERROR if the level parameter is invalid. 2945 func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong, level int32) int32 { /* compress.c:22:13: */ 2946 bp := tls.Alloc(112) 2947 defer tls.Free(112) 2948 2949 // var stream Z_stream at bp, 112 2950 2951 var err int32 2952 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 2953 var left ULong 2954 2955 left = *(*ULongf)(unsafe.Pointer(destLen)) 2956 *(*ULongf)(unsafe.Pointer(destLen)) = uint64(0) 2957 2958 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzalloc = uintptr(0) 2959 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzfree = uintptr(0) 2960 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fopaque = uintptr(0) 2961 2962 err = XdeflateInit_(tls, bp, level, ts, int32(unsafe.Sizeof(Z_stream{}))) 2963 if err != Z_OK { 2964 return err 2965 } 2966 2967 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_out = dest 2968 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = UInt(0) 2969 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_in = source 2970 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = UInt(0) 2971 2972 for __ccgo := true; __ccgo; __ccgo = err == Z_OK { 2973 if (*Z_stream)(unsafe.Pointer(bp)).Favail_out == UInt(0) { 2974 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = func() uint32 { 2975 if left > ULong(max) { 2976 return max 2977 } 2978 return UInt(left) 2979 }() 2980 left = left - ULong((*Z_stream)(unsafe.Pointer(bp)).Favail_out) 2981 } 2982 if (*Z_stream)(unsafe.Pointer(bp)).Favail_in == UInt(0) { 2983 (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = func() uint32 { 2984 if sourceLen > ULong(max) { 2985 return max 2986 } 2987 return UInt(sourceLen) 2988 }() 2989 sourceLen = sourceLen - ULong((*Z_stream)(unsafe.Pointer(bp)).Favail_in) 2990 } 2991 err = Xdeflate(tls, bp, func() int32 { 2992 if sourceLen != 0 { 2993 return Z_NO_FLUSH 2994 } 2995 return Z_FINISH 2996 }()) 2997 } 2998 2999 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Ftotal_out 3000 XdeflateEnd(tls, bp) 3001 if err == Z_STREAM_END { 3002 return Z_OK 3003 } 3004 return err 3005 } 3006 3007 // =========================================================================== 3008 func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* compress.c:68:13: */ 3009 return Xcompress2(tls, dest, destLen, source, sourceLen, -1) 3010 } 3011 3012 // =========================================================================== 3013 // 3014 // If the default memLevel or windowBits for deflateInit() is changed, then 3015 // this function needs to be updated. 3016 func XcompressBound(tls *libc.TLS, sourceLen ULong) ULong { /* compress.c:81:15: */ 3017 return sourceLen + sourceLen>>12 + sourceLen>>14 + sourceLen>>25 + uint64(13) 3018 } 3019 3020 // ======================================================================== 3021 // Tables of CRC-32s of all single-byte values, made by make_crc_table(). 3022 // crc32.h -- tables for rapid CRC calculation 3023 // Generated automatically by crc32.c 3024 3025 var crc_table = [8][256]Z_crc_t{ 3026 { 3027 uint32(0x00000000), uint32(0x77073096), uint32(0xee0e612c), uint32(0x990951ba), uint32(0x076dc419), 3028 uint32(0x706af48f), uint32(0xe963a535), uint32(0x9e6495a3), uint32(0x0edb8832), uint32(0x79dcb8a4), 3029 uint32(0xe0d5e91e), uint32(0x97d2d988), uint32(0x09b64c2b), uint32(0x7eb17cbd), uint32(0xe7b82d07), 3030 uint32(0x90bf1d91), uint32(0x1db71064), uint32(0x6ab020f2), uint32(0xf3b97148), uint32(0x84be41de), 3031 uint32(0x1adad47d), uint32(0x6ddde4eb), uint32(0xf4d4b551), uint32(0x83d385c7), uint32(0x136c9856), 3032 uint32(0x646ba8c0), uint32(0xfd62f97a), uint32(0x8a65c9ec), uint32(0x14015c4f), uint32(0x63066cd9), 3033 uint32(0xfa0f3d63), uint32(0x8d080df5), uint32(0x3b6e20c8), uint32(0x4c69105e), uint32(0xd56041e4), 3034 uint32(0xa2677172), uint32(0x3c03e4d1), uint32(0x4b04d447), uint32(0xd20d85fd), uint32(0xa50ab56b), 3035 uint32(0x35b5a8fa), uint32(0x42b2986c), uint32(0xdbbbc9d6), uint32(0xacbcf940), uint32(0x32d86ce3), 3036 uint32(0x45df5c75), uint32(0xdcd60dcf), uint32(0xabd13d59), uint32(0x26d930ac), uint32(0x51de003a), 3037 uint32(0xc8d75180), uint32(0xbfd06116), uint32(0x21b4f4b5), uint32(0x56b3c423), uint32(0xcfba9599), 3038 uint32(0xb8bda50f), uint32(0x2802b89e), uint32(0x5f058808), uint32(0xc60cd9b2), uint32(0xb10be924), 3039 uint32(0x2f6f7c87), uint32(0x58684c11), uint32(0xc1611dab), uint32(0xb6662d3d), uint32(0x76dc4190), 3040 uint32(0x01db7106), uint32(0x98d220bc), uint32(0xefd5102a), uint32(0x71b18589), uint32(0x06b6b51f), 3041 uint32(0x9fbfe4a5), uint32(0xe8b8d433), uint32(0x7807c9a2), uint32(0x0f00f934), uint32(0x9609a88e), 3042 uint32(0xe10e9818), uint32(0x7f6a0dbb), uint32(0x086d3d2d), uint32(0x91646c97), uint32(0xe6635c01), 3043 uint32(0x6b6b51f4), uint32(0x1c6c6162), uint32(0x856530d8), uint32(0xf262004e), uint32(0x6c0695ed), 3044 uint32(0x1b01a57b), uint32(0x8208f4c1), uint32(0xf50fc457), uint32(0x65b0d9c6), uint32(0x12b7e950), 3045 uint32(0x8bbeb8ea), uint32(0xfcb9887c), uint32(0x62dd1ddf), uint32(0x15da2d49), uint32(0x8cd37cf3), 3046 uint32(0xfbd44c65), uint32(0x4db26158), uint32(0x3ab551ce), uint32(0xa3bc0074), uint32(0xd4bb30e2), 3047 uint32(0x4adfa541), uint32(0x3dd895d7), uint32(0xa4d1c46d), uint32(0xd3d6f4fb), uint32(0x4369e96a), 3048 uint32(0x346ed9fc), uint32(0xad678846), uint32(0xda60b8d0), uint32(0x44042d73), uint32(0x33031de5), 3049 uint32(0xaa0a4c5f), uint32(0xdd0d7cc9), uint32(0x5005713c), uint32(0x270241aa), uint32(0xbe0b1010), 3050 uint32(0xc90c2086), uint32(0x5768b525), uint32(0x206f85b3), uint32(0xb966d409), uint32(0xce61e49f), 3051 uint32(0x5edef90e), uint32(0x29d9c998), uint32(0xb0d09822), uint32(0xc7d7a8b4), uint32(0x59b33d17), 3052 uint32(0x2eb40d81), uint32(0xb7bd5c3b), uint32(0xc0ba6cad), uint32(0xedb88320), uint32(0x9abfb3b6), 3053 uint32(0x03b6e20c), uint32(0x74b1d29a), uint32(0xead54739), uint32(0x9dd277af), uint32(0x04db2615), 3054 uint32(0x73dc1683), uint32(0xe3630b12), uint32(0x94643b84), uint32(0x0d6d6a3e), uint32(0x7a6a5aa8), 3055 uint32(0xe40ecf0b), uint32(0x9309ff9d), uint32(0x0a00ae27), uint32(0x7d079eb1), uint32(0xf00f9344), 3056 uint32(0x8708a3d2), uint32(0x1e01f268), uint32(0x6906c2fe), uint32(0xf762575d), uint32(0x806567cb), 3057 uint32(0x196c3671), uint32(0x6e6b06e7), uint32(0xfed41b76), uint32(0x89d32be0), uint32(0x10da7a5a), 3058 uint32(0x67dd4acc), uint32(0xf9b9df6f), uint32(0x8ebeeff9), uint32(0x17b7be43), uint32(0x60b08ed5), 3059 uint32(0xd6d6a3e8), uint32(0xa1d1937e), uint32(0x38d8c2c4), uint32(0x4fdff252), uint32(0xd1bb67f1), 3060 uint32(0xa6bc5767), uint32(0x3fb506dd), uint32(0x48b2364b), uint32(0xd80d2bda), uint32(0xaf0a1b4c), 3061 uint32(0x36034af6), uint32(0x41047a60), uint32(0xdf60efc3), uint32(0xa867df55), uint32(0x316e8eef), 3062 uint32(0x4669be79), uint32(0xcb61b38c), uint32(0xbc66831a), uint32(0x256fd2a0), uint32(0x5268e236), 3063 uint32(0xcc0c7795), uint32(0xbb0b4703), uint32(0x220216b9), uint32(0x5505262f), uint32(0xc5ba3bbe), 3064 uint32(0xb2bd0b28), uint32(0x2bb45a92), uint32(0x5cb36a04), uint32(0xc2d7ffa7), uint32(0xb5d0cf31), 3065 uint32(0x2cd99e8b), uint32(0x5bdeae1d), uint32(0x9b64c2b0), uint32(0xec63f226), uint32(0x756aa39c), 3066 uint32(0x026d930a), uint32(0x9c0906a9), uint32(0xeb0e363f), uint32(0x72076785), uint32(0x05005713), 3067 uint32(0x95bf4a82), uint32(0xe2b87a14), uint32(0x7bb12bae), uint32(0x0cb61b38), uint32(0x92d28e9b), 3068 uint32(0xe5d5be0d), uint32(0x7cdcefb7), uint32(0x0bdbdf21), uint32(0x86d3d2d4), uint32(0xf1d4e242), 3069 uint32(0x68ddb3f8), uint32(0x1fda836e), uint32(0x81be16cd), uint32(0xf6b9265b), uint32(0x6fb077e1), 3070 uint32(0x18b74777), uint32(0x88085ae6), uint32(0xff0f6a70), uint32(0x66063bca), uint32(0x11010b5c), 3071 uint32(0x8f659eff), uint32(0xf862ae69), uint32(0x616bffd3), uint32(0x166ccf45), uint32(0xa00ae278), 3072 uint32(0xd70dd2ee), uint32(0x4e048354), uint32(0x3903b3c2), uint32(0xa7672661), uint32(0xd06016f7), 3073 uint32(0x4969474d), uint32(0x3e6e77db), uint32(0xaed16a4a), uint32(0xd9d65adc), uint32(0x40df0b66), 3074 uint32(0x37d83bf0), uint32(0xa9bcae53), uint32(0xdebb9ec5), uint32(0x47b2cf7f), uint32(0x30b5ffe9), 3075 uint32(0xbdbdf21c), uint32(0xcabac28a), uint32(0x53b39330), uint32(0x24b4a3a6), uint32(0xbad03605), 3076 uint32(0xcdd70693), uint32(0x54de5729), uint32(0x23d967bf), uint32(0xb3667a2e), uint32(0xc4614ab8), 3077 uint32(0x5d681b02), uint32(0x2a6f2b94), uint32(0xb40bbe37), uint32(0xc30c8ea1), uint32(0x5a05df1b), 3078 uint32(0x2d02ef8d), 3079 }, 3080 { 3081 uint32(0x00000000), uint32(0x191b3141), uint32(0x32366282), uint32(0x2b2d53c3), uint32(0x646cc504), 3082 uint32(0x7d77f445), uint32(0x565aa786), uint32(0x4f4196c7), uint32(0xc8d98a08), uint32(0xd1c2bb49), 3083 uint32(0xfaefe88a), uint32(0xe3f4d9cb), uint32(0xacb54f0c), uint32(0xb5ae7e4d), uint32(0x9e832d8e), 3084 uint32(0x87981ccf), uint32(0x4ac21251), uint32(0x53d92310), uint32(0x78f470d3), uint32(0x61ef4192), 3085 uint32(0x2eaed755), uint32(0x37b5e614), uint32(0x1c98b5d7), uint32(0x05838496), uint32(0x821b9859), 3086 uint32(0x9b00a918), uint32(0xb02dfadb), uint32(0xa936cb9a), uint32(0xe6775d5d), uint32(0xff6c6c1c), 3087 uint32(0xd4413fdf), uint32(0xcd5a0e9e), uint32(0x958424a2), uint32(0x8c9f15e3), uint32(0xa7b24620), 3088 uint32(0xbea97761), uint32(0xf1e8e1a6), uint32(0xe8f3d0e7), uint32(0xc3de8324), uint32(0xdac5b265), 3089 uint32(0x5d5daeaa), uint32(0x44469feb), uint32(0x6f6bcc28), uint32(0x7670fd69), uint32(0x39316bae), 3090 uint32(0x202a5aef), uint32(0x0b07092c), uint32(0x121c386d), uint32(0xdf4636f3), uint32(0xc65d07b2), 3091 uint32(0xed705471), uint32(0xf46b6530), uint32(0xbb2af3f7), uint32(0xa231c2b6), uint32(0x891c9175), 3092 uint32(0x9007a034), uint32(0x179fbcfb), uint32(0x0e848dba), uint32(0x25a9de79), uint32(0x3cb2ef38), 3093 uint32(0x73f379ff), uint32(0x6ae848be), uint32(0x41c51b7d), uint32(0x58de2a3c), uint32(0xf0794f05), 3094 uint32(0xe9627e44), uint32(0xc24f2d87), uint32(0xdb541cc6), uint32(0x94158a01), uint32(0x8d0ebb40), 3095 uint32(0xa623e883), uint32(0xbf38d9c2), uint32(0x38a0c50d), uint32(0x21bbf44c), uint32(0x0a96a78f), 3096 uint32(0x138d96ce), uint32(0x5ccc0009), uint32(0x45d73148), uint32(0x6efa628b), uint32(0x77e153ca), 3097 uint32(0xbabb5d54), uint32(0xa3a06c15), uint32(0x888d3fd6), uint32(0x91960e97), uint32(0xded79850), 3098 uint32(0xc7cca911), uint32(0xece1fad2), uint32(0xf5facb93), uint32(0x7262d75c), uint32(0x6b79e61d), 3099 uint32(0x4054b5de), uint32(0x594f849f), uint32(0x160e1258), uint32(0x0f152319), uint32(0x243870da), 3100 uint32(0x3d23419b), uint32(0x65fd6ba7), uint32(0x7ce65ae6), uint32(0x57cb0925), uint32(0x4ed03864), 3101 uint32(0x0191aea3), uint32(0x188a9fe2), uint32(0x33a7cc21), uint32(0x2abcfd60), uint32(0xad24e1af), 3102 uint32(0xb43fd0ee), uint32(0x9f12832d), uint32(0x8609b26c), uint32(0xc94824ab), uint32(0xd05315ea), 3103 uint32(0xfb7e4629), uint32(0xe2657768), uint32(0x2f3f79f6), uint32(0x362448b7), uint32(0x1d091b74), 3104 uint32(0x04122a35), uint32(0x4b53bcf2), uint32(0x52488db3), uint32(0x7965de70), uint32(0x607eef31), 3105 uint32(0xe7e6f3fe), uint32(0xfefdc2bf), uint32(0xd5d0917c), uint32(0xcccba03d), uint32(0x838a36fa), 3106 uint32(0x9a9107bb), uint32(0xb1bc5478), uint32(0xa8a76539), uint32(0x3b83984b), uint32(0x2298a90a), 3107 uint32(0x09b5fac9), uint32(0x10aecb88), uint32(0x5fef5d4f), uint32(0x46f46c0e), uint32(0x6dd93fcd), 3108 uint32(0x74c20e8c), uint32(0xf35a1243), uint32(0xea412302), uint32(0xc16c70c1), uint32(0xd8774180), 3109 uint32(0x9736d747), uint32(0x8e2de606), uint32(0xa500b5c5), uint32(0xbc1b8484), uint32(0x71418a1a), 3110 uint32(0x685abb5b), uint32(0x4377e898), uint32(0x5a6cd9d9), uint32(0x152d4f1e), uint32(0x0c367e5f), 3111 uint32(0x271b2d9c), uint32(0x3e001cdd), uint32(0xb9980012), uint32(0xa0833153), uint32(0x8bae6290), 3112 uint32(0x92b553d1), uint32(0xddf4c516), uint32(0xc4eff457), uint32(0xefc2a794), uint32(0xf6d996d5), 3113 uint32(0xae07bce9), uint32(0xb71c8da8), uint32(0x9c31de6b), uint32(0x852aef2a), uint32(0xca6b79ed), 3114 uint32(0xd37048ac), uint32(0xf85d1b6f), uint32(0xe1462a2e), uint32(0x66de36e1), uint32(0x7fc507a0), 3115 uint32(0x54e85463), uint32(0x4df36522), uint32(0x02b2f3e5), uint32(0x1ba9c2a4), uint32(0x30849167), 3116 uint32(0x299fa026), uint32(0xe4c5aeb8), uint32(0xfdde9ff9), uint32(0xd6f3cc3a), uint32(0xcfe8fd7b), 3117 uint32(0x80a96bbc), uint32(0x99b25afd), uint32(0xb29f093e), uint32(0xab84387f), uint32(0x2c1c24b0), 3118 uint32(0x350715f1), uint32(0x1e2a4632), uint32(0x07317773), uint32(0x4870e1b4), uint32(0x516bd0f5), 3119 uint32(0x7a468336), uint32(0x635db277), uint32(0xcbfad74e), uint32(0xd2e1e60f), uint32(0xf9ccb5cc), 3120 uint32(0xe0d7848d), uint32(0xaf96124a), uint32(0xb68d230b), uint32(0x9da070c8), uint32(0x84bb4189), 3121 uint32(0x03235d46), uint32(0x1a386c07), uint32(0x31153fc4), uint32(0x280e0e85), uint32(0x674f9842), 3122 uint32(0x7e54a903), uint32(0x5579fac0), uint32(0x4c62cb81), uint32(0x8138c51f), uint32(0x9823f45e), 3123 uint32(0xb30ea79d), uint32(0xaa1596dc), uint32(0xe554001b), uint32(0xfc4f315a), uint32(0xd7626299), 3124 uint32(0xce7953d8), uint32(0x49e14f17), uint32(0x50fa7e56), uint32(0x7bd72d95), uint32(0x62cc1cd4), 3125 uint32(0x2d8d8a13), uint32(0x3496bb52), uint32(0x1fbbe891), uint32(0x06a0d9d0), uint32(0x5e7ef3ec), 3126 uint32(0x4765c2ad), uint32(0x6c48916e), uint32(0x7553a02f), uint32(0x3a1236e8), uint32(0x230907a9), 3127 uint32(0x0824546a), uint32(0x113f652b), uint32(0x96a779e4), uint32(0x8fbc48a5), uint32(0xa4911b66), 3128 uint32(0xbd8a2a27), uint32(0xf2cbbce0), uint32(0xebd08da1), uint32(0xc0fdde62), uint32(0xd9e6ef23), 3129 uint32(0x14bce1bd), uint32(0x0da7d0fc), uint32(0x268a833f), uint32(0x3f91b27e), uint32(0x70d024b9), 3130 uint32(0x69cb15f8), uint32(0x42e6463b), uint32(0x5bfd777a), uint32(0xdc656bb5), uint32(0xc57e5af4), 3131 uint32(0xee530937), uint32(0xf7483876), uint32(0xb809aeb1), uint32(0xa1129ff0), uint32(0x8a3fcc33), 3132 uint32(0x9324fd72), 3133 }, 3134 { 3135 uint32(0x00000000), uint32(0x01c26a37), uint32(0x0384d46e), uint32(0x0246be59), uint32(0x0709a8dc), 3136 uint32(0x06cbc2eb), uint32(0x048d7cb2), uint32(0x054f1685), uint32(0x0e1351b8), uint32(0x0fd13b8f), 3137 uint32(0x0d9785d6), uint32(0x0c55efe1), uint32(0x091af964), uint32(0x08d89353), uint32(0x0a9e2d0a), 3138 uint32(0x0b5c473d), uint32(0x1c26a370), uint32(0x1de4c947), uint32(0x1fa2771e), uint32(0x1e601d29), 3139 uint32(0x1b2f0bac), uint32(0x1aed619b), uint32(0x18abdfc2), uint32(0x1969b5f5), uint32(0x1235f2c8), 3140 uint32(0x13f798ff), uint32(0x11b126a6), uint32(0x10734c91), uint32(0x153c5a14), uint32(0x14fe3023), 3141 uint32(0x16b88e7a), uint32(0x177ae44d), uint32(0x384d46e0), uint32(0x398f2cd7), uint32(0x3bc9928e), 3142 uint32(0x3a0bf8b9), uint32(0x3f44ee3c), uint32(0x3e86840b), uint32(0x3cc03a52), uint32(0x3d025065), 3143 uint32(0x365e1758), uint32(0x379c7d6f), uint32(0x35dac336), uint32(0x3418a901), uint32(0x3157bf84), 3144 uint32(0x3095d5b3), uint32(0x32d36bea), uint32(0x331101dd), uint32(0x246be590), uint32(0x25a98fa7), 3145 uint32(0x27ef31fe), uint32(0x262d5bc9), uint32(0x23624d4c), uint32(0x22a0277b), uint32(0x20e69922), 3146 uint32(0x2124f315), uint32(0x2a78b428), uint32(0x2bbade1f), uint32(0x29fc6046), uint32(0x283e0a71), 3147 uint32(0x2d711cf4), uint32(0x2cb376c3), uint32(0x2ef5c89a), uint32(0x2f37a2ad), uint32(0x709a8dc0), 3148 uint32(0x7158e7f7), uint32(0x731e59ae), uint32(0x72dc3399), uint32(0x7793251c), uint32(0x76514f2b), 3149 uint32(0x7417f172), uint32(0x75d59b45), uint32(0x7e89dc78), uint32(0x7f4bb64f), uint32(0x7d0d0816), 3150 uint32(0x7ccf6221), uint32(0x798074a4), uint32(0x78421e93), uint32(0x7a04a0ca), uint32(0x7bc6cafd), 3151 uint32(0x6cbc2eb0), uint32(0x6d7e4487), uint32(0x6f38fade), uint32(0x6efa90e9), uint32(0x6bb5866c), 3152 uint32(0x6a77ec5b), uint32(0x68315202), uint32(0x69f33835), uint32(0x62af7f08), uint32(0x636d153f), 3153 uint32(0x612bab66), uint32(0x60e9c151), uint32(0x65a6d7d4), uint32(0x6464bde3), uint32(0x662203ba), 3154 uint32(0x67e0698d), uint32(0x48d7cb20), uint32(0x4915a117), uint32(0x4b531f4e), uint32(0x4a917579), 3155 uint32(0x4fde63fc), uint32(0x4e1c09cb), uint32(0x4c5ab792), uint32(0x4d98dda5), uint32(0x46c49a98), 3156 uint32(0x4706f0af), uint32(0x45404ef6), uint32(0x448224c1), uint32(0x41cd3244), uint32(0x400f5873), 3157 uint32(0x4249e62a), uint32(0x438b8c1d), uint32(0x54f16850), uint32(0x55330267), uint32(0x5775bc3e), 3158 uint32(0x56b7d609), uint32(0x53f8c08c), uint32(0x523aaabb), uint32(0x507c14e2), uint32(0x51be7ed5), 3159 uint32(0x5ae239e8), uint32(0x5b2053df), uint32(0x5966ed86), uint32(0x58a487b1), uint32(0x5deb9134), 3160 uint32(0x5c29fb03), uint32(0x5e6f455a), uint32(0x5fad2f6d), uint32(0xe1351b80), uint32(0xe0f771b7), 3161 uint32(0xe2b1cfee), uint32(0xe373a5d9), uint32(0xe63cb35c), uint32(0xe7fed96b), uint32(0xe5b86732), 3162 uint32(0xe47a0d05), uint32(0xef264a38), uint32(0xeee4200f), uint32(0xeca29e56), uint32(0xed60f461), 3163 uint32(0xe82fe2e4), uint32(0xe9ed88d3), uint32(0xebab368a), uint32(0xea695cbd), uint32(0xfd13b8f0), 3164 uint32(0xfcd1d2c7), uint32(0xfe976c9e), uint32(0xff5506a9), uint32(0xfa1a102c), uint32(0xfbd87a1b), 3165 uint32(0xf99ec442), uint32(0xf85cae75), uint32(0xf300e948), uint32(0xf2c2837f), uint32(0xf0843d26), 3166 uint32(0xf1465711), uint32(0xf4094194), uint32(0xf5cb2ba3), uint32(0xf78d95fa), uint32(0xf64fffcd), 3167 uint32(0xd9785d60), uint32(0xd8ba3757), uint32(0xdafc890e), uint32(0xdb3ee339), uint32(0xde71f5bc), 3168 uint32(0xdfb39f8b), uint32(0xddf521d2), uint32(0xdc374be5), uint32(0xd76b0cd8), uint32(0xd6a966ef), 3169 uint32(0xd4efd8b6), uint32(0xd52db281), uint32(0xd062a404), uint32(0xd1a0ce33), uint32(0xd3e6706a), 3170 uint32(0xd2241a5d), uint32(0xc55efe10), uint32(0xc49c9427), uint32(0xc6da2a7e), uint32(0xc7184049), 3171 uint32(0xc25756cc), uint32(0xc3953cfb), uint32(0xc1d382a2), uint32(0xc011e895), uint32(0xcb4dafa8), 3172 uint32(0xca8fc59f), uint32(0xc8c97bc6), uint32(0xc90b11f1), uint32(0xcc440774), uint32(0xcd866d43), 3173 uint32(0xcfc0d31a), uint32(0xce02b92d), uint32(0x91af9640), uint32(0x906dfc77), uint32(0x922b422e), 3174 uint32(0x93e92819), uint32(0x96a63e9c), uint32(0x976454ab), uint32(0x9522eaf2), uint32(0x94e080c5), 3175 uint32(0x9fbcc7f8), uint32(0x9e7eadcf), uint32(0x9c381396), uint32(0x9dfa79a1), uint32(0x98b56f24), 3176 uint32(0x99770513), uint32(0x9b31bb4a), uint32(0x9af3d17d), uint32(0x8d893530), uint32(0x8c4b5f07), 3177 uint32(0x8e0de15e), uint32(0x8fcf8b69), uint32(0x8a809dec), uint32(0x8b42f7db), uint32(0x89044982), 3178 uint32(0x88c623b5), uint32(0x839a6488), uint32(0x82580ebf), uint32(0x801eb0e6), uint32(0x81dcdad1), 3179 uint32(0x8493cc54), uint32(0x8551a663), uint32(0x8717183a), uint32(0x86d5720d), uint32(0xa9e2d0a0), 3180 uint32(0xa820ba97), uint32(0xaa6604ce), uint32(0xaba46ef9), uint32(0xaeeb787c), uint32(0xaf29124b), 3181 uint32(0xad6fac12), uint32(0xacadc625), uint32(0xa7f18118), uint32(0xa633eb2f), uint32(0xa4755576), 3182 uint32(0xa5b73f41), uint32(0xa0f829c4), uint32(0xa13a43f3), uint32(0xa37cfdaa), uint32(0xa2be979d), 3183 uint32(0xb5c473d0), uint32(0xb40619e7), uint32(0xb640a7be), uint32(0xb782cd89), uint32(0xb2cddb0c), 3184 uint32(0xb30fb13b), uint32(0xb1490f62), uint32(0xb08b6555), uint32(0xbbd72268), uint32(0xba15485f), 3185 uint32(0xb853f606), uint32(0xb9919c31), uint32(0xbcde8ab4), uint32(0xbd1ce083), uint32(0xbf5a5eda), 3186 uint32(0xbe9834ed), 3187 }, 3188 { 3189 uint32(0x00000000), uint32(0xb8bc6765), uint32(0xaa09c88b), uint32(0x12b5afee), uint32(0x8f629757), 3190 uint32(0x37def032), uint32(0x256b5fdc), uint32(0x9dd738b9), uint32(0xc5b428ef), uint32(0x7d084f8a), 3191 uint32(0x6fbde064), uint32(0xd7018701), uint32(0x4ad6bfb8), uint32(0xf26ad8dd), uint32(0xe0df7733), 3192 uint32(0x58631056), uint32(0x5019579f), uint32(0xe8a530fa), uint32(0xfa109f14), uint32(0x42acf871), 3193 uint32(0xdf7bc0c8), uint32(0x67c7a7ad), uint32(0x75720843), uint32(0xcdce6f26), uint32(0x95ad7f70), 3194 uint32(0x2d111815), uint32(0x3fa4b7fb), uint32(0x8718d09e), uint32(0x1acfe827), uint32(0xa2738f42), 3195 uint32(0xb0c620ac), uint32(0x087a47c9), uint32(0xa032af3e), uint32(0x188ec85b), uint32(0x0a3b67b5), 3196 uint32(0xb28700d0), uint32(0x2f503869), uint32(0x97ec5f0c), uint32(0x8559f0e2), uint32(0x3de59787), 3197 uint32(0x658687d1), uint32(0xdd3ae0b4), uint32(0xcf8f4f5a), uint32(0x7733283f), uint32(0xeae41086), 3198 uint32(0x525877e3), uint32(0x40edd80d), uint32(0xf851bf68), uint32(0xf02bf8a1), uint32(0x48979fc4), 3199 uint32(0x5a22302a), uint32(0xe29e574f), uint32(0x7f496ff6), uint32(0xc7f50893), uint32(0xd540a77d), 3200 uint32(0x6dfcc018), uint32(0x359fd04e), uint32(0x8d23b72b), uint32(0x9f9618c5), uint32(0x272a7fa0), 3201 uint32(0xbafd4719), uint32(0x0241207c), uint32(0x10f48f92), uint32(0xa848e8f7), uint32(0x9b14583d), 3202 uint32(0x23a83f58), uint32(0x311d90b6), uint32(0x89a1f7d3), uint32(0x1476cf6a), uint32(0xaccaa80f), 3203 uint32(0xbe7f07e1), uint32(0x06c36084), uint32(0x5ea070d2), uint32(0xe61c17b7), uint32(0xf4a9b859), 3204 uint32(0x4c15df3c), uint32(0xd1c2e785), uint32(0x697e80e0), uint32(0x7bcb2f0e), uint32(0xc377486b), 3205 uint32(0xcb0d0fa2), uint32(0x73b168c7), uint32(0x6104c729), uint32(0xd9b8a04c), uint32(0x446f98f5), 3206 uint32(0xfcd3ff90), uint32(0xee66507e), uint32(0x56da371b), uint32(0x0eb9274d), uint32(0xb6054028), 3207 uint32(0xa4b0efc6), uint32(0x1c0c88a3), uint32(0x81dbb01a), uint32(0x3967d77f), uint32(0x2bd27891), 3208 uint32(0x936e1ff4), uint32(0x3b26f703), uint32(0x839a9066), uint32(0x912f3f88), uint32(0x299358ed), 3209 uint32(0xb4446054), uint32(0x0cf80731), uint32(0x1e4da8df), uint32(0xa6f1cfba), uint32(0xfe92dfec), 3210 uint32(0x462eb889), uint32(0x549b1767), uint32(0xec277002), uint32(0x71f048bb), uint32(0xc94c2fde), 3211 uint32(0xdbf98030), uint32(0x6345e755), uint32(0x6b3fa09c), uint32(0xd383c7f9), uint32(0xc1366817), 3212 uint32(0x798a0f72), uint32(0xe45d37cb), uint32(0x5ce150ae), uint32(0x4e54ff40), uint32(0xf6e89825), 3213 uint32(0xae8b8873), uint32(0x1637ef16), uint32(0x048240f8), uint32(0xbc3e279d), uint32(0x21e91f24), 3214 uint32(0x99557841), uint32(0x8be0d7af), uint32(0x335cb0ca), uint32(0xed59b63b), uint32(0x55e5d15e), 3215 uint32(0x47507eb0), uint32(0xffec19d5), uint32(0x623b216c), uint32(0xda874609), uint32(0xc832e9e7), 3216 uint32(0x708e8e82), uint32(0x28ed9ed4), uint32(0x9051f9b1), uint32(0x82e4565f), uint32(0x3a58313a), 3217 uint32(0xa78f0983), uint32(0x1f336ee6), uint32(0x0d86c108), uint32(0xb53aa66d), uint32(0xbd40e1a4), 3218 uint32(0x05fc86c1), uint32(0x1749292f), uint32(0xaff54e4a), uint32(0x322276f3), uint32(0x8a9e1196), 3219 uint32(0x982bbe78), uint32(0x2097d91d), uint32(0x78f4c94b), uint32(0xc048ae2e), uint32(0xd2fd01c0), 3220 uint32(0x6a4166a5), uint32(0xf7965e1c), uint32(0x4f2a3979), uint32(0x5d9f9697), uint32(0xe523f1f2), 3221 uint32(0x4d6b1905), uint32(0xf5d77e60), uint32(0xe762d18e), uint32(0x5fdeb6eb), uint32(0xc2098e52), 3222 uint32(0x7ab5e937), uint32(0x680046d9), uint32(0xd0bc21bc), uint32(0x88df31ea), uint32(0x3063568f), 3223 uint32(0x22d6f961), uint32(0x9a6a9e04), uint32(0x07bda6bd), uint32(0xbf01c1d8), uint32(0xadb46e36), 3224 uint32(0x15080953), uint32(0x1d724e9a), uint32(0xa5ce29ff), uint32(0xb77b8611), uint32(0x0fc7e174), 3225 uint32(0x9210d9cd), uint32(0x2aacbea8), uint32(0x38191146), uint32(0x80a57623), uint32(0xd8c66675), 3226 uint32(0x607a0110), uint32(0x72cfaefe), uint32(0xca73c99b), uint32(0x57a4f122), uint32(0xef189647), 3227 uint32(0xfdad39a9), uint32(0x45115ecc), uint32(0x764dee06), uint32(0xcef18963), uint32(0xdc44268d), 3228 uint32(0x64f841e8), uint32(0xf92f7951), uint32(0x41931e34), uint32(0x5326b1da), uint32(0xeb9ad6bf), 3229 uint32(0xb3f9c6e9), uint32(0x0b45a18c), uint32(0x19f00e62), uint32(0xa14c6907), uint32(0x3c9b51be), 3230 uint32(0x842736db), uint32(0x96929935), uint32(0x2e2efe50), uint32(0x2654b999), uint32(0x9ee8defc), 3231 uint32(0x8c5d7112), uint32(0x34e11677), uint32(0xa9362ece), uint32(0x118a49ab), uint32(0x033fe645), 3232 uint32(0xbb838120), uint32(0xe3e09176), uint32(0x5b5cf613), uint32(0x49e959fd), uint32(0xf1553e98), 3233 uint32(0x6c820621), uint32(0xd43e6144), uint32(0xc68bceaa), uint32(0x7e37a9cf), uint32(0xd67f4138), 3234 uint32(0x6ec3265d), uint32(0x7c7689b3), uint32(0xc4caeed6), uint32(0x591dd66f), uint32(0xe1a1b10a), 3235 uint32(0xf3141ee4), uint32(0x4ba87981), uint32(0x13cb69d7), uint32(0xab770eb2), uint32(0xb9c2a15c), 3236 uint32(0x017ec639), uint32(0x9ca9fe80), uint32(0x241599e5), uint32(0x36a0360b), uint32(0x8e1c516e), 3237 uint32(0x866616a7), uint32(0x3eda71c2), uint32(0x2c6fde2c), uint32(0x94d3b949), uint32(0x090481f0), 3238 uint32(0xb1b8e695), uint32(0xa30d497b), uint32(0x1bb12e1e), uint32(0x43d23e48), uint32(0xfb6e592d), 3239 uint32(0xe9dbf6c3), uint32(0x516791a6), uint32(0xccb0a91f), uint32(0x740cce7a), uint32(0x66b96194), 3240 uint32(0xde0506f1), 3241 }, 3242 { 3243 uint32(0x00000000), uint32(0x96300777), uint32(0x2c610eee), uint32(0xba510999), uint32(0x19c46d07), 3244 uint32(0x8ff46a70), uint32(0x35a563e9), uint32(0xa395649e), uint32(0x3288db0e), uint32(0xa4b8dc79), 3245 uint32(0x1ee9d5e0), uint32(0x88d9d297), uint32(0x2b4cb609), uint32(0xbd7cb17e), uint32(0x072db8e7), 3246 uint32(0x911dbf90), uint32(0x6410b71d), uint32(0xf220b06a), uint32(0x4871b9f3), uint32(0xde41be84), 3247 uint32(0x7dd4da1a), uint32(0xebe4dd6d), uint32(0x51b5d4f4), uint32(0xc785d383), uint32(0x56986c13), 3248 uint32(0xc0a86b64), uint32(0x7af962fd), uint32(0xecc9658a), uint32(0x4f5c0114), uint32(0xd96c0663), 3249 uint32(0x633d0ffa), uint32(0xf50d088d), uint32(0xc8206e3b), uint32(0x5e10694c), uint32(0xe44160d5), 3250 uint32(0x727167a2), uint32(0xd1e4033c), uint32(0x47d4044b), uint32(0xfd850dd2), uint32(0x6bb50aa5), 3251 uint32(0xfaa8b535), uint32(0x6c98b242), uint32(0xd6c9bbdb), uint32(0x40f9bcac), uint32(0xe36cd832), 3252 uint32(0x755cdf45), uint32(0xcf0dd6dc), uint32(0x593dd1ab), uint32(0xac30d926), uint32(0x3a00de51), 3253 uint32(0x8051d7c8), uint32(0x1661d0bf), uint32(0xb5f4b421), uint32(0x23c4b356), uint32(0x9995bacf), 3254 uint32(0x0fa5bdb8), uint32(0x9eb80228), uint32(0x0888055f), uint32(0xb2d90cc6), uint32(0x24e90bb1), 3255 uint32(0x877c6f2f), uint32(0x114c6858), uint32(0xab1d61c1), uint32(0x3d2d66b6), uint32(0x9041dc76), 3256 uint32(0x0671db01), uint32(0xbc20d298), uint32(0x2a10d5ef), uint32(0x8985b171), uint32(0x1fb5b606), 3257 uint32(0xa5e4bf9f), uint32(0x33d4b8e8), uint32(0xa2c90778), uint32(0x34f9000f), uint32(0x8ea80996), 3258 uint32(0x18980ee1), uint32(0xbb0d6a7f), uint32(0x2d3d6d08), uint32(0x976c6491), uint32(0x015c63e6), 3259 uint32(0xf4516b6b), uint32(0x62616c1c), uint32(0xd8306585), uint32(0x4e0062f2), uint32(0xed95066c), 3260 uint32(0x7ba5011b), uint32(0xc1f40882), uint32(0x57c40ff5), uint32(0xc6d9b065), uint32(0x50e9b712), 3261 uint32(0xeab8be8b), uint32(0x7c88b9fc), uint32(0xdf1ddd62), uint32(0x492dda15), uint32(0xf37cd38c), 3262 uint32(0x654cd4fb), uint32(0x5861b24d), uint32(0xce51b53a), uint32(0x7400bca3), uint32(0xe230bbd4), 3263 uint32(0x41a5df4a), uint32(0xd795d83d), uint32(0x6dc4d1a4), uint32(0xfbf4d6d3), uint32(0x6ae96943), 3264 uint32(0xfcd96e34), uint32(0x468867ad), uint32(0xd0b860da), uint32(0x732d0444), uint32(0xe51d0333), 3265 uint32(0x5f4c0aaa), uint32(0xc97c0ddd), uint32(0x3c710550), uint32(0xaa410227), uint32(0x10100bbe), 3266 uint32(0x86200cc9), uint32(0x25b56857), uint32(0xb3856f20), uint32(0x09d466b9), uint32(0x9fe461ce), 3267 uint32(0x0ef9de5e), uint32(0x98c9d929), uint32(0x2298d0b0), uint32(0xb4a8d7c7), uint32(0x173db359), 3268 uint32(0x810db42e), uint32(0x3b5cbdb7), uint32(0xad6cbac0), uint32(0x2083b8ed), uint32(0xb6b3bf9a), 3269 uint32(0x0ce2b603), uint32(0x9ad2b174), uint32(0x3947d5ea), uint32(0xaf77d29d), uint32(0x1526db04), 3270 uint32(0x8316dc73), uint32(0x120b63e3), uint32(0x843b6494), uint32(0x3e6a6d0d), uint32(0xa85a6a7a), 3271 uint32(0x0bcf0ee4), uint32(0x9dff0993), uint32(0x27ae000a), uint32(0xb19e077d), uint32(0x44930ff0), 3272 uint32(0xd2a30887), uint32(0x68f2011e), uint32(0xfec20669), uint32(0x5d5762f7), uint32(0xcb676580), 3273 uint32(0x71366c19), uint32(0xe7066b6e), uint32(0x761bd4fe), uint32(0xe02bd389), uint32(0x5a7ada10), 3274 uint32(0xcc4add67), uint32(0x6fdfb9f9), uint32(0xf9efbe8e), uint32(0x43beb717), uint32(0xd58eb060), 3275 uint32(0xe8a3d6d6), uint32(0x7e93d1a1), uint32(0xc4c2d838), uint32(0x52f2df4f), uint32(0xf167bbd1), 3276 uint32(0x6757bca6), uint32(0xdd06b53f), uint32(0x4b36b248), uint32(0xda2b0dd8), uint32(0x4c1b0aaf), 3277 uint32(0xf64a0336), uint32(0x607a0441), uint32(0xc3ef60df), uint32(0x55df67a8), uint32(0xef8e6e31), 3278 uint32(0x79be6946), uint32(0x8cb361cb), uint32(0x1a8366bc), uint32(0xa0d26f25), uint32(0x36e26852), 3279 uint32(0x95770ccc), uint32(0x03470bbb), uint32(0xb9160222), uint32(0x2f260555), uint32(0xbe3bbac5), 3280 uint32(0x280bbdb2), uint32(0x925ab42b), uint32(0x046ab35c), uint32(0xa7ffd7c2), uint32(0x31cfd0b5), 3281 uint32(0x8b9ed92c), uint32(0x1daede5b), uint32(0xb0c2649b), uint32(0x26f263ec), uint32(0x9ca36a75), 3282 uint32(0x0a936d02), uint32(0xa906099c), uint32(0x3f360eeb), uint32(0x85670772), uint32(0x13570005), 3283 uint32(0x824abf95), uint32(0x147ab8e2), uint32(0xae2bb17b), uint32(0x381bb60c), uint32(0x9b8ed292), 3284 uint32(0x0dbed5e5), uint32(0xb7efdc7c), uint32(0x21dfdb0b), uint32(0xd4d2d386), uint32(0x42e2d4f1), 3285 uint32(0xf8b3dd68), uint32(0x6e83da1f), uint32(0xcd16be81), uint32(0x5b26b9f6), uint32(0xe177b06f), 3286 uint32(0x7747b718), uint32(0xe65a0888), uint32(0x706a0fff), uint32(0xca3b0666), uint32(0x5c0b0111), 3287 uint32(0xff9e658f), uint32(0x69ae62f8), uint32(0xd3ff6b61), uint32(0x45cf6c16), uint32(0x78e20aa0), 3288 uint32(0xeed20dd7), uint32(0x5483044e), uint32(0xc2b30339), uint32(0x612667a7), uint32(0xf71660d0), 3289 uint32(0x4d476949), uint32(0xdb776e3e), uint32(0x4a6ad1ae), uint32(0xdc5ad6d9), uint32(0x660bdf40), 3290 uint32(0xf03bd837), uint32(0x53aebca9), uint32(0xc59ebbde), uint32(0x7fcfb247), uint32(0xe9ffb530), 3291 uint32(0x1cf2bdbd), uint32(0x8ac2baca), uint32(0x3093b353), uint32(0xa6a3b424), uint32(0x0536d0ba), 3292 uint32(0x9306d7cd), uint32(0x2957de54), uint32(0xbf67d923), uint32(0x2e7a66b3), uint32(0xb84a61c4), 3293 uint32(0x021b685d), uint32(0x942b6f2a), uint32(0x37be0bb4), uint32(0xa18e0cc3), uint32(0x1bdf055a), 3294 uint32(0x8def022d), 3295 }, 3296 { 3297 uint32(0x00000000), uint32(0x41311b19), uint32(0x82623632), uint32(0xc3532d2b), uint32(0x04c56c64), 3298 uint32(0x45f4777d), uint32(0x86a75a56), uint32(0xc796414f), uint32(0x088ad9c8), uint32(0x49bbc2d1), 3299 uint32(0x8ae8effa), uint32(0xcbd9f4e3), uint32(0x0c4fb5ac), uint32(0x4d7eaeb5), uint32(0x8e2d839e), 3300 uint32(0xcf1c9887), uint32(0x5112c24a), uint32(0x1023d953), uint32(0xd370f478), uint32(0x9241ef61), 3301 uint32(0x55d7ae2e), uint32(0x14e6b537), uint32(0xd7b5981c), uint32(0x96848305), uint32(0x59981b82), 3302 uint32(0x18a9009b), uint32(0xdbfa2db0), uint32(0x9acb36a9), uint32(0x5d5d77e6), uint32(0x1c6c6cff), 3303 uint32(0xdf3f41d4), uint32(0x9e0e5acd), uint32(0xa2248495), uint32(0xe3159f8c), uint32(0x2046b2a7), 3304 uint32(0x6177a9be), uint32(0xa6e1e8f1), uint32(0xe7d0f3e8), uint32(0x2483dec3), uint32(0x65b2c5da), 3305 uint32(0xaaae5d5d), uint32(0xeb9f4644), uint32(0x28cc6b6f), uint32(0x69fd7076), uint32(0xae6b3139), 3306 uint32(0xef5a2a20), uint32(0x2c09070b), uint32(0x6d381c12), uint32(0xf33646df), uint32(0xb2075dc6), 3307 uint32(0x715470ed), uint32(0x30656bf4), uint32(0xf7f32abb), uint32(0xb6c231a2), uint32(0x75911c89), 3308 uint32(0x34a00790), uint32(0xfbbc9f17), uint32(0xba8d840e), uint32(0x79dea925), uint32(0x38efb23c), 3309 uint32(0xff79f373), uint32(0xbe48e86a), uint32(0x7d1bc541), uint32(0x3c2ade58), uint32(0x054f79f0), 3310 uint32(0x447e62e9), uint32(0x872d4fc2), uint32(0xc61c54db), uint32(0x018a1594), uint32(0x40bb0e8d), 3311 uint32(0x83e823a6), uint32(0xc2d938bf), uint32(0x0dc5a038), uint32(0x4cf4bb21), uint32(0x8fa7960a), 3312 uint32(0xce968d13), uint32(0x0900cc5c), uint32(0x4831d745), uint32(0x8b62fa6e), uint32(0xca53e177), 3313 uint32(0x545dbbba), uint32(0x156ca0a3), uint32(0xd63f8d88), uint32(0x970e9691), uint32(0x5098d7de), 3314 uint32(0x11a9ccc7), uint32(0xd2fae1ec), uint32(0x93cbfaf5), uint32(0x5cd76272), uint32(0x1de6796b), 3315 uint32(0xdeb55440), uint32(0x9f844f59), uint32(0x58120e16), uint32(0x1923150f), uint32(0xda703824), 3316 uint32(0x9b41233d), uint32(0xa76bfd65), uint32(0xe65ae67c), uint32(0x2509cb57), uint32(0x6438d04e), 3317 uint32(0xa3ae9101), uint32(0xe29f8a18), uint32(0x21cca733), uint32(0x60fdbc2a), uint32(0xafe124ad), 3318 uint32(0xeed03fb4), uint32(0x2d83129f), uint32(0x6cb20986), uint32(0xab2448c9), uint32(0xea1553d0), 3319 uint32(0x29467efb), uint32(0x687765e2), uint32(0xf6793f2f), uint32(0xb7482436), uint32(0x741b091d), 3320 uint32(0x352a1204), uint32(0xf2bc534b), uint32(0xb38d4852), uint32(0x70de6579), uint32(0x31ef7e60), 3321 uint32(0xfef3e6e7), uint32(0xbfc2fdfe), uint32(0x7c91d0d5), uint32(0x3da0cbcc), uint32(0xfa368a83), 3322 uint32(0xbb07919a), uint32(0x7854bcb1), uint32(0x3965a7a8), uint32(0x4b98833b), uint32(0x0aa99822), 3323 uint32(0xc9fab509), uint32(0x88cbae10), uint32(0x4f5def5f), uint32(0x0e6cf446), uint32(0xcd3fd96d), 3324 uint32(0x8c0ec274), uint32(0x43125af3), uint32(0x022341ea), uint32(0xc1706cc1), uint32(0x804177d8), 3325 uint32(0x47d73697), uint32(0x06e62d8e), uint32(0xc5b500a5), uint32(0x84841bbc), uint32(0x1a8a4171), 3326 uint32(0x5bbb5a68), uint32(0x98e87743), uint32(0xd9d96c5a), uint32(0x1e4f2d15), uint32(0x5f7e360c), 3327 uint32(0x9c2d1b27), uint32(0xdd1c003e), uint32(0x120098b9), uint32(0x533183a0), uint32(0x9062ae8b), 3328 uint32(0xd153b592), uint32(0x16c5f4dd), uint32(0x57f4efc4), uint32(0x94a7c2ef), uint32(0xd596d9f6), 3329 uint32(0xe9bc07ae), uint32(0xa88d1cb7), uint32(0x6bde319c), uint32(0x2aef2a85), uint32(0xed796bca), 3330 uint32(0xac4870d3), uint32(0x6f1b5df8), uint32(0x2e2a46e1), uint32(0xe136de66), uint32(0xa007c57f), 3331 uint32(0x6354e854), uint32(0x2265f34d), uint32(0xe5f3b202), uint32(0xa4c2a91b), uint32(0x67918430), 3332 uint32(0x26a09f29), uint32(0xb8aec5e4), uint32(0xf99fdefd), uint32(0x3accf3d6), uint32(0x7bfde8cf), 3333 uint32(0xbc6ba980), uint32(0xfd5ab299), uint32(0x3e099fb2), uint32(0x7f3884ab), uint32(0xb0241c2c), 3334 uint32(0xf1150735), uint32(0x32462a1e), uint32(0x73773107), uint32(0xb4e17048), uint32(0xf5d06b51), 3335 uint32(0x3683467a), uint32(0x77b25d63), uint32(0x4ed7facb), uint32(0x0fe6e1d2), uint32(0xccb5ccf9), 3336 uint32(0x8d84d7e0), uint32(0x4a1296af), uint32(0x0b238db6), uint32(0xc870a09d), uint32(0x8941bb84), 3337 uint32(0x465d2303), uint32(0x076c381a), uint32(0xc43f1531), uint32(0x850e0e28), uint32(0x42984f67), 3338 uint32(0x03a9547e), uint32(0xc0fa7955), uint32(0x81cb624c), uint32(0x1fc53881), uint32(0x5ef42398), 3339 uint32(0x9da70eb3), uint32(0xdc9615aa), uint32(0x1b0054e5), uint32(0x5a314ffc), uint32(0x996262d7), 3340 uint32(0xd85379ce), uint32(0x174fe149), uint32(0x567efa50), uint32(0x952dd77b), uint32(0xd41ccc62), 3341 uint32(0x138a8d2d), uint32(0x52bb9634), uint32(0x91e8bb1f), uint32(0xd0d9a006), uint32(0xecf37e5e), 3342 uint32(0xadc26547), uint32(0x6e91486c), uint32(0x2fa05375), uint32(0xe836123a), uint32(0xa9070923), 3343 uint32(0x6a542408), uint32(0x2b653f11), uint32(0xe479a796), uint32(0xa548bc8f), uint32(0x661b91a4), 3344 uint32(0x272a8abd), uint32(0xe0bccbf2), uint32(0xa18dd0eb), uint32(0x62defdc0), uint32(0x23efe6d9), 3345 uint32(0xbde1bc14), uint32(0xfcd0a70d), uint32(0x3f838a26), uint32(0x7eb2913f), uint32(0xb924d070), 3346 uint32(0xf815cb69), uint32(0x3b46e642), uint32(0x7a77fd5b), uint32(0xb56b65dc), uint32(0xf45a7ec5), 3347 uint32(0x370953ee), uint32(0x763848f7), uint32(0xb1ae09b8), uint32(0xf09f12a1), uint32(0x33cc3f8a), 3348 uint32(0x72fd2493), 3349 }, 3350 { 3351 uint32(0x00000000), uint32(0x376ac201), uint32(0x6ed48403), uint32(0x59be4602), uint32(0xdca80907), 3352 uint32(0xebc2cb06), uint32(0xb27c8d04), uint32(0x85164f05), uint32(0xb851130e), uint32(0x8f3bd10f), 3353 uint32(0xd685970d), uint32(0xe1ef550c), uint32(0x64f91a09), uint32(0x5393d808), uint32(0x0a2d9e0a), 3354 uint32(0x3d475c0b), uint32(0x70a3261c), uint32(0x47c9e41d), uint32(0x1e77a21f), uint32(0x291d601e), 3355 uint32(0xac0b2f1b), uint32(0x9b61ed1a), uint32(0xc2dfab18), uint32(0xf5b56919), uint32(0xc8f23512), 3356 uint32(0xff98f713), uint32(0xa626b111), uint32(0x914c7310), uint32(0x145a3c15), uint32(0x2330fe14), 3357 uint32(0x7a8eb816), uint32(0x4de47a17), uint32(0xe0464d38), uint32(0xd72c8f39), uint32(0x8e92c93b), 3358 uint32(0xb9f80b3a), uint32(0x3cee443f), uint32(0x0b84863e), uint32(0x523ac03c), uint32(0x6550023d), 3359 uint32(0x58175e36), uint32(0x6f7d9c37), uint32(0x36c3da35), uint32(0x01a91834), uint32(0x84bf5731), 3360 uint32(0xb3d59530), uint32(0xea6bd332), uint32(0xdd011133), uint32(0x90e56b24), uint32(0xa78fa925), 3361 uint32(0xfe31ef27), uint32(0xc95b2d26), uint32(0x4c4d6223), uint32(0x7b27a022), uint32(0x2299e620), 3362 uint32(0x15f32421), uint32(0x28b4782a), uint32(0x1fdeba2b), uint32(0x4660fc29), uint32(0x710a3e28), 3363 uint32(0xf41c712d), uint32(0xc376b32c), uint32(0x9ac8f52e), uint32(0xada2372f), uint32(0xc08d9a70), 3364 uint32(0xf7e75871), uint32(0xae591e73), uint32(0x9933dc72), uint32(0x1c259377), uint32(0x2b4f5176), 3365 uint32(0x72f11774), uint32(0x459bd575), uint32(0x78dc897e), uint32(0x4fb64b7f), uint32(0x16080d7d), 3366 uint32(0x2162cf7c), uint32(0xa4748079), uint32(0x931e4278), uint32(0xcaa0047a), uint32(0xfdcac67b), 3367 uint32(0xb02ebc6c), uint32(0x87447e6d), uint32(0xdefa386f), uint32(0xe990fa6e), uint32(0x6c86b56b), 3368 uint32(0x5bec776a), uint32(0x02523168), uint32(0x3538f369), uint32(0x087faf62), uint32(0x3f156d63), 3369 uint32(0x66ab2b61), uint32(0x51c1e960), uint32(0xd4d7a665), uint32(0xe3bd6464), uint32(0xba032266), 3370 uint32(0x8d69e067), uint32(0x20cbd748), uint32(0x17a11549), uint32(0x4e1f534b), uint32(0x7975914a), 3371 uint32(0xfc63de4f), uint32(0xcb091c4e), uint32(0x92b75a4c), uint32(0xa5dd984d), uint32(0x989ac446), 3372 uint32(0xaff00647), uint32(0xf64e4045), uint32(0xc1248244), uint32(0x4432cd41), uint32(0x73580f40), 3373 uint32(0x2ae64942), uint32(0x1d8c8b43), uint32(0x5068f154), uint32(0x67023355), uint32(0x3ebc7557), 3374 uint32(0x09d6b756), uint32(0x8cc0f853), uint32(0xbbaa3a52), uint32(0xe2147c50), uint32(0xd57ebe51), 3375 uint32(0xe839e25a), uint32(0xdf53205b), uint32(0x86ed6659), uint32(0xb187a458), uint32(0x3491eb5d), 3376 uint32(0x03fb295c), uint32(0x5a456f5e), uint32(0x6d2fad5f), uint32(0x801b35e1), uint32(0xb771f7e0), 3377 uint32(0xeecfb1e2), uint32(0xd9a573e3), uint32(0x5cb33ce6), uint32(0x6bd9fee7), uint32(0x3267b8e5), 3378 uint32(0x050d7ae4), uint32(0x384a26ef), uint32(0x0f20e4ee), uint32(0x569ea2ec), uint32(0x61f460ed), 3379 uint32(0xe4e22fe8), uint32(0xd388ede9), uint32(0x8a36abeb), uint32(0xbd5c69ea), uint32(0xf0b813fd), 3380 uint32(0xc7d2d1fc), uint32(0x9e6c97fe), uint32(0xa90655ff), uint32(0x2c101afa), uint32(0x1b7ad8fb), 3381 uint32(0x42c49ef9), uint32(0x75ae5cf8), uint32(0x48e900f3), uint32(0x7f83c2f2), uint32(0x263d84f0), 3382 uint32(0x115746f1), uint32(0x944109f4), uint32(0xa32bcbf5), uint32(0xfa958df7), uint32(0xcdff4ff6), 3383 uint32(0x605d78d9), uint32(0x5737bad8), uint32(0x0e89fcda), uint32(0x39e33edb), uint32(0xbcf571de), 3384 uint32(0x8b9fb3df), uint32(0xd221f5dd), uint32(0xe54b37dc), uint32(0xd80c6bd7), uint32(0xef66a9d6), 3385 uint32(0xb6d8efd4), uint32(0x81b22dd5), uint32(0x04a462d0), uint32(0x33cea0d1), uint32(0x6a70e6d3), 3386 uint32(0x5d1a24d2), uint32(0x10fe5ec5), uint32(0x27949cc4), uint32(0x7e2adac6), uint32(0x494018c7), 3387 uint32(0xcc5657c2), uint32(0xfb3c95c3), uint32(0xa282d3c1), uint32(0x95e811c0), uint32(0xa8af4dcb), 3388 uint32(0x9fc58fca), uint32(0xc67bc9c8), uint32(0xf1110bc9), uint32(0x740744cc), uint32(0x436d86cd), 3389 uint32(0x1ad3c0cf), uint32(0x2db902ce), uint32(0x4096af91), uint32(0x77fc6d90), uint32(0x2e422b92), 3390 uint32(0x1928e993), uint32(0x9c3ea696), uint32(0xab546497), uint32(0xf2ea2295), uint32(0xc580e094), 3391 uint32(0xf8c7bc9f), uint32(0xcfad7e9e), uint32(0x9613389c), uint32(0xa179fa9d), uint32(0x246fb598), 3392 uint32(0x13057799), uint32(0x4abb319b), uint32(0x7dd1f39a), uint32(0x3035898d), uint32(0x075f4b8c), 3393 uint32(0x5ee10d8e), uint32(0x698bcf8f), uint32(0xec9d808a), uint32(0xdbf7428b), uint32(0x82490489), 3394 uint32(0xb523c688), uint32(0x88649a83), uint32(0xbf0e5882), uint32(0xe6b01e80), uint32(0xd1dadc81), 3395 uint32(0x54cc9384), uint32(0x63a65185), uint32(0x3a181787), uint32(0x0d72d586), uint32(0xa0d0e2a9), 3396 uint32(0x97ba20a8), uint32(0xce0466aa), uint32(0xf96ea4ab), uint32(0x7c78ebae), uint32(0x4b1229af), 3397 uint32(0x12ac6fad), uint32(0x25c6adac), uint32(0x1881f1a7), uint32(0x2feb33a6), uint32(0x765575a4), 3398 uint32(0x413fb7a5), uint32(0xc429f8a0), uint32(0xf3433aa1), uint32(0xaafd7ca3), uint32(0x9d97bea2), 3399 uint32(0xd073c4b5), uint32(0xe71906b4), uint32(0xbea740b6), uint32(0x89cd82b7), uint32(0x0cdbcdb2), 3400 uint32(0x3bb10fb3), uint32(0x620f49b1), uint32(0x55658bb0), uint32(0x6822d7bb), uint32(0x5f4815ba), 3401 uint32(0x06f653b8), uint32(0x319c91b9), uint32(0xb48adebc), uint32(0x83e01cbd), uint32(0xda5e5abf), 3402 uint32(0xed3498be), 3403 }, 3404 { 3405 uint32(0x00000000), uint32(0x6567bcb8), uint32(0x8bc809aa), uint32(0xeeafb512), uint32(0x5797628f), 3406 uint32(0x32f0de37), uint32(0xdc5f6b25), uint32(0xb938d79d), uint32(0xef28b4c5), uint32(0x8a4f087d), 3407 uint32(0x64e0bd6f), uint32(0x018701d7), uint32(0xb8bfd64a), uint32(0xddd86af2), uint32(0x3377dfe0), 3408 uint32(0x56106358), uint32(0x9f571950), uint32(0xfa30a5e8), uint32(0x149f10fa), uint32(0x71f8ac42), 3409 uint32(0xc8c07bdf), uint32(0xada7c767), uint32(0x43087275), uint32(0x266fcecd), uint32(0x707fad95), 3410 uint32(0x1518112d), uint32(0xfbb7a43f), uint32(0x9ed01887), uint32(0x27e8cf1a), uint32(0x428f73a2), 3411 uint32(0xac20c6b0), uint32(0xc9477a08), uint32(0x3eaf32a0), uint32(0x5bc88e18), uint32(0xb5673b0a), 3412 uint32(0xd00087b2), uint32(0x6938502f), uint32(0x0c5fec97), uint32(0xe2f05985), uint32(0x8797e53d), 3413 uint32(0xd1878665), uint32(0xb4e03add), uint32(0x5a4f8fcf), uint32(0x3f283377), uint32(0x8610e4ea), 3414 uint32(0xe3775852), uint32(0x0dd8ed40), uint32(0x68bf51f8), uint32(0xa1f82bf0), uint32(0xc49f9748), 3415 uint32(0x2a30225a), uint32(0x4f579ee2), uint32(0xf66f497f), uint32(0x9308f5c7), uint32(0x7da740d5), 3416 uint32(0x18c0fc6d), uint32(0x4ed09f35), uint32(0x2bb7238d), uint32(0xc518969f), uint32(0xa07f2a27), 3417 uint32(0x1947fdba), uint32(0x7c204102), uint32(0x928ff410), uint32(0xf7e848a8), uint32(0x3d58149b), 3418 uint32(0x583fa823), uint32(0xb6901d31), uint32(0xd3f7a189), uint32(0x6acf7614), uint32(0x0fa8caac), 3419 uint32(0xe1077fbe), uint32(0x8460c306), uint32(0xd270a05e), uint32(0xb7171ce6), uint32(0x59b8a9f4), 3420 uint32(0x3cdf154c), uint32(0x85e7c2d1), uint32(0xe0807e69), uint32(0x0e2fcb7b), uint32(0x6b4877c3), 3421 uint32(0xa20f0dcb), uint32(0xc768b173), uint32(0x29c70461), uint32(0x4ca0b8d9), uint32(0xf5986f44), 3422 uint32(0x90ffd3fc), uint32(0x7e5066ee), uint32(0x1b37da56), uint32(0x4d27b90e), uint32(0x284005b6), 3423 uint32(0xc6efb0a4), uint32(0xa3880c1c), uint32(0x1ab0db81), uint32(0x7fd76739), uint32(0x9178d22b), 3424 uint32(0xf41f6e93), uint32(0x03f7263b), uint32(0x66909a83), uint32(0x883f2f91), uint32(0xed589329), 3425 uint32(0x546044b4), uint32(0x3107f80c), uint32(0xdfa84d1e), uint32(0xbacff1a6), uint32(0xecdf92fe), 3426 uint32(0x89b82e46), uint32(0x67179b54), uint32(0x027027ec), uint32(0xbb48f071), uint32(0xde2f4cc9), 3427 uint32(0x3080f9db), uint32(0x55e74563), uint32(0x9ca03f6b), uint32(0xf9c783d3), uint32(0x176836c1), 3428 uint32(0x720f8a79), uint32(0xcb375de4), uint32(0xae50e15c), uint32(0x40ff544e), uint32(0x2598e8f6), 3429 uint32(0x73888bae), uint32(0x16ef3716), uint32(0xf8408204), uint32(0x9d273ebc), uint32(0x241fe921), 3430 uint32(0x41785599), uint32(0xafd7e08b), uint32(0xcab05c33), uint32(0x3bb659ed), uint32(0x5ed1e555), 3431 uint32(0xb07e5047), uint32(0xd519ecff), uint32(0x6c213b62), uint32(0x094687da), uint32(0xe7e932c8), 3432 uint32(0x828e8e70), uint32(0xd49eed28), uint32(0xb1f95190), uint32(0x5f56e482), uint32(0x3a31583a), 3433 uint32(0x83098fa7), uint32(0xe66e331f), uint32(0x08c1860d), uint32(0x6da63ab5), uint32(0xa4e140bd), 3434 uint32(0xc186fc05), uint32(0x2f294917), uint32(0x4a4ef5af), uint32(0xf3762232), uint32(0x96119e8a), 3435 uint32(0x78be2b98), uint32(0x1dd99720), uint32(0x4bc9f478), uint32(0x2eae48c0), uint32(0xc001fdd2), 3436 uint32(0xa566416a), uint32(0x1c5e96f7), uint32(0x79392a4f), uint32(0x97969f5d), uint32(0xf2f123e5), 3437 uint32(0x05196b4d), uint32(0x607ed7f5), uint32(0x8ed162e7), uint32(0xebb6de5f), uint32(0x528e09c2), 3438 uint32(0x37e9b57a), uint32(0xd9460068), uint32(0xbc21bcd0), uint32(0xea31df88), uint32(0x8f566330), 3439 uint32(0x61f9d622), uint32(0x049e6a9a), uint32(0xbda6bd07), uint32(0xd8c101bf), uint32(0x366eb4ad), 3440 uint32(0x53090815), uint32(0x9a4e721d), uint32(0xff29cea5), uint32(0x11867bb7), uint32(0x74e1c70f), 3441 uint32(0xcdd91092), uint32(0xa8beac2a), uint32(0x46111938), uint32(0x2376a580), uint32(0x7566c6d8), 3442 uint32(0x10017a60), uint32(0xfeaecf72), uint32(0x9bc973ca), uint32(0x22f1a457), uint32(0x479618ef), 3443 uint32(0xa939adfd), uint32(0xcc5e1145), uint32(0x06ee4d76), uint32(0x6389f1ce), uint32(0x8d2644dc), 3444 uint32(0xe841f864), uint32(0x51792ff9), uint32(0x341e9341), uint32(0xdab12653), uint32(0xbfd69aeb), 3445 uint32(0xe9c6f9b3), uint32(0x8ca1450b), uint32(0x620ef019), uint32(0x07694ca1), uint32(0xbe519b3c), 3446 uint32(0xdb362784), uint32(0x35999296), uint32(0x50fe2e2e), uint32(0x99b95426), uint32(0xfcdee89e), 3447 uint32(0x12715d8c), uint32(0x7716e134), uint32(0xce2e36a9), uint32(0xab498a11), uint32(0x45e63f03), 3448 uint32(0x208183bb), uint32(0x7691e0e3), uint32(0x13f65c5b), uint32(0xfd59e949), uint32(0x983e55f1), 3449 uint32(0x2106826c), uint32(0x44613ed4), uint32(0xaace8bc6), uint32(0xcfa9377e), uint32(0x38417fd6), 3450 uint32(0x5d26c36e), uint32(0xb389767c), uint32(0xd6eecac4), uint32(0x6fd61d59), uint32(0x0ab1a1e1), 3451 uint32(0xe41e14f3), uint32(0x8179a84b), uint32(0xd769cb13), uint32(0xb20e77ab), uint32(0x5ca1c2b9), 3452 uint32(0x39c67e01), uint32(0x80fea99c), uint32(0xe5991524), uint32(0x0b36a036), uint32(0x6e511c8e), 3453 uint32(0xa7166686), uint32(0xc271da3e), uint32(0x2cde6f2c), uint32(0x49b9d394), uint32(0xf0810409), 3454 uint32(0x95e6b8b1), uint32(0x7b490da3), uint32(0x1e2eb11b), uint32(0x483ed243), uint32(0x2d596efb), 3455 uint32(0xc3f6dbe9), uint32(0xa6916751), uint32(0x1fa9b0cc), uint32(0x7ace0c74), uint32(0x9461b966), 3456 uint32(0xf10605de), 3457 }, 3458 } /* crc32.h:5:25 */ 3459 3460 // ========================================================================= 3461 // This function can be used by asm versions of crc32() 3462 func Xget_crc_table(tls *libc.TLS) uintptr { /* crc32.c:188:19: */ 3463 return uintptr(uintptr(unsafe.Pointer(&crc_table))) 3464 } 3465 3466 // ========================================================================= 3467 3468 // ========================================================================= 3469 func Xcrc32_z(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:202:23: */ 3470 bp := tls.Alloc(4) 3471 defer tls.Free(4) 3472 3473 if buf == uintptr(Z_NULL) { 3474 return 0 3475 } 3476 3477 if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(Ptrdiff_t(0))) { 3478 // var endian Z_crc_t at bp, 4 3479 3480 *(*Z_crc_t)(unsafe.Pointer(bp /* endian */)) = Z_crc_t(1) 3481 if *(*uint8)(unsafe.Pointer(bp)) != 0 { 3482 return crc32_little(tls, crc, buf, len) 3483 } else { 3484 return crc32_big(tls, crc, buf, len) 3485 } 3486 } 3487 crc = crc ^ 0xffffffff 3488 for len >= uint64(8) { 3489 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 3490 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 3491 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 3492 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 3493 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 3494 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 3495 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 3496 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 3497 len = len - uint64(8) 3498 } 3499 if len != 0 { 3500 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint64(&len, 1) != 0 { 3501 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 3502 } 3503 } 3504 return crc ^ 0xffffffff 3505 } 3506 3507 // ========================================================================= 3508 func Xcrc32(tls *libc.TLS, crc uint64, buf uintptr, len UInt) uint64 { /* crc32.c:237:23: */ 3509 return Xcrc32_z(tls, crc, buf, uint64(len)) 3510 } 3511 3512 // 3513 // This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit 3514 // integer pointer type. This violates the strict aliasing rule, where a 3515 // compiler can assume, for optimization purposes, that two pointers to 3516 // fundamentally different types won't ever point to the same memory. This can 3517 // manifest as a problem only if one of the pointers is written to. This code 3518 // only reads from those pointers. So long as this code remains isolated in 3519 // this compilation unit, there won't be a problem. For this reason, this code 3520 // should not be copied and pasted into a compilation unit in which other code 3521 // writes to the buffer that is passed to these routines. 3522 // 3523 3524 // ========================================================================= 3525 3526 // ========================================================================= 3527 func crc32_little(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:266:21: */ 3528 var c Z_crc_t 3529 var buf4 uintptr 3530 3531 c = Z_crc_t(crc) 3532 c = ^c 3533 for len != 0 && Ptrdiff_t(buf)&int64(3) != 0 { 3534 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 3535 len-- 3536 } 3537 3538 buf4 = buf 3539 for len >= uint64(32) { 3540 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3541 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)) 3542 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3543 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)) 3544 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3545 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)) 3546 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3547 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)) 3548 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3549 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)) 3550 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3551 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)) 3552 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3553 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)) 3554 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3555 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)) 3556 len = len - uint64(32) 3557 } 3558 for len >= uint64(4) { 3559 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3560 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)) 3561 len = len - uint64(4) 3562 } 3563 buf = buf4 3564 3565 if len != 0 { 3566 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint64(&len, 1) != 0 { 3567 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 3568 } 3569 } 3570 c = ^c 3571 return uint64(c) 3572 } 3573 3574 // ========================================================================= 3575 3576 // ========================================================================= 3577 func crc32_big(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:306:21: */ 3578 var c Z_crc_t 3579 var buf4 uintptr 3580 3581 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 3582 c = ^c 3583 for len != 0 && Ptrdiff_t(buf)&int64(3) != 0 { 3584 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 3585 len-- 3586 } 3587 3588 buf4 = buf 3589 for len >= uint64(32) { 3590 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3591 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)) 3592 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3593 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)) 3594 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3595 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)) 3596 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3597 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)) 3598 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3599 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)) 3600 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3601 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)) 3602 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3603 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)) 3604 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3605 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)) 3606 len = len - uint64(32) 3607 } 3608 for len >= uint64(4) { 3609 c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))) 3610 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)) 3611 len = len - uint64(4) 3612 } 3613 buf = buf4 3614 3615 if len != 0 { 3616 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint64(&len, 1) != 0 { 3617 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 3618 } 3619 } 3620 c = ^c 3621 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) 3622 } 3623 3624 // ========================================================================= 3625 func gf2_matrix_times(tls *libc.TLS, mat uintptr, vec uint64) uint64 { /* crc32.c:344:21: */ 3626 var sum uint64 3627 3628 sum = uint64(0) 3629 for vec != 0 { 3630 if vec&uint64(1) != 0 { 3631 sum = sum ^ *(*uint64)(unsafe.Pointer(mat)) 3632 } 3633 vec >>= 1 3634 mat += 8 3635 } 3636 return sum 3637 } 3638 3639 // ========================================================================= 3640 func gf2_matrix_square(tls *libc.TLS, square uintptr, mat uintptr) { /* crc32.c:361:12: */ 3641 var n int32 3642 3643 for n = 0; n < GF2_DIM; n++ { 3644 *(*uint64)(unsafe.Pointer(square + uintptr(n)*8)) = gf2_matrix_times(tls, mat, *(*uint64)(unsafe.Pointer(mat + uintptr(n)*8))) 3645 } 3646 } 3647 3648 // ========================================================================= 3649 func crc32_combine_(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:372:13: */ 3650 bp := tls.Alloc(512) 3651 defer tls.Free(512) 3652 3653 var n int32 3654 var row uint64 3655 // var even [32]uint64 at bp+256, 256 3656 // even-power-of-two zeros operator 3657 // var odd [32]uint64 at bp, 256 3658 // odd-power-of-two zeros operator 3659 3660 // degenerate case (also disallow negative lengths) 3661 if len2 <= int64(0) { 3662 return crc1 3663 } 3664 3665 // put operator for one zero bit in odd 3666 *(*uint64)(unsafe.Pointer(bp)) = 0xedb88320 // CRC-32 polynomial 3667 row = uint64(1) 3668 for n = 1; n < GF2_DIM; n++ { 3669 *(*uint64)(unsafe.Pointer(bp + uintptr(n)*8)) = row 3670 row <<= 1 3671 } 3672 3673 // put operator for two zero bits in even 3674 gf2_matrix_square(tls, bp+256, bp) 3675 3676 // put operator for four zero bits in odd 3677 gf2_matrix_square(tls, bp, bp+256) 3678 3679 // apply len2 zeros to crc1 (first square will put the operator for one 3680 // zero byte, eight zero bits, in even) 3681 for __ccgo := true; __ccgo; __ccgo = len2 != int64(0) { 3682 // apply zeros operator for this bit of len2 3683 gf2_matrix_square(tls, bp+256, bp) 3684 if len2&int64(1) != 0 { 3685 crc1 = gf2_matrix_times(tls, bp+256, crc1) 3686 } 3687 len2 >>= 1 3688 3689 // if no more bits set, then done 3690 if len2 == int64(0) { 3691 break 3692 } 3693 3694 // another iteration of the loop with odd and even swapped 3695 gf2_matrix_square(tls, bp, bp+256) 3696 if len2&int64(1) != 0 { 3697 crc1 = gf2_matrix_times(tls, bp, crc1) 3698 } 3699 len2 >>= 1 3700 3701 // if no more bits set, then done 3702 } 3703 3704 // return combined crc 3705 crc1 = crc1 ^ crc2 3706 return crc1 3707 } 3708 3709 // ========================================================================= 3710 func Xcrc32_combine(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:428:15: */ 3711 return crc32_combine_(tls, crc1, crc2, len2) 3712 } 3713 3714 func Xcrc32_combine64(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:436:15: */ 3715 return crc32_combine_(tls, crc1, crc2, len2) 3716 } 3717 3718 // Reverse the bytes in a 32-bit value 3719 3720 // define NO_GZIP when compiling if you want to disable gzip header and 3721 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 3722 // the crc code when it is not needed. For shared libraries, gzip encoding 3723 // should be left enabled. 3724 3725 // =========================================================================== 3726 // Internal compression state. 3727 3728 // number of length codes, not counting the special END_BLOCK code 3729 3730 // number of literal bytes 0..255 3731 3732 // number of Literal or Length codes, including the END_BLOCK code 3733 3734 // number of distance codes 3735 3736 // number of codes used to transfer the bit lengths 3737 3738 // maximum heap size 3739 3740 // All codes must not exceed MAX_BITS bits 3741 3742 // size of bit buffer in bi_buf 3743 3744 // Stream status 3745 3746 // Data structure describing a single value and its code string. 3747 type Ct_data_s = struct { 3748 Ffc struct{ Ffreq Ush } 3749 Fdl struct{ Fdad Ush } 3750 } /* zlib.h:84:1 */ 3751 3752 // Reverse the bytes in a 32-bit value 3753 3754 // define NO_GZIP when compiling if you want to disable gzip header and 3755 // trailer creation by deflate(). NO_GZIP would be used to avoid linking in 3756 // the crc code when it is not needed. For shared libraries, gzip encoding 3757 // should be left enabled. 3758 3759 // =========================================================================== 3760 // Internal compression state. 3761 3762 // number of length codes, not counting the special END_BLOCK code 3763 3764 // number of literal bytes 0..255 3765 3766 // number of Literal or Length codes, including the END_BLOCK code 3767 3768 // number of distance codes 3769 3770 // number of codes used to transfer the bit lengths 3771 3772 // maximum heap size 3773 3774 // All codes must not exceed MAX_BITS bits 3775 3776 // size of bit buffer in bi_buf 3777 3778 // Stream status 3779 3780 // Data structure describing a single value and its code string. 3781 type Ct_data = Ct_data_s /* deflate.h:77:7 */ 3782 3783 type Static_tree_desc_s = struct { 3784 Fstatic_tree uintptr 3785 Fextra_bits uintptr 3786 Fextra_base int32 3787 Felems int32 3788 Fmax_length int32 3789 F__ccgo_pad1 [4]byte 3790 } /* deflate.h:84:9 */ 3791 3792 type Tree_desc_s = struct { 3793 Fdyn_tree uintptr 3794 Fmax_code int32 3795 F__ccgo_pad1 [4]byte 3796 Fstat_desc uintptr 3797 } /* zlib.h:84:1 */ 3798 3799 type Tree_desc = Tree_desc_s /* deflate.h:90:7 */ 3800 3801 type Pos = Ush /* deflate.h:92:13 */ 3802 type Posf = Pos /* deflate.h:93:17 */ 3803 type IPos = uint32 /* deflate.h:94:18 */ 3804 3805 // A Pos is an index in the character window. We use short instead of int to 3806 // save space in the various tables. IPos is used only for parameter passing. 3807 3808 type Deflate_state = Internal_state /* deflate.h:276:7 */ 3809 3810 var Xdeflate_copyright = *(*[69]int8)(unsafe.Pointer(ts + 7)) /* deflate.c:54:12 */ 3811 // 3812 // If you use the zlib library in a product, an acknowledgment is welcome 3813 // in the documentation of your product. If for some reason you cannot 3814 // include such an acknowledgment, I would appreciate that you keep this 3815 // copyright string in the executable of your product. 3816 // 3817 3818 // =========================================================================== 3819 // 3820 // Function prototypes. 3821 type Block_state = uint32 /* deflate.c:71:3 */ 3822 3823 type Compress_func = uintptr /* deflate.c:73:21 */ 3824 3825 // =========================================================================== 3826 // Local data 3827 3828 // Tail of hash chains 3829 3830 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 3831 3832 // Values for max_lazy_match, good_match and max_chain_length, depending on 3833 // the desired pack level (0..9). The values given below have been tuned to 3834 // exclude worst case performance for pathological files. Better values may be 3835 // found for specific files. 3836 type Config_s = struct { 3837 Fgood_length Ush 3838 Fmax_lazy Ush 3839 Fnice_length Ush 3840 Fmax_chain Ush 3841 Ffunc Compress_func 3842 } /* deflate.c:120:9 */ 3843 3844 // =========================================================================== 3845 // Local data 3846 3847 // Tail of hash chains 3848 3849 // Matches of length 3 are discarded if their distance exceeds TOO_FAR 3850 3851 // Values for max_lazy_match, good_match and max_chain_length, depending on 3852 // the desired pack level (0..9). The values given below have been tuned to 3853 // exclude worst case performance for pathological files. Better values may be 3854 // found for specific files. 3855 type Config = Config_s /* deflate.c:126:3 */ 3856 3857 var configuration_table = [10]Config{ 3858 // good lazy nice chain 3859 /* 0 */ {Ffunc: 0}, // store only 3860 /* 1 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(8), Fmax_chain: Ush(4), Ffunc: 0}, // max speed, no lazy matches 3861 /* 2 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(5), Fnice_length: Ush(16), Fmax_chain: Ush(8), Ffunc: 0}, 3862 /* 3 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(6), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 3863 3864 /* 4 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(16), Fmax_chain: Ush(16), Ffunc: 0}, // lazy matches 3865 /* 5 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0}, 3866 /* 6 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(128), Fmax_chain: Ush(128), Ffunc: 0}, 3867 /* 7 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(32), Fnice_length: Ush(128), Fmax_chain: Ush(256), Ffunc: 0}, 3868 /* 8 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(128), Fnice_length: Ush(258), Fmax_chain: Ush(1024), Ffunc: 0}, 3869 /* 9 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(258), Fnice_length: Ush(258), Fmax_chain: Ush(4096), Ffunc: 0}} /* deflate.c:134:20 */ 3870 3871 // max compression 3872 3873 // Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 3874 // For deflate_fast() (levels <= 3) good is ignored and lazy has a different 3875 // meaning. 3876 3877 // rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH 3878 3879 // =========================================================================== 3880 // Update a hash value with the given input byte 3881 // IN assertion: all calls to UPDATE_HASH are made with consecutive input 3882 // characters, so that a running hash key can be computed from the previous 3883 // key instead of complete recalculation each time. 3884 3885 // =========================================================================== 3886 // Insert string str in the dictionary and set match_head to the previous head 3887 // of the hash chain (the most recent string with same hash key). Return 3888 // the previous length of the hash chain. 3889 // If this file is compiled with -DFASTEST, the compression level is forced 3890 // to 1, and no hash chains are maintained. 3891 // IN assertion: all calls to INSERT_STRING are made with consecutive input 3892 // characters and the first MIN_MATCH bytes of str are valid (except for 3893 // the last MIN_MATCH-1 bytes of the input file). 3894 3895 // =========================================================================== 3896 // Initialize the hash table (avoiding 64K overflow for 16 bit systems). 3897 // prev[] will be initialized on the fly. 3898 3899 // =========================================================================== 3900 // Slide the hash table when sliding the window down (could be avoided with 32 3901 // bit values at the expense of memory usage). We slide even when level == 0 to 3902 // keep the hash table consistent if we switch back to level > 0 later. 3903 func slide_hash(tls *libc.TLS, s uintptr) { /* deflate.c:201:12: */ 3904 var n uint32 3905 var m uint32 3906 var p uintptr 3907 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 3908 3909 n = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size 3910 p = (*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2 3911 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 { 3912 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 3913 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 3914 if m >= wsize { 3915 return uint16(m - wsize) 3916 } 3917 return uint16(NIL) 3918 }() 3919 } 3920 n = wsize 3921 p = (*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2 3922 for __ccgo1 := true; __ccgo1; __ccgo1 = libc.PreDecUint32(&n, 1) != 0 { 3923 m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2)))) 3924 *(*Posf)(unsafe.Pointer(p)) = func() uint16 { 3925 if m >= wsize { 3926 return uint16(m - wsize) 3927 } 3928 return uint16(NIL) 3929 }() 3930 // If n is not on any hash chain, prev[n] is garbage but 3931 // its value will never be used. 3932 } 3933 } 3934 3935 // ========================================================================= 3936 func XdeflateInit_(tls *libc.TLS, strm Z_streamp, level int32, version uintptr, stream_size int32) int32 { /* deflate.c:228:13: */ 3937 return XdeflateInit2_(tls, strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, 3938 Z_DEFAULT_STRATEGY, version, stream_size) 3939 // To do: ignore strm->next_in if we use it as window 3940 } 3941 3942 // ========================================================================= 3943 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: */ 3944 var s uintptr 3945 var wrap int32 = 1 3946 var overlay uintptr 3947 // We overlay pending_buf and d_buf+l_buf. This works since the average 3948 // output size for (length,distance) codes is <= 24 bits. 3949 3950 if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(my_version[0]) || uint64(stream_size) != uint64(unsafe.Sizeof(Z_stream{})) { 3951 return -6 3952 } 3953 if strm == uintptr(Z_NULL) { 3954 return -2 3955 } 3956 3957 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 3958 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 3959 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 3960 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 3961 }{Xzcalloc})) 3962 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 3963 } 3964 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 3965 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 3966 f func(*libc.TLS, Voidpf, Voidpf) 3967 }{Xzcfree})) 3968 } 3969 3970 if level == -1 { 3971 level = 6 3972 } 3973 3974 if windowBits < 0 { // suppress zlib wrapper 3975 wrap = 0 3976 windowBits = -windowBits 3977 } else if windowBits > 15 { 3978 wrap = 2 // write gzip wrapper instead 3979 windowBits = windowBits - 16 3980 } 3981 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 { 3982 return -2 3983 } 3984 if windowBits == 8 { 3985 windowBits = 9 3986 } // until 256-byte window bug fixed 3987 s = (*struct { 3988 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 3989 })(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{}))) 3990 if s == uintptr(Z_NULL) { 3991 return -4 3992 } 3993 (*Z_stream)(unsafe.Pointer(strm)).Fstate = s 3994 (*Deflate_state)(unsafe.Pointer(s)).Fstrm = strm 3995 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = INIT_STATE // to pass state test in deflateReset() 3996 3997 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 3998 (*Deflate_state)(unsafe.Pointer(s)).Fgzhead = Gz_headerp(Z_NULL) 3999 (*Deflate_state)(unsafe.Pointer(s)).Fw_bits = UInt(windowBits) 4000 (*Deflate_state)(unsafe.Pointer(s)).Fw_size = UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fw_bits) 4001 (*Deflate_state)(unsafe.Pointer(s)).Fw_mask = (*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(1) 4002 4003 (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits = UInt(memLevel) + UInt(7) 4004 (*Deflate_state)(unsafe.Pointer(s)).Fhash_size = UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits) 4005 (*Deflate_state)(unsafe.Pointer(s)).Fhash_mask = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1) 4006 (*Deflate_state)(unsafe.Pointer(s)).Fhash_shift = ((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits + UInt(MIN_MATCH) - UInt(1)) / UInt(MIN_MATCH) 4007 4008 (*Deflate_state)(unsafe.Pointer(s)).Fwindow = (*struct { 4009 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 4010 })(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))))) 4011 (*Deflate_state)(unsafe.Pointer(s)).Fprev = (*struct { 4012 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 4013 })(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)))) 4014 (*Deflate_state)(unsafe.Pointer(s)).Fhead = (*struct { 4015 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 4016 })(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)))) 4017 4018 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = uint64(0) // nothing written to s->window yet 4019 4020 (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize = UInt(int32(1) << (memLevel + 6)) // 16K elements by default 4021 4022 overlay = (*struct { 4023 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 4024 })(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))) 4025 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf = overlay 4026 (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size = Ulg((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize) * (uint64(unsafe.Sizeof(Ush(0))) + uint64(2)) 4027 4028 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) { 4029 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 4030 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -4] 4031 XdeflateEnd(tls, strm) 4032 return -4 4033 } 4034 (*Deflate_state)(unsafe.Pointer(s)).Fd_buf = overlay + uintptr(uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0))))*2 4035 (*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)) 4036 4037 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 4038 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 4039 (*Deflate_state)(unsafe.Pointer(s)).Fmethod = Byte(method) 4040 4041 return XdeflateReset(tls, strm) 4042 } 4043 4044 var my_version = *(*[7]int8)(unsafe.Pointer(ts)) /* deflate.c:253:23 */ 4045 4046 // ========================================================================= 4047 // Check for a valid deflate stream state. Return 0 if ok, 1 if not. 4048 func deflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:353:11: */ 4049 var s uintptr 4050 if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 4051 return 1 4052 } 4053 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4054 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 { 4055 return 1 4056 } 4057 return 0 4058 } 4059 4060 // ========================================================================= 4061 func XdeflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* deflate.c:376:13: */ 4062 var s uintptr 4063 var str UInt 4064 var n UInt 4065 var wrap int32 4066 var avail uint32 4067 var next uintptr 4068 4069 if deflateStateCheck(tls, strm) != 0 || dictionary == uintptr(Z_NULL) { 4070 return -2 4071 } 4072 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4073 wrap = (*Deflate_state)(unsafe.Pointer(s)).Fwrap 4074 if wrap == 2 || wrap == 1 && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE || (*Deflate_state)(unsafe.Pointer(s)).Flookahead != 0 { 4075 return -2 4076 } 4077 4078 // when using zlib wrappers, compute Adler-32 for provided dictionary 4079 if wrap == 1 { 4080 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength) 4081 } 4082 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = 0 // avoid computing Adler-32 in read_buf 4083 4084 // if dictionary would fill window, just replace the history 4085 if dictLength >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 4086 if wrap == 0 { // already empty otherwise 4087 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL) 4088 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)))) 4089 4090 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 4091 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 4092 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 4093 } 4094 dictionary += uintptr(dictLength - (*Deflate_state)(unsafe.Pointer(s)).Fw_size) // use the tail 4095 dictLength = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 4096 } 4097 4098 // insert dictionary into window and hash 4099 avail = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 4100 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 4101 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = dictLength 4102 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary 4103 fill_window(tls, s) 4104 for (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 4105 str = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 4106 n = (*Deflate_state)(unsafe.Pointer(s)).Flookahead - UInt(MIN_MATCH-1) 4107 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 { 4108 (*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 4109 *(*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)) 4110 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 4111 str++ 4112 } 4113 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = str 4114 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(MIN_MATCH - 1) 4115 fill_window(tls, s) 4116 } 4117 *(*UInt)(unsafe.Pointer(s + 172)) += (*Deflate_state)(unsafe.Pointer(s)).Flookahead 4118 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 4119 (*Deflate_state)(unsafe.Pointer(s)).Finsert = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 4120 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 4121 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+184, UInt(MIN_MATCH-1)) 4122 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 4123 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 4124 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = avail 4125 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap 4126 return Z_OK 4127 } 4128 4129 // ========================================================================= 4130 func XdeflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* deflate.c:445:13: */ 4131 var s uintptr 4132 var len UInt 4133 4134 if deflateStateCheck(tls, strm) != 0 { 4135 return -2 4136 } 4137 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4138 len = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead 4139 if len > (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 4140 len = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 4141 } 4142 if dictionary != uintptr(Z_NULL) && len != 0 { 4143 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)) 4144 } 4145 if dictLength != uintptr(Z_NULL) { 4146 *(*UInt)(unsafe.Pointer(dictLength)) = len 4147 } 4148 return Z_OK 4149 } 4150 4151 // ========================================================================= 4152 func XdeflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:467:13: */ 4153 var s uintptr 4154 4155 if deflateStateCheck(tls, strm) != 0 { 4156 return -2 4157 } 4158 4159 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint64(strm+40, uint64(0)) 4160 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // use zfree if we ever allocate msg dynamically 4161 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = Z_UNKNOWN 4162 4163 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4164 (*Deflate_state)(unsafe.Pointer(s)).Fpending = uint64(0) 4165 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 4166 4167 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap < 0 { 4168 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap // was made negative by deflate(..., Z_FINISH); 4169 } 4170 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = func() int32 { 4171 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 4172 return GZIP_STATE 4173 } 4174 return func() int32 { 4175 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap != 0 { 4176 return INIT_STATE 4177 } 4178 return BUSY_STATE 4179 }() 4180 }() 4181 (*Z_stream)(unsafe.Pointer(strm)).Fadler = func() uint64 { 4182 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 4183 return Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 4184 } 4185 return Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 4186 }() 4187 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = Z_NO_FLUSH 4188 4189 X_tr_init(tls, s) 4190 4191 return Z_OK 4192 } 4193 4194 // ========================================================================= 4195 func XdeflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:505:13: */ 4196 var ret int32 4197 4198 ret = XdeflateResetKeep(tls, strm) 4199 if ret == Z_OK { 4200 lm_init(tls, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 4201 } 4202 return ret 4203 } 4204 4205 // ========================================================================= 4206 func XdeflateSetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* deflate.c:517:13: */ 4207 if deflateStateCheck(tls, strm) != 0 || (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != 2 { 4208 return -2 4209 } 4210 (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head 4211 return Z_OK 4212 } 4213 4214 // ========================================================================= 4215 func XdeflatePending(tls *libc.TLS, strm Z_streamp, pending uintptr, bits uintptr) int32 { /* deflate.c:528:13: */ 4216 if deflateStateCheck(tls, strm) != 0 { 4217 return -2 4218 } 4219 if pending != uintptr(Z_NULL) { 4220 *(*uint32)(unsafe.Pointer(pending)) = uint32((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending) 4221 } 4222 if bits != uintptr(Z_NULL) { 4223 *(*int32)(unsafe.Pointer(bits)) = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid 4224 } 4225 return Z_OK 4226 } 4227 4228 // ========================================================================= 4229 func XdeflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* deflate.c:542:13: */ 4230 var s uintptr 4231 var put int32 4232 4233 if deflateStateCheck(tls, strm) != 0 { 4234 return -2 4235 } 4236 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4237 if (*Deflate_state)(unsafe.Pointer(s)).Fd_buf < (*Deflate_state)(unsafe.Pointer(s)).Fpending_out+uintptr(int32(Buf_size+7)>>3) { 4238 return -5 4239 } 4240 for __ccgo := true; __ccgo; __ccgo = bits != 0 { 4241 put = Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid 4242 if put > bits { 4243 put = bits 4244 } 4245 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(value & (int32(1)<<put - 1) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))) 4246 *(*int32)(unsafe.Pointer(s + 5940)) += put 4247 X_tr_flush_bits(tls, s) 4248 value >>= put 4249 bits = bits - put 4250 } 4251 return Z_OK 4252 } 4253 4254 // ========================================================================= 4255 func XdeflateParams(tls *libc.TLS, strm Z_streamp, level int32, strategy int32) int32 { /* deflate.c:568:13: */ 4256 var s uintptr 4257 var func1 Compress_func 4258 4259 if deflateStateCheck(tls, strm) != 0 { 4260 return -2 4261 } 4262 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4263 4264 if level == -1 { 4265 level = 6 4266 } 4267 if level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED { 4268 return -2 4269 } 4270 func1 = configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc 4271 4272 if (strategy != (*Deflate_state)(unsafe.Pointer(s)).Fstrategy || func1 != configuration_table[level].Ffunc) && (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water != 0 { 4273 // Flush the last buffer: 4274 var err int32 = Xdeflate(tls, strm, Z_BLOCK) 4275 if err == -2 { 4276 return err 4277 } 4278 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 4279 return -5 4280 } 4281 } 4282 if (*Deflate_state)(unsafe.Pointer(s)).Flevel != level { 4283 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 && (*Deflate_state)(unsafe.Pointer(s)).Fmatches != UInt(0) { 4284 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches == UInt(1) { 4285 slide_hash(tls, s) 4286 } else { 4287 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL) 4288 } 4289 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)))) 4290 4291 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(0) 4292 } 4293 (*Deflate_state)(unsafe.Pointer(s)).Flevel = level 4294 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[level].Fmax_lazy) 4295 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[level].Fgood_length) 4296 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[level].Fnice_length) 4297 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[level].Fmax_chain) 4298 } 4299 (*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy 4300 return Z_OK 4301 } 4302 4303 // ========================================================================= 4304 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: */ 4305 var s uintptr 4306 4307 if deflateStateCheck(tls, strm) != 0 { 4308 return -2 4309 } 4310 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4311 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(good_length) 4312 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(max_lazy) 4313 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length 4314 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(max_chain) 4315 return Z_OK 4316 } 4317 4318 // ========================================================================= 4319 // For the default windowBits of 15 and memLevel of 8, this function returns 4320 // a close to exact, as well as small, upper bound on the compressed size. 4321 // They are coded as constants here for a reason--if the #define's are 4322 // changed, then this function needs to be changed as well. The return 4323 // value for 15 and 8 only works for those exact settings. 4324 // 4325 // For any setting other than those defaults for windowBits and memLevel, 4326 // the value returned is a conservative worst case for the maximum expansion 4327 // resulting from using fixed blocks instead of stored blocks, which deflate 4328 // can emit on compressed data for some combinations of the parameters. 4329 // 4330 // This function could be more sophisticated to provide closer upper bounds for 4331 // every combination of windowBits and memLevel. But even the conservative 4332 // upper bound of about 14% expansion does not seem onerous for output buffer 4333 // allocation. 4334 func XdeflateBound(tls *libc.TLS, strm Z_streamp, sourceLen ULong) ULong { /* deflate.c:652:15: */ 4335 var s uintptr 4336 var complen ULong 4337 var wraplen ULong 4338 4339 // conservative upper bound for compressed data 4340 complen = sourceLen + (sourceLen+uint64(7))>>3 + (sourceLen+uint64(63))>>6 + uint64(5) 4341 4342 // if can't get parameters, return conservative bound plus zlib wrapper 4343 if deflateStateCheck(tls, strm) != 0 { 4344 return complen + uint64(6) 4345 } 4346 4347 // compute wrapper length 4348 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4349 switch (*Deflate_state)(unsafe.Pointer(s)).Fwrap { 4350 case 0: // raw deflate 4351 wraplen = uint64(0) 4352 break 4353 case 1: // zlib wrapper 4354 wraplen = ULong(6 + func() int32 { 4355 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != 0 { 4356 return 4 4357 } 4358 return 0 4359 }()) 4360 break 4361 case 2: // gzip wrapper 4362 wraplen = uint64(18) 4363 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(Z_NULL) { // user-supplied gzip header 4364 var str uintptr 4365 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 4366 wraplen = wraplen + ULong(UInt(2)+(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len) 4367 } 4368 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname 4369 if str != uintptr(Z_NULL) { 4370 for __ccgo := true; __ccgo; __ccgo = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 4371 wraplen++ 4372 } 4373 } 4374 str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment 4375 if str != uintptr(Z_NULL) { 4376 for __ccgo1 := true; __ccgo1; __ccgo1 = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 { 4377 wraplen++ 4378 } 4379 } 4380 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 4381 wraplen = wraplen + uint64(2) 4382 } 4383 } 4384 break 4385 default: // for compiler happiness 4386 wraplen = uint64(6) 4387 } 4388 4389 // if not default parameters, return conservative bound 4390 if (*Deflate_state)(unsafe.Pointer(s)).Fw_bits != UInt(15) || (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits != UInt(8+7) { 4391 return complen + wraplen 4392 } 4393 4394 // default settings: return tight bound for that case 4395 return sourceLen + sourceLen>>12 + sourceLen>>14 + sourceLen>>25 + uint64(13) - uint64(6) + wraplen 4396 } 4397 4398 // ========================================================================= 4399 // Put a short in the pending buffer. The 16-bit value is put in MSB order. 4400 // IN assertion: the stream state is correct and there is enough room in 4401 // pending_buf. 4402 func putShortMSB(tls *libc.TLS, s uintptr, b UInt) { /* deflate.c:716:12: */ 4403 { 4404 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte(b >> 8) 4405 } 4406 4407 { 4408 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte(b & UInt(0xff)) 4409 } 4410 4411 } 4412 4413 // ========================================================================= 4414 // Flush as much pending output as possible. All deflate() output, except for 4415 // some deflate_stored() output, goes through this function so some 4416 // applications may wish to modify it to avoid allocating a large 4417 // strm->next_out buffer and copying into it. (See also read_buf()). 4418 func flush_pending(tls *libc.TLS, strm Z_streamp) { /* deflate.c:730:12: */ 4419 var len uint32 4420 var s uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4421 4422 X_tr_flush_bits(tls, s) 4423 len = uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending) 4424 if len > (*Z_stream)(unsafe.Pointer(strm)).Favail_out { 4425 len = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 4426 } 4427 if len == uint32(0) { 4428 return 4429 } 4430 4431 libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fpending_out, uint64(len)) 4432 *(*uintptr)(unsafe.Pointer(strm + 24)) += uintptr(len) 4433 *(*uintptr)(unsafe.Pointer(s + 32)) += uintptr(len) 4434 *(*ULong)(unsafe.Pointer(strm + 40)) += ULong(len) 4435 *(*UInt)(unsafe.Pointer(strm + 32)) -= len 4436 *(*Ulg)(unsafe.Pointer(s + 40)) -= Ulg(len) 4437 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == uint64(0) { 4438 (*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf 4439 } 4440 } 4441 4442 // =========================================================================== 4443 // Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. 4444 4445 // ========================================================================= 4446 func Xdeflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* deflate.c:763:13: */ 4447 var old_flush int32 // value of flush param for previous deflate call 4448 var s uintptr 4449 4450 if deflateStateCheck(tls, strm) != 0 || flush > Z_BLOCK || flush < 0 { 4451 return -2 4452 } 4453 s = (*Z_stream)(unsafe.Pointer(strm)).Fstate 4454 4455 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 { 4456 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -2]; return -2 }() 4457 } 4458 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 4459 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }() 4460 } 4461 4462 old_flush = (*Deflate_state)(unsafe.Pointer(s)).Flast_flush 4463 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = flush 4464 4465 // Flush as much pending output as possible 4466 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 4467 flush_pending(tls, strm) 4468 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 4469 // Since avail_out is 0, deflate will be called again with 4470 // more output space, but possibly with both pending and 4471 // avail_in equal to zero. There won't be anything to do, 4472 // but this is not an error situation so make sure we 4473 // return OK instead of BUF_ERROR at next call of deflate: 4474 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 4475 return Z_OK 4476 } 4477 4478 // Make sure there is something to do and avoid duplicate consecutive 4479 // flushes. For repeated and useless calls with Z_FINISH, we keep 4480 // returning Z_STREAM_END instead of Z_BUF_ERROR. 4481 } else if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && flush*2-func() int32 { 4482 if flush > 4 { 4483 return 9 4484 } 4485 return 0 4486 }() <= old_flush*2-func() int32 { 4487 if old_flush > 4 { 4488 return 9 4489 } 4490 return 0 4491 }() && flush != Z_FINISH { 4492 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }() 4493 } 4494 4495 // User must not provide more input after the first FINISH: 4496 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE && (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0) { 4497 return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }() 4498 } 4499 4500 // Write the header 4501 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == INIT_STATE { 4502 // zlib header 4503 var header UInt = (UInt(Z_DEFLATED) + ((*Deflate_state)(unsafe.Pointer(s)).Fw_bits-UInt(8))<<4) << 8 4504 var level_flags UInt 4505 4506 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 { 4507 level_flags = UInt(0) 4508 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel < 6 { 4509 level_flags = UInt(1) 4510 } else if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 6 { 4511 level_flags = UInt(2) 4512 } else { 4513 level_flags = UInt(3) 4514 } 4515 header = header | level_flags<<6 4516 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 4517 header = header | UInt(PRESET_DICT) 4518 } 4519 header = header + (UInt(31) - header%UInt(31)) 4520 4521 putShortMSB(tls, s, header) 4522 4523 // Save the adler32 of the preset dictionary: 4524 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) { 4525 putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler>>16)) 4526 putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler&uint64(0xffff))) 4527 } 4528 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 4529 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 4530 4531 // Compression must start with an empty pending buffer 4532 flush_pending(tls, strm) 4533 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 4534 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 4535 return Z_OK 4536 } 4537 } 4538 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == GZIP_STATE { 4539 // gzip header 4540 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 4541 { 4542 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(31) 4543 } 4544 4545 { 4546 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(139) 4547 } 4548 4549 { 4550 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(8) 4551 } 4552 4553 if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(Z_NULL) { 4554 { 4555 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 4556 } 4557 4558 { 4559 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 4560 } 4561 4562 { 4563 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 4564 } 4565 4566 { 4567 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 4568 } 4569 4570 { 4571 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0) 4572 } 4573 4574 { 4575 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 4576 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 4577 return uint8(2) 4578 } 4579 return func() uint8 { 4580 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 { 4581 return uint8(4) 4582 } 4583 return uint8(0) 4584 }() 4585 }() 4586 } 4587 4588 { 4589 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(OS_CODE) 4590 } 4591 4592 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 4593 4594 // Compression must start with an empty pending buffer 4595 flush_pending(tls, strm) 4596 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 4597 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 4598 return Z_OK 4599 } 4600 } else { 4601 { 4602 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(func() int32 { 4603 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 { 4604 return 1 4605 } 4606 return 0 4607 }() + func() int32 { 4608 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 4609 return 2 4610 } 4611 return 0 4612 }() + func() int32 { 4613 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(Z_NULL) { 4614 return 0 4615 } 4616 return 4 4617 }() + func() int32 { 4618 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(Z_NULL) { 4619 return 0 4620 } 4621 return 8 4622 }() + func() int32 { 4623 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(Z_NULL) { 4624 return 0 4625 } 4626 return 16 4627 }()) 4628 } 4629 4630 { 4631 *(*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)) 4632 } 4633 4634 { 4635 *(*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)) 4636 } 4637 4638 { 4639 *(*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)) 4640 } 4641 4642 { 4643 *(*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)) 4644 } 4645 4646 { 4647 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 { 4648 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 { 4649 return uint8(2) 4650 } 4651 return func() uint8 { 4652 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 { 4653 return uint8(4) 4654 } 4655 return uint8(0) 4656 }() 4657 }() 4658 } 4659 4660 { 4661 *(*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) 4662 } 4663 4664 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 4665 { 4666 *(*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)) 4667 } 4668 4669 { 4670 *(*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)) 4671 } 4672 4673 } 4674 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 4675 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf, 4676 uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending)) 4677 } 4678 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 4679 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = EXTRA_STATE 4680 } 4681 } 4682 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == EXTRA_STATE { 4683 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) { 4684 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 4685 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) 4686 for (*Deflate_state)(unsafe.Pointer(s)).Fpending+Ulg(left) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 4687 var copy UInt = UInt((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fpending) 4688 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending), 4689 (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex), uint64(copy)) 4690 (*Deflate_state)(unsafe.Pointer(s)).Fpending = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size 4691 for __ccgo := true; __ccgo; __ccgo = 0 != 0 { 4692 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 4693 (*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)) 4694 } 4695 } 4696 *(*Ulg)(unsafe.Pointer(s + 64)) += Ulg(copy) 4697 flush_pending(tls, strm) 4698 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 4699 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 4700 return Z_OK 4701 } 4702 beg = uint64(0) 4703 left = left - copy 4704 } 4705 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending), 4706 (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex), uint64(left)) 4707 *(*Ulg)(unsafe.Pointer(s + 40)) += Ulg(left) 4708 for __ccgo1 := true; __ccgo1; __ccgo1 = 0 != 0 { 4709 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 4710 (*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)) 4711 } 4712 } 4713 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 4714 } 4715 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = NAME_STATE 4716 } 4717 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == NAME_STATE { 4718 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(Z_NULL) { 4719 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 4720 var val int32 4721 for __ccgo2 := true; __ccgo2; __ccgo2 = val != 0 { 4722 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 4723 for __ccgo3 := true; __ccgo3; __ccgo3 = 0 != 0 { 4724 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 4725 (*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)) 4726 } 4727 } 4728 flush_pending(tls, strm) 4729 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 4730 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 4731 return Z_OK 4732 } 4733 beg = uint64(0) 4734 } 4735 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))))) 4736 { 4737 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 4738 } 4739 4740 } 4741 for __ccgo4 := true; __ccgo4; __ccgo4 = 0 != 0 { 4742 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 4743 (*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)) 4744 } 4745 } 4746 (*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) 4747 } 4748 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = COMMENT_STATE 4749 } 4750 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == COMMENT_STATE { 4751 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(Z_NULL) { 4752 var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc 4753 var val int32 4754 for __ccgo5 := true; __ccgo5; __ccgo5 = val != 0 { 4755 if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 4756 for __ccgo6 := true; __ccgo6; __ccgo6 = 0 != 0 { 4757 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 4758 (*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)) 4759 } 4760 } 4761 flush_pending(tls, strm) 4762 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 4763 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 4764 return Z_OK 4765 } 4766 beg = uint64(0) 4767 } 4768 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))))) 4769 { 4770 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val) 4771 } 4772 4773 } 4774 for __ccgo7 := true; __ccgo7; __ccgo7 = 0 != 0 { 4775 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg { 4776 (*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)) 4777 } 4778 } 4779 } 4780 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = HCRC_STATE 4781 } 4782 if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == HCRC_STATE { 4783 if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { 4784 if (*Deflate_state)(unsafe.Pointer(s)).Fpending+uint64(2) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size { 4785 flush_pending(tls, strm) 4786 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 4787 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 4788 return Z_OK 4789 } 4790 } 4791 { 4792 *(*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)) 4793 } 4794 4795 { 4796 *(*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)) 4797 } 4798 4799 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 4800 } 4801 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE 4802 4803 // Compression must start with an empty pending buffer 4804 flush_pending(tls, strm) 4805 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 4806 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 4807 return Z_OK 4808 } 4809 } 4810 4811 // Start a new block or continue the current one. 4812 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 { 4813 var bstate Block_state 4814 4815 if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 { 4816 bstate = deflate_stored(tls, s, flush) 4817 } else { 4818 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_HUFFMAN_ONLY { 4819 bstate = deflate_huff(tls, s, flush) 4820 } else { 4821 if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_RLE { 4822 bstate = deflate_rle(tls, s, flush) 4823 } else { 4824 bstate = (*struct { 4825 f func(*libc.TLS, uintptr, int32) Block_state 4826 })(unsafe.Pointer(&struct{ uintptr }{configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc})).f(tls, s, flush) 4827 } 4828 } 4829 } 4830 4831 if bstate == Finish_started || bstate == Finish_done { 4832 (*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE 4833 } 4834 if bstate == Need_more || bstate == Finish_started { 4835 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 4836 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR next call, see above 4837 } 4838 return Z_OK 4839 // If flush != Z_NO_FLUSH && avail_out == 0, the next call 4840 // of deflate should use the same flush parameter to make sure 4841 // that the flush is complete. So we don't have to output an 4842 // empty block here, this will be done at next call. This also 4843 // ensures that for a very small output buffer, we emit at most 4844 // one empty block. 4845 } 4846 if bstate == Block_done { 4847 if flush == Z_PARTIAL_FLUSH { 4848 X_tr_align(tls, s) 4849 } else if flush != Z_BLOCK { // FULL_FLUSH or SYNC_FLUSH 4850 X_tr_stored_block(tls, s, uintptr(0), uint64(0), 0) 4851 // For a full flush, this empty block will be recognized 4852 // as a special marker by inflate_sync(). 4853 if flush == Z_FULL_FLUSH { 4854 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL) 4855 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)))) 4856 // forget history 4857 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 4858 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 4859 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 4860 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 4861 } 4862 } 4863 } 4864 flush_pending(tls, strm) 4865 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 4866 (*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR at next call, see above 4867 return Z_OK 4868 } 4869 } 4870 } 4871 4872 if flush != Z_FINISH { 4873 return Z_OK 4874 } 4875 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap <= 0 { 4876 return Z_STREAM_END 4877 } 4878 4879 // Write the trailer 4880 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 { 4881 { 4882 *(*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)) 4883 } 4884 4885 { 4886 *(*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)) 4887 } 4888 4889 { 4890 *(*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)) 4891 } 4892 4893 { 4894 *(*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)) 4895 } 4896 4897 { 4898 *(*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)) 4899 } 4900 4901 { 4902 *(*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)) 4903 } 4904 4905 { 4906 *(*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)) 4907 } 4908 4909 { 4910 *(*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)) 4911 } 4912 4913 } else { 4914 putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler>>16)) 4915 putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler&uint64(0xffff))) 4916 } 4917 flush_pending(tls, strm) 4918 // If avail_out is zero, the application will call deflate again 4919 // to flush the rest. 4920 if (*Deflate_state)(unsafe.Pointer(s)).Fwrap > 0 { 4921 (*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap 4922 } // write the trailer only once! 4923 if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { 4924 return Z_OK 4925 } 4926 return Z_STREAM_END 4927 } 4928 4929 // ========================================================================= 4930 func XdeflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:1076:13: */ 4931 var status int32 4932 4933 if deflateStateCheck(tls, strm) != 0 { 4934 return -2 4935 } 4936 4937 status = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus 4938 4939 /* Deallocate in reverse order of allocations: */ 4940 { 4941 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 { 4942 (*struct { 4943 f func(*libc.TLS, Voidpf, Voidpf) 4944 })(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) 4945 } 4946 } 4947 4948 { 4949 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 { 4950 (*struct { 4951 f func(*libc.TLS, Voidpf, Voidpf) 4952 })(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) 4953 } 4954 } 4955 4956 { 4957 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 { 4958 (*struct { 4959 f func(*libc.TLS, Voidpf, Voidpf) 4960 })(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) 4961 } 4962 } 4963 4964 { 4965 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 { 4966 (*struct { 4967 f func(*libc.TLS, Voidpf, Voidpf) 4968 })(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) 4969 } 4970 } 4971 4972 (*struct { 4973 f func(*libc.TLS, Voidpf, Voidpf) 4974 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 4975 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 4976 4977 if status == BUSY_STATE { 4978 return -3 4979 } 4980 return Z_OK 4981 } 4982 4983 // ========================================================================= 4984 // Copy the source state to the destination state. 4985 // To simplify the source, this is not supported for 16-bit MSDOS (which 4986 // doesn't have enough memory anyway to duplicate compression states). 4987 func XdeflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* deflate.c:1102:13: */ 4988 var ds uintptr 4989 var ss uintptr 4990 var overlay uintptr 4991 4992 if deflateStateCheck(tls, source) != 0 || dest == uintptr(Z_NULL) { 4993 return -2 4994 } 4995 4996 ss = (*Z_stream)(unsafe.Pointer(source)).Fstate 4997 4998 libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{}))) 4999 5000 ds = (*struct { 5001 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5002 })(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{}))) 5003 if ds == uintptr(Z_NULL) { 5004 return -4 5005 } 5006 (*Z_stream)(unsafe.Pointer(dest)).Fstate = ds 5007 libc.Xmemcpy(tls, ds, ss, uint64(unsafe.Sizeof(Deflate_state{}))) 5008 (*Deflate_state)(unsafe.Pointer(ds)).Fstrm = dest 5009 5010 (*Deflate_state)(unsafe.Pointer(ds)).Fwindow = (*struct { 5011 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5012 })(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))))) 5013 (*Deflate_state)(unsafe.Pointer(ds)).Fprev = (*struct { 5014 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5015 })(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)))) 5016 (*Deflate_state)(unsafe.Pointer(ds)).Fhead = (*struct { 5017 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5018 })(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)))) 5019 overlay = (*struct { 5020 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 5021 })(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))) 5022 (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf = overlay 5023 5024 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) { 5025 XdeflateEnd(tls, dest) 5026 return -4 5027 } 5028 // following zmemcpy do not work for 16-bit MSDOS 5029 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)))) 5030 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)))) 5031 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)))) 5032 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))) 5033 5034 (*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) 5035 (*Deflate_state)(unsafe.Pointer(ds)).Fd_buf = overlay + uintptr(uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0))))*2 5036 (*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)) 5037 5038 (*Deflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 212 /* &.dyn_ltree */ 5039 (*Deflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2504 /* &.dyn_dtree */ 5040 (*Deflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2748 /* &.bl_tree */ 5041 5042 return Z_OK 5043 } 5044 5045 // =========================================================================== 5046 // Read a new buffer from the current input stream, update the adler32 5047 // and total number of bytes read. All deflate() input goes through 5048 // this function so some applications may wish to modify it to avoid 5049 // allocating a large strm->next_in buffer and copying from it. 5050 // (See also flush_pending()). 5051 func read_buf(tls *libc.TLS, strm Z_streamp, buf uintptr, size uint32) uint32 { /* deflate.c:1164:16: */ 5052 var len uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 5053 5054 if len > size { 5055 len = size 5056 } 5057 if len == uint32(0) { 5058 return uint32(0) 5059 } 5060 5061 *(*UInt)(unsafe.Pointer(strm + 8)) -= len 5062 5063 libc.Xmemcpy(tls, buf, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(len)) 5064 if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 1 { 5065 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 5066 } else if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 2 { 5067 (*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len) 5068 } 5069 *(*uintptr)(unsafe.Pointer(strm)) += uintptr(len) 5070 *(*ULong)(unsafe.Pointer(strm + 16)) += ULong(len) 5071 5072 return len 5073 } 5074 5075 // =========================================================================== 5076 // Initialize the "longest match" routines for a new zlib stream 5077 func lm_init(tls *libc.TLS, s uintptr) { /* deflate.c:1194:12: */ 5078 (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size = uint64(2) * Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 5079 5080 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL) 5081 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)))) 5082 5083 // Set the default configuration parameters: 5084 (*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy) 5085 (*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length) 5086 (*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length) 5087 (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain) 5088 5089 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0) 5090 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0 5091 (*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0) 5092 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 5093 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+184, UInt(MIN_MATCH-1)) 5094 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 5095 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(0) 5096 } 5097 5098 // =========================================================================== 5099 // Set match_start to the longest match starting at the given string and 5100 // return its length. Matches shorter or equal to prev_length are discarded, 5101 // in which case the result is equal to prev_length and match_start is 5102 // garbage. 5103 // IN assertions: cur_match is the head of the hash chain for the current 5104 // 5105 // string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 5106 // 5107 // OUT assertion: the match length is not greater than s->lookahead. 5108 // For 80x86 and 680x0, an optimized version will be provided in match.asm or 5109 // match.S. The code will be functionally equivalent. 5110 func longest_match(tls *libc.TLS, s uintptr, cur_match IPos) UInt { /* deflate.c:1236:12: */ 5111 var chain_length uint32 = (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length // max hash chain length 5112 var scan uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) // current string 5113 var match uintptr // matched string 5114 var len int32 // length of current match 5115 var best_len int32 = int32((*Deflate_state)(unsafe.Pointer(s)).Fprev_length) // best match length so far 5116 var nice_match int32 = (*Deflate_state)(unsafe.Pointer(s)).Fnice_match // stop if match long enough 5117 var limit IPos 5118 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > (*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1) { 5119 limit = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(MAX_MATCH+MIN_MATCH+1)) 5120 } else { 5121 limit = uint32(NIL) 5122 } 5123 // Stop when cur_match becomes <= limit. To simplify the code, 5124 // we prevent matches with the string of window index 0. 5125 var prev uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fprev 5126 var wmask UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_mask 5127 5128 var strend uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(MAX_MATCH) 5129 var scan_end1 Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len-1))) 5130 var scan_end Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 5131 5132 // The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. 5133 // It is easy to get rid of this optimization if necessary. 5134 5135 // Do not waste too much time if we already have a good match: 5136 if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Deflate_state)(unsafe.Pointer(s)).Fgood_match { 5137 chain_length >>= 2 5138 } 5139 // Do not look for matches beyond the end of the input. This is necessary 5140 // to make deflate deterministic. 5141 if UInt(nice_match) > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 5142 nice_match = int32((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 5143 } 5144 5145 for __ccgo := true; __ccgo; __ccgo = libc.AssignUint32(&cur_match, IPos(*(*Posf)(unsafe.Pointer(prev + uintptr(cur_match&wmask)*2)))) > limit && 5146 libc.PreDecUint32(&chain_length, 1) != uint32(0) { 5147 5148 match = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(cur_match) 5149 5150 // Skip to next match if the match length cannot increase 5151 // or if the match length is less than 2. Note that the checks below 5152 // for insufficient lookahead only occur occasionally for performance 5153 // reasons. Therefore uninitialized memory will be accessed, and 5154 // conditional jumps will be made that depend on those values. 5155 // However the length of the match is limited to the lookahead, so 5156 // the output of deflate is not affected by the uninitialized values. 5157 5158 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))) { 5159 continue 5160 } 5161 5162 // The check at best_len-1 can be removed because it will be made 5163 // again later. (This heuristic is not always a win.) 5164 // It is not necessary to compare scan[2] and match[2] since they 5165 // are always equal when the other bytes match, given that 5166 // the hash keys are equal and that HASH_BITS >= 8. 5167 scan += uintptr(2) 5168 match++ 5169 5170 // We check for insufficient lookahead only every 8th comparison; 5171 // the 256th check will be made at strstart+258. 5172 for __ccgo1 := true; __ccgo1; __ccgo1 = int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && scan < strend { 5173 } 5174 5175 len = MAX_MATCH - int32((int64(strend)-int64(scan))/1) 5176 scan = strend - uintptr(MAX_MATCH) 5177 5178 if len > best_len { 5179 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match 5180 best_len = len 5181 if len >= nice_match { 5182 break 5183 } 5184 scan_end1 = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len-1))) 5185 scan_end = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len))) 5186 } 5187 } 5188 5189 if UInt(best_len) <= (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 5190 return UInt(best_len) 5191 } 5192 return (*Deflate_state)(unsafe.Pointer(s)).Flookahead 5193 } 5194 5195 // =========================================================================== 5196 // Fill the window when the lookahead becomes insufficient. 5197 // Updates strstart and lookahead. 5198 // 5199 // IN assertion: lookahead < MIN_LOOKAHEAD 5200 // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD 5201 // 5202 // At least one byte has been read, or avail_in == 0; reads are 5203 // performed for at least two bytes (required for the zip translate_eol 5204 // option -- not supported here). 5205 func fill_window(tls *libc.TLS, s uintptr) { /* deflate.c:1482:12: */ 5206 var n uint32 5207 var more uint32 // Amount of free space at the end of the window. 5208 var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 5209 5210 for __ccgo := true; __ccgo; __ccgo = (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in != UInt(0) { 5211 more = uint32((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead) - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) 5212 5213 // Deal with !@#$% 64K limit: 5214 if uint64(unsafe.Sizeof(int32(0))) <= uint64(2) { 5215 if more == uint32(0) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart == UInt(0) && (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 5216 more = wsize 5217 5218 } else if more == libc.Uint32(libc.Uint32FromInt32(-1)) { 5219 // Very unlikely, but possible on 16 bit machine if 5220 // strstart == 0 && lookahead == 1 (input done a byte at time) 5221 more-- 5222 } 5223 } 5224 5225 // If the window is almost full and there is insufficient lookahead, 5226 // move the upper half to the lower one to make room in the upper half. 5227 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart >= wsize+((*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1)) { 5228 5229 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(wsize), uint64(wsize-more)) 5230 *(*UInt)(unsafe.Pointer(s + 176)) -= wsize 5231 *(*UInt)(unsafe.Pointer(s + 172)) -= wsize // we now have strstart >= MAX_DIST 5232 *(*int64)(unsafe.Pointer(s + 152)) -= int64(wsize) 5233 slide_hash(tls, s) 5234 more = more + wsize 5235 } 5236 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) { 5237 break 5238 } 5239 5240 // If there was no sliding: 5241 // strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && 5242 // more == window_size - lookahead - strstart 5243 // => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) 5244 // => more >= window_size - 2*WSIZE + 2 5245 // In the BIG_MEM or MMAP case (not yet supported), 5246 // window_size == input_size + MIN_LOOKAHEAD && 5247 // strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. 5248 // Otherwise, window_size == 2*WSIZE so more >= 2. 5249 // If there was sliding, more >= WSIZE. So in all cases, more >= 2. 5250 5251 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) 5252 *(*UInt)(unsafe.Pointer(s + 180)) += n 5253 5254 // Initialize the hash value now that we have some input: 5255 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead+(*Deflate_state)(unsafe.Pointer(s)).Finsert >= UInt(MIN_MATCH) { 5256 var str UInt = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Finsert 5257 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str)))) 5258 (*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 5259 for (*Deflate_state)(unsafe.Pointer(s)).Finsert != 0 { 5260 (*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 5261 *(*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)) 5262 *(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str) 5263 str++ 5264 (*Deflate_state)(unsafe.Pointer(s)).Finsert-- 5265 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead+(*Deflate_state)(unsafe.Pointer(s)).Finsert < UInt(MIN_MATCH) { 5266 break 5267 } 5268 } 5269 } 5270 // If the whole input has less than MIN_MATCH bytes, ins_h is garbage, 5271 // but this is not important since only literal bytes will be emitted. 5272 5273 } 5274 5275 // If the WIN_INIT bytes after the end of the current data have never been 5276 // written, then zero those bytes in order to avoid memory check reports of 5277 // the use of uninitialized (or uninitialised as Julian writes) bytes by 5278 // the longest match routines. Update the high water mark for the next 5279 // time through here. WIN_INIT is set to MAX_MATCH since the longest match 5280 // routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. 5281 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size { 5282 var curr Ulg = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead) 5283 var init1 Ulg 5284 5285 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr { 5286 // Previous high water mark below current data -- zero WIN_INIT 5287 // bytes or up to end of window, whichever is less. 5288 init1 = (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - curr 5289 if init1 > uint64(MAX_MATCH) { 5290 init1 = uint64(MAX_MATCH) 5291 } 5292 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(curr), 0, uint64(uint32(init1))) 5293 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = curr + init1 5294 } else if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr+uint64(MAX_MATCH) { 5295 // High water mark at or above current data, but below current data 5296 // plus WIN_INIT -- zero out to current data plus WIN_INIT, or up 5297 // to end of window, whichever is less. 5298 init1 = curr + uint64(MAX_MATCH) - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water 5299 if init1 > (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size-(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water { 5300 init1 = (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water 5301 } 5302 libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water), 0, uint64(uint32(init1))) 5303 *(*Ulg)(unsafe.Pointer(s + 5944)) += init1 5304 } 5305 } 5306 5307 } 5308 5309 // =========================================================================== 5310 // Flush the current block, with given end-of-file flag. 5311 // IN assertion: strstart is set to the end of the current match. 5312 5313 // Same but force premature exit if necessary. 5314 5315 // Maximum stored block length in deflate format (not including header). 5316 5317 // Minimum of a and b. 5318 5319 // =========================================================================== 5320 // Copy without compression as much as possible from the input stream, return 5321 // the current block state. 5322 // 5323 // In case deflateParams() is used to later switch to a non-zero compression 5324 // level, s->matches (otherwise unused when storing) keeps track of the number 5325 // of hash table slides to perform. If s->matches is 1, then one hash table 5326 // slide will be done when switching. If s->matches is 2, the maximum value 5327 // allowed here, then the hash table will be cleared, since two or more slides 5328 // is the same as a clear. 5329 // 5330 // deflate_stored() is written to minimize the number of times an input byte is 5331 // copied. It is most efficient with large input and output buffers, which 5332 // maximizes the opportunites to have a single copy from next_in to next_out. 5333 func deflate_stored(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1643:19: */ 5334 // Smallest worthy block size when not flushing or finishing. By default 5335 // this is 32K. This can be as small as 507 bytes for memLevel == 1. For 5336 // large input and output buffers, the stored block size will be larger. 5337 var min_block uint32 = func() uint32 { 5338 if (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size-uint64(5) > Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size) { 5339 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 5340 } 5341 return uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(5)) 5342 }() 5343 5344 // Copy as many min_block or larger stored blocks directly to next_out as 5345 // possible. If flushing, copy the remaining available input to next_out as 5346 // stored blocks, if there is enough space. 5347 var len uint32 5348 var left uint32 5349 var have uint32 5350 var last uint32 = uint32(0) 5351 var used uint32 = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 5352 for __ccgo := true; __ccgo; __ccgo = last == uint32(0) { 5353 // Set len to the maximum size block that we can copy directly with the 5354 // available input data and output space. Set left to how much of that 5355 // would be copied from what's left in the window. 5356 len = uint32(MAX_STORED) // maximum deflate stored block length 5357 have = uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3) // number of header bytes 5358 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { // need room for header 5359 break 5360 } 5361 // maximum stored block length that will fit in avail_out: 5362 have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have 5363 left = uint32(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start) // bytes left in window 5364 if Ulg(len) > Ulg(left)+Ulg((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) { 5365 len = left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 5366 } // limit len to the input 5367 if len > have { 5368 len = have 5369 } // limit len to the output 5370 5371 // If the stored block would be less than min_block in length, or if 5372 // unable to copy all of the available input when flushing, then try 5373 // copying to the window and the pending buffer instead. Also don't 5374 // write an empty block when flushing -- deflate() does that. 5375 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) { 5376 break 5377 } 5378 5379 // Make a dummy stored block in pending to get the header bytes, 5380 // including any pending bits. This also updates the debugging counts. 5381 if flush == Z_FINISH && len == left+(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in { 5382 last = uint32(1) 5383 } else { 5384 last = uint32(0) 5385 } 5386 X_tr_stored_block(tls, s, uintptr(0), uint64(0), int32(last)) 5387 5388 // Replace the lengths in the dummy stored block with len. 5389 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-uint64(4)))) = Bytef(len) 5390 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-uint64(3)))) = Bytef(len >> 8) 5391 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-uint64(2)))) = Bytef(^len) 5392 *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-uint64(1)))) = Bytef(^len >> 8) 5393 5394 // Write the stored block header bytes. 5395 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 5396 5397 // Copy uncompressed bytes from the window to next_out. 5398 if left != 0 { 5399 if left > len { 5400 left = len 5401 } 5402 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)) 5403 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24)) += uintptr(left) 5404 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 32)) -= left 5405 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 40)) += ULong(left) 5406 *(*int64)(unsafe.Pointer(s + 152)) += int64(left) 5407 len = len - left 5408 } 5409 5410 // Copy uncompressed bytes directly from next_in to next_out, updating 5411 // the check value. 5412 if len != 0 { 5413 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len) 5414 *(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24)) += uintptr(len) 5415 *(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 32)) -= len 5416 *(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 40)) += ULong(len) 5417 } 5418 } 5419 5420 // Update the sliding window with the last s->w_size bytes of the copied 5421 // data, or append all of the copied data to the existing window if less 5422 // than s->w_size bytes were copied. Also update the number of bytes to 5423 // insert in the hash tables, in the event that deflateParams() switches to 5424 // a non-zero compression level. 5425 used = used - (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in // number of input bytes directly copied 5426 if used != 0 { 5427 // If any input was used, then no unused input remains in the window, 5428 // therefore s->block_start == s->strstart. 5429 if used >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { // supplant the previous history 5430 (*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(2) // clear hash 5431 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)) 5432 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart = (*Deflate_state)(unsafe.Pointer(s)).Fw_size 5433 } else { 5434 if (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size-Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) <= Ulg(used) { 5435 // Slide the window down. 5436 *(*UInt)(unsafe.Pointer(s + 172)) -= (*Deflate_state)(unsafe.Pointer(s)).Fw_size 5437 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)) 5438 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 5439 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 5440 } // add a pending slide_hash() 5441 } 5442 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)) 5443 *(*UInt)(unsafe.Pointer(s + 172)) += used 5444 } 5445 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 5446 *(*UInt)(unsafe.Pointer(s + 5932)) += func() uint32 { 5447 if used > (*Deflate_state)(unsafe.Pointer(s)).Fw_size-(*Deflate_state)(unsafe.Pointer(s)).Finsert { 5448 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert 5449 } 5450 return used 5451 }() 5452 } 5453 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 5454 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 5455 } 5456 5457 // If the last block was written to next_out, then done. 5458 if last != 0 { 5459 return Finish_done 5460 } 5461 5462 // If flushing and all input has been consumed, then done. 5463 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 { 5464 return Block_done 5465 } 5466 5467 // Fill the window with any remaining input. 5468 have = uint32((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint64(1)) 5469 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) { 5470 // Slide the window down. 5471 *(*int64)(unsafe.Pointer(s + 152)) -= int64((*Deflate_state)(unsafe.Pointer(s)).Fw_size) 5472 *(*UInt)(unsafe.Pointer(s + 172)) -= (*Deflate_state)(unsafe.Pointer(s)).Fw_size 5473 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)) 5474 if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) { 5475 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 5476 } // add a pending slide_hash() 5477 have = have + (*Deflate_state)(unsafe.Pointer(s)).Fw_size // more space now 5478 } 5479 if have > (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in { 5480 have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in 5481 } 5482 if have != 0 { 5483 read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart), have) 5484 *(*UInt)(unsafe.Pointer(s + 172)) += have 5485 } 5486 if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) { 5487 (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 5488 } 5489 5490 // There was not enough avail_out to write a complete worthy or flushed 5491 // stored block to next_out. Write a stored block to pending instead, if we 5492 // have enough input for a worthy block, or if flushing and there is enough 5493 // room for the remaining input as a stored block in the pending buffer. 5494 have = uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3) // number of header bytes 5495 // maximum stored block length that will fit in pending: 5496 have = func() uint32 { 5497 if (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size-Ulg(have) > uint64(MAX_STORED) { 5498 return uint32(MAX_STORED) 5499 } 5500 return uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have)) 5501 }() 5502 min_block = func() uint32 { 5503 if have > (*Deflate_state)(unsafe.Pointer(s)).Fw_size { 5504 return (*Deflate_state)(unsafe.Pointer(s)).Fw_size 5505 } 5506 return have 5507 }() 5508 left = uint32(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start) 5509 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 { 5510 len = func() uint32 { 5511 if left > have { 5512 return have 5513 } 5514 return left 5515 }() 5516 if flush == Z_FINISH && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) && len == left { 5517 last = uint32(1) 5518 } else { 5519 last = uint32(0) 5520 } 5521 X_tr_stored_block(tls, s, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start), uint64(len), int32(last)) 5522 *(*int64)(unsafe.Pointer(s + 152)) += int64(len) 5523 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 5524 } 5525 5526 // We've done all we can with the available input and output. 5527 if last != 0 { 5528 return Finish_started 5529 } 5530 return Need_more 5531 } 5532 5533 // =========================================================================== 5534 // Compress as much as possible from the input stream, return the current 5535 // block state. 5536 // This function does not perform lazy evaluation of matches and inserts 5537 // new strings in the dictionary only for unmatched strings or for short 5538 // matches. It is used only for the fast compression options. 5539 func deflate_fast(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1824:19: */ 5540 var hash_head IPos // head of the hash chain 5541 var bflush int32 // set if current block must be flushed 5542 5543 for { 5544 // Make sure that we always have enough lookahead, except 5545 // at the end of the input file. We need MAX_MATCH bytes 5546 // for the next match, plus MIN_MATCH bytes to insert the 5547 // string following the next match. 5548 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) { 5549 fill_window(tls, s) 5550 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && flush == Z_NO_FLUSH { 5551 return Need_more 5552 } 5553 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 5554 break 5555 } // flush the current block 5556 } 5557 5558 // Insert the string window[strstart .. strstart+2] in the 5559 // dictionary, and set hash_head to the head of the hash chain: 5560 hash_head = IPos(NIL) 5561 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 5562 (*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 5563 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)))) 5564 *(*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) 5565 } 5566 5567 // Find the longest match, discarding those <= prev_length. 5568 // At this point we have always match_length < MIN_MATCH 5569 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) { 5570 // To simplify the code, we prevent matches with the string 5571 // of window index 0 (in particular we have to avoid a match 5572 // of the string with itself at the start of the input file). 5573 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 5574 // longest_match() sets match_start 5575 } 5576 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 5577 5578 { 5579 var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH)) 5580 var dist Ush = Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start) 5581 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 5582 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 5583 dist-- 5584 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++ 5585 *(*Ush)(unsafe.Pointer(s + 2504 + uintptr(func() int32 { 5586 if int32(dist) < 256 { 5587 return int32(X_dist_code[dist]) 5588 } 5589 return int32(X_dist_code[256+int32(dist)>>7]) 5590 }())*4))++ 5591 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 5592 } 5593 5594 *(*UInt)(unsafe.Pointer(s + 180)) -= (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 5595 5596 // Insert new strings in the hash table only if the match length 5597 // is not too large. This saves time but degrades compression. 5598 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) { 5599 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length-- // string at strstart already in table 5600 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length, 1) != UInt(0) { 5601 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 5602 (*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 5603 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)))) 5604 *(*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) 5605 // strstart never exceeds WSIZE-MAX_MATCH, so there are 5606 // always MIN_MATCH bytes ahead. 5607 } 5608 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 5609 } else { 5610 *(*UInt)(unsafe.Pointer(s + 172)) += (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 5611 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 5612 (*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))) 5613 (*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 5614 // If lookahead < MIN_MATCH, ins_h is garbage, but it does not 5615 // matter since it will be recomputed at next deflate call. 5616 } 5617 } else { 5618 // No match, output a literal byte 5619 5620 { 5621 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 5622 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 5623 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 5624 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(cc)*4))++ 5625 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 5626 } 5627 5628 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 5629 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 5630 } 5631 if bflush != 0 { 5632 { 5633 X_tr_flush_block(tls, s, func() uintptr { 5634 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 5635 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 5636 } 5637 return uintptr(Z_NULL) 5638 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 5639 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 5640 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 5641 } 5642 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 5643 if 0 != 0 { 5644 return Finish_started 5645 } 5646 return Need_more 5647 } 5648 } 5649 5650 } 5651 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 5652 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < UInt(MIN_MATCH-1) { 5653 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 5654 } 5655 return uint32(MIN_MATCH - 1) 5656 }() 5657 if flush == Z_FINISH { 5658 { 5659 { 5660 X_tr_flush_block(tls, s, func() uintptr { 5661 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 5662 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 5663 } 5664 return uintptr(Z_NULL) 5665 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1) 5666 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 5667 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 5668 } 5669 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 5670 if 1 != 0 { 5671 return Finish_started 5672 } 5673 return Need_more 5674 } 5675 } 5676 5677 return Finish_done 5678 } 5679 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 5680 { 5681 X_tr_flush_block(tls, s, func() uintptr { 5682 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 5683 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 5684 } 5685 return uintptr(Z_NULL) 5686 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 5687 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 5688 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 5689 } 5690 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 5691 if 0 != 0 { 5692 return Finish_started 5693 } 5694 return Need_more 5695 } 5696 } 5697 5698 return Block_done 5699 } 5700 5701 // =========================================================================== 5702 // Same as above, but achieves better compression. We use a lazy 5703 // evaluation for matches: a match is finally adopted only if there is 5704 // no better match at the next window position. 5705 func deflate_slow(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1926:19: */ 5706 var hash_head IPos // head of hash chain 5707 var bflush int32 // set if current block must be flushed 5708 5709 // Process the input block. 5710 for { 5711 // Make sure that we always have enough lookahead, except 5712 // at the end of the input file. We need MAX_MATCH bytes 5713 // for the next match, plus MIN_MATCH bytes to insert the 5714 // string following the next match. 5715 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) { 5716 fill_window(tls, s) 5717 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && flush == Z_NO_FLUSH { 5718 return Need_more 5719 } 5720 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 5721 break 5722 } // flush the current block 5723 } 5724 5725 // Insert the string window[strstart .. strstart+2] in the 5726 // dictionary, and set hash_head to the head of the hash chain: 5727 hash_head = IPos(NIL) 5728 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) { 5729 (*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 5730 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)))) 5731 *(*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) 5732 } 5733 5734 // Find the longest match, discarding those <= prev_length. 5735 (*Deflate_state)(unsafe.Pointer(s)).Fprev_length = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 5736 (*Deflate_state)(unsafe.Pointer(s)).Fprev_match = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start 5737 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1) 5738 5739 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) { 5740 // To simplify the code, we prevent matches with the string 5741 // of window index 0 (in particular we have to avoid a match 5742 // of the string with itself at the start of the input file). 5743 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head) 5744 // longest_match() sets match_start 5745 5746 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= UInt(5) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FILTERED || 5747 (*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)) { 5748 5749 // If prev_match is also MIN_MATCH, match_start is garbage 5750 // but we will ignore the current match anyway. 5751 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1) 5752 } 5753 } 5754 // If there was a match at the previous step and the current 5755 // match is not better, output the previous match: 5756 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 { 5757 var max_insert UInt = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead - UInt(MIN_MATCH) 5758 // Do not insert strings in hash table beyond this. 5759 5760 { 5761 var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(MIN_MATCH)) 5762 var dist Ush = Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1) - (*Deflate_state)(unsafe.Pointer(s)).Fprev_match) 5763 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 5764 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 5765 dist-- 5766 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++ 5767 *(*Ush)(unsafe.Pointer(s + 2504 + uintptr(func() int32 { 5768 if int32(dist) < 256 { 5769 return int32(X_dist_code[dist]) 5770 } 5771 return int32(X_dist_code[256+int32(dist)>>7]) 5772 }())*4))++ 5773 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 5774 } 5775 5776 // Insert in hash table all strings up to the end of the match. 5777 // strstart-1 and strstart are already inserted. If there is not 5778 // enough lookahead, the last two strings are not inserted in 5779 // the hash table. 5780 *(*UInt)(unsafe.Pointer(s + 180)) -= (*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(1) 5781 *(*UInt)(unsafe.Pointer(s + 184)) -= UInt(2) 5782 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fprev_length, 1) != UInt(0) { 5783 if libc.PreIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fstrstart, 1) <= max_insert { 5784 (*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 5785 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)))) 5786 *(*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) 5787 } 5788 } 5789 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 5790 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1) 5791 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 5792 5793 if bflush != 0 { 5794 { 5795 X_tr_flush_block(tls, s, func() uintptr { 5796 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 5797 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 5798 } 5799 return uintptr(Z_NULL) 5800 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 5801 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 5802 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 5803 } 5804 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 5805 if 0 != 0 { 5806 return Finish_started 5807 } 5808 return Need_more 5809 } 5810 } 5811 5812 } else if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 5813 // If there was no match at the previous position, output a 5814 // single literal. If there was a match but the current match 5815 // is longer, truncate the previous match to a single literal. 5816 5817 { 5818 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart-UInt(1)))) 5819 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 5820 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 5821 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(cc)*4))++ 5822 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 5823 } 5824 5825 if bflush != 0 { 5826 { 5827 X_tr_flush_block(tls, s, func() uintptr { 5828 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 5829 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 5830 } 5831 return uintptr(Z_NULL) 5832 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 5833 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 5834 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 5835 } 5836 5837 } 5838 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 5839 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 5840 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 5841 return Need_more 5842 } 5843 } else { 5844 // There is no previous match to compare with, wait for 5845 // the next step to decide. 5846 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 1 5847 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 5848 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 5849 } 5850 } 5851 5852 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { 5853 5854 { 5855 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart-UInt(1)))) 5856 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 5857 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 5858 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(cc)*4))++ 5859 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 5860 } 5861 5862 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 5863 } 5864 (*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 { 5865 if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < UInt(MIN_MATCH-1) { 5866 return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart 5867 } 5868 return uint32(MIN_MATCH - 1) 5869 }() 5870 if flush == Z_FINISH { 5871 { 5872 { 5873 X_tr_flush_block(tls, s, func() uintptr { 5874 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 5875 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 5876 } 5877 return uintptr(Z_NULL) 5878 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1) 5879 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 5880 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 5881 } 5882 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 5883 if 1 != 0 { 5884 return Finish_started 5885 } 5886 return Need_more 5887 } 5888 } 5889 5890 return Finish_done 5891 } 5892 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 5893 { 5894 X_tr_flush_block(tls, s, func() uintptr { 5895 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 5896 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 5897 } 5898 return uintptr(Z_NULL) 5899 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 5900 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 5901 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 5902 } 5903 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 5904 if 0 != 0 { 5905 return Finish_started 5906 } 5907 return Need_more 5908 } 5909 } 5910 5911 return Block_done 5912 } 5913 5914 // =========================================================================== 5915 // For Z_RLE, simply look for runs of bytes, generate matches only of distance 5916 // one. Do not maintain a hash table. (It will be regenerated if this run of 5917 // deflate switches away from Z_RLE.) 5918 func deflate_rle(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2057:19: */ 5919 var bflush int32 // set if current block must be flushed 5920 var prev UInt // byte at distance one to match 5921 var scan uintptr 5922 var strend uintptr // scan goes up to strend for length of run 5923 5924 for { 5925 // Make sure that we always have enough lookahead, except 5926 // at the end of the input file. We need MAX_MATCH bytes 5927 // for the longest run, plus one for the unrolled loop. 5928 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) { 5929 fill_window(tls, s) 5930 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) && flush == Z_NO_FLUSH { 5931 return Need_more 5932 } 5933 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 5934 break 5935 } // flush the current block 5936 } 5937 5938 // See how many times the previous byte repeats 5939 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 5940 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > UInt(0) { 5941 scan = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uintptr(1) 5942 prev = UInt(*(*Bytef)(unsafe.Pointer(scan))) 5943 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)))) { 5944 strend = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(MAX_MATCH) 5945 for __ccgo := true; __ccgo; __ccgo = prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && scan < strend { 5946 } 5947 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MAX_MATCH) - UInt((int64(strend)-int64(scan))/1) 5948 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Deflate_state)(unsafe.Pointer(s)).Flookahead { 5949 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Deflate_state)(unsafe.Pointer(s)).Flookahead 5950 } 5951 } 5952 5953 } 5954 5955 // Emit match if have run of MIN_MATCH or longer, else emit literal 5956 if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) { 5957 5958 { 5959 var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH)) 5960 var dist Ush = Ush(1) 5961 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist 5962 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len 5963 dist-- 5964 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++ 5965 *(*Ush)(unsafe.Pointer(s + 2504 + uintptr(func() int32 { 5966 if int32(dist) < 256 { 5967 return int32(X_dist_code[dist]) 5968 } 5969 return int32(X_dist_code[256+int32(dist)>>7]) 5970 }())*4))++ 5971 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 5972 } 5973 5974 *(*UInt)(unsafe.Pointer(s + 180)) -= (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 5975 *(*UInt)(unsafe.Pointer(s + 172)) += (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length 5976 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 5977 } else { 5978 // No match, output a literal byte 5979 5980 { 5981 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 5982 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 5983 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 5984 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(cc)*4))++ 5985 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 5986 } 5987 5988 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 5989 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 5990 } 5991 if bflush != 0 { 5992 { 5993 X_tr_flush_block(tls, s, func() uintptr { 5994 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 5995 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 5996 } 5997 return uintptr(Z_NULL) 5998 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 5999 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6000 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6001 } 6002 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6003 if 0 != 0 { 6004 return Finish_started 6005 } 6006 return Need_more 6007 } 6008 } 6009 6010 } 6011 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 6012 if flush == Z_FINISH { 6013 { 6014 { 6015 X_tr_flush_block(tls, s, func() uintptr { 6016 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6017 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 6018 } 6019 return uintptr(Z_NULL) 6020 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1) 6021 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6022 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6023 } 6024 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6025 if 1 != 0 { 6026 return Finish_started 6027 } 6028 return Need_more 6029 } 6030 } 6031 6032 return Finish_done 6033 } 6034 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 6035 { 6036 X_tr_flush_block(tls, s, func() uintptr { 6037 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6038 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 6039 } 6040 return uintptr(Z_NULL) 6041 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 6042 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6043 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6044 } 6045 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6046 if 0 != 0 { 6047 return Finish_started 6048 } 6049 return Need_more 6050 } 6051 } 6052 6053 return Block_done 6054 } 6055 6056 // =========================================================================== 6057 // For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. 6058 // (It will be regenerated if this run of deflate switches away from Huffman.) 6059 func deflate_huff(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2130:19: */ 6060 var bflush int32 // set if current block must be flushed 6061 6062 for { 6063 // Make sure that we have a literal to write. 6064 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 6065 fill_window(tls, s) 6066 if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) { 6067 if flush == Z_NO_FLUSH { 6068 return Need_more 6069 } 6070 break // flush the current block 6071 } 6072 } 6073 6074 // Output a literal byte 6075 (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0) 6076 6077 { 6078 var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))) 6079 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0) 6080 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc 6081 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(cc)*4))++ 6082 bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 6083 } 6084 6085 (*Deflate_state)(unsafe.Pointer(s)).Flookahead-- 6086 (*Deflate_state)(unsafe.Pointer(s)).Fstrstart++ 6087 if bflush != 0 { 6088 { 6089 X_tr_flush_block(tls, s, func() uintptr { 6090 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6091 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 6092 } 6093 return uintptr(Z_NULL) 6094 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 6095 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6096 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6097 } 6098 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6099 if 0 != 0 { 6100 return Finish_started 6101 } 6102 return Need_more 6103 } 6104 } 6105 6106 } 6107 (*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0) 6108 if flush == Z_FINISH { 6109 { 6110 { 6111 X_tr_flush_block(tls, s, func() uintptr { 6112 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6113 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 6114 } 6115 return uintptr(Z_NULL) 6116 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1) 6117 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6118 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6119 } 6120 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6121 if 1 != 0 { 6122 return Finish_started 6123 } 6124 return Need_more 6125 } 6126 } 6127 6128 return Finish_done 6129 } 6130 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 { 6131 { 6132 X_tr_flush_block(tls, s, func() uintptr { 6133 if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { 6134 return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) 6135 } 6136 return uintptr(Z_NULL) 6137 }(), Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0) 6138 (*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) 6139 flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm) 6140 } 6141 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) { 6142 if 0 != 0 { 6143 return Finish_started 6144 } 6145 return Need_more 6146 } 6147 } 6148 6149 return Block_done 6150 } 6151 6152 // Major, minor numbers, dev_t's. 6153 6154 type Fpos_t = Off_t /* stdio.h:61:15 */ // stdio file position type 6155 6156 // NB: to fit things in six character monocase externals, the stdio 6157 // code uses the prefix `__s' for stdio objects, typically followed 6158 // by a three-character attempt at a mnemonic. 6159 6160 // stdio buffers 6161 type X__sbuf = struct { 6162 F_base uintptr 6163 F_size int32 6164 F__ccgo_pad1 [4]byte 6165 } /* stdio.h:70:1 */ 6166 6167 // stdio state variables. 6168 // 6169 // The following always hold: 6170 // 6171 // if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), 6172 // _lbfsize is -_bf._size, else _lbfsize is 0 6173 // if _flags&__SRD, _w is 0 6174 // if _flags&__SWR, _r is 0 6175 // 6176 // This ensures that the getc and putc macros (or inline functions) never 6177 // try to write or read from a file that is in `read' or `write' mode. 6178 // (Moreover, they can, and do, automatically switch from read mode to 6179 // write mode, and back, on "r+" and "w+" files.) 6180 // 6181 // _lbfsize is used only to make the inline line-buffered output stream 6182 // code as compact as possible. 6183 // 6184 // _ub, _up, and _ur are used when ungetc() pushes back more characters 6185 // than fit in the current _bf, or when ungetc() pushes back a character 6186 // that does not match the previous one in _bf. When this happens, 6187 // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff 6188 // _ub._base!=NULL) and _up and _ur save the current values of _p and _r. 6189 type X__sFILE = struct { 6190 F_p uintptr 6191 F_r int32 6192 F_w int32 6193 F_flags int16 6194 F_file int16 6195 F__ccgo_pad1 [4]byte 6196 F_bf struct { 6197 F_base uintptr 6198 F_size int32 6199 F__ccgo_pad1 [4]byte 6200 } 6201 F_lbfsize int32 6202 F__ccgo_pad2 [4]byte 6203 F_cookie uintptr 6204 F_close uintptr 6205 F_read uintptr 6206 F_seek uintptr 6207 F_write uintptr 6208 F_ext struct { 6209 F_base uintptr 6210 F_size int32 6211 F__ccgo_pad1 [4]byte 6212 } 6213 F_up uintptr 6214 F_ur int32 6215 F_ubuf [3]uint8 6216 F_nbuf [1]uint8 6217 F_lb struct { 6218 F_base uintptr 6219 F_size int32 6220 F__ccgo_pad1 [4]byte 6221 } 6222 F_blksize int32 6223 F__ccgo_pad3 [4]byte 6224 F_offset Fpos_t 6225 } /* stdio.h:99:9 */ 6226 6227 // stdio state variables. 6228 // 6229 // The following always hold: 6230 // 6231 // if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), 6232 // _lbfsize is -_bf._size, else _lbfsize is 0 6233 // if _flags&__SRD, _w is 0 6234 // if _flags&__SWR, _r is 0 6235 // 6236 // This ensures that the getc and putc macros (or inline functions) never 6237 // try to write or read from a file that is in `read' or `write' mode. 6238 // (Moreover, they can, and do, automatically switch from read mode to 6239 // write mode, and back, on "r+" and "w+" files.) 6240 // 6241 // _lbfsize is used only to make the inline line-buffered output stream 6242 // code as compact as possible. 6243 // 6244 // _ub, _up, and _ur are used when ungetc() pushes back more characters 6245 // than fit in the current _bf, or when ungetc() pushes back a character 6246 // that does not match the previous one in _bf. When this happens, 6247 // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff 6248 // _ub._base!=NULL) and _up and _ur save the current values of _p and _r. 6249 type FILE = X__sFILE /* stdio.h:131:3 */ 6250 6251 // $OpenBSD: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $ 6252 // $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ 6253 6254 // Copyright (c) 1988 The Regents of the University of California. 6255 // All rights reserved. 6256 // 6257 // Redistribution and use in source and binary forms, with or without 6258 // modification, are permitted provided that the following conditions 6259 // are met: 6260 // 1. Redistributions of source code must retain the above copyright 6261 // notice, this list of conditions and the following disclaimer. 6262 // 2. Redistributions in binary form must reproduce the above copyright 6263 // notice, this list of conditions and the following disclaimer in the 6264 // documentation and/or other materials provided with the distribution. 6265 // 3. Neither the name of the University nor the names of its contributors 6266 // may be used to endorse or promote products derived from this software 6267 // without specific prior written permission. 6268 // 6269 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 6270 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 6271 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 6272 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 6273 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 6274 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 6275 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 6276 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 6277 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 6278 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 6279 // SUCH DAMAGE. 6280 // 6281 // @(#)limits.h 5.9 (Berkeley) 4/3/91 6282 6283 // $OpenBSD: fcntl.h,v 1.22 2019/01/21 18:09:21 anton Exp $ 6284 // $NetBSD: fcntl.h,v 1.8 1995/03/26 20:24:12 jtc Exp $ 6285 6286 // - 6287 // Copyright (c) 1983, 1990, 1993 6288 // The Regents of the University of California. All rights reserved. 6289 // (c) UNIX System Laboratories, Inc. 6290 // All or some portions of this file are derived from material licensed 6291 // to the University of California by American Telephone and Telegraph 6292 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 6293 // the permission of UNIX System Laboratories, Inc. 6294 // 6295 // Redistribution and use in source and binary forms, with or without 6296 // modification, are permitted provided that the following conditions 6297 // are met: 6298 // 1. Redistributions of source code must retain the above copyright 6299 // notice, this list of conditions and the following disclaimer. 6300 // 2. Redistributions in binary form must reproduce the above copyright 6301 // notice, this list of conditions and the following disclaimer in the 6302 // documentation and/or other materials provided with the distribution. 6303 // 3. Neither the name of the University nor the names of its contributors 6304 // may be used to endorse or promote products derived from this software 6305 // without specific prior written permission. 6306 // 6307 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 6308 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 6309 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 6310 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 6311 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 6312 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 6313 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 6314 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 6315 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 6316 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 6317 // SUCH DAMAGE. 6318 // 6319 // @(#)fcntl.h 8.3 (Berkeley) 1/21/94 6320 6321 // This file includes the definitions for open and fcntl 6322 // described by POSIX for <fcntl.h>; it also includes 6323 // related kernel definitions. 6324 6325 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 6326 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 6327 6328 // Copyright (c) 1991, 1993 6329 // The Regents of the University of California. All rights reserved. 6330 // 6331 // This code is derived from software contributed to Berkeley by 6332 // Berkeley Software Design, Inc. 6333 // 6334 // Redistribution and use in source and binary forms, with or without 6335 // modification, are permitted provided that the following conditions 6336 // are met: 6337 // 1. Redistributions of source code must retain the above copyright 6338 // notice, this list of conditions and the following disclaimer. 6339 // 2. Redistributions in binary form must reproduce the above copyright 6340 // notice, this list of conditions and the following disclaimer in the 6341 // documentation and/or other materials provided with the distribution. 6342 // 3. Neither the name of the University nor the names of its contributors 6343 // may be used to endorse or promote products derived from this software 6344 // without specific prior written permission. 6345 // 6346 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 6347 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 6348 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 6349 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 6350 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 6351 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 6352 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 6353 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 6354 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 6355 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 6356 // SUCH DAMAGE. 6357 // 6358 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 6359 6360 // $OpenBSD: types.h,v 1.49 2022/08/06 13:31:13 semarie Exp $ 6361 // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ 6362 6363 // - 6364 // Copyright (c) 1982, 1986, 1991, 1993 6365 // The Regents of the University of California. All rights reserved. 6366 // (c) UNIX System Laboratories, Inc. 6367 // All or some portions of this file are derived from material licensed 6368 // to the University of California by American Telephone and Telegraph 6369 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 6370 // the permission of UNIX System Laboratories, Inc. 6371 // 6372 // Redistribution and use in source and binary forms, with or without 6373 // modification, are permitted provided that the following conditions 6374 // are met: 6375 // 1. Redistributions of source code must retain the above copyright 6376 // notice, this list of conditions and the following disclaimer. 6377 // 2. Redistributions in binary form must reproduce the above copyright 6378 // notice, this list of conditions and the following disclaimer in the 6379 // documentation and/or other materials provided with the distribution. 6380 // 3. Neither the name of the University nor the names of its contributors 6381 // may be used to endorse or promote products derived from this software 6382 // without specific prior written permission. 6383 // 6384 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 6385 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 6386 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 6387 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 6388 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 6389 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 6390 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 6391 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 6392 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 6393 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 6394 // SUCH DAMAGE. 6395 // 6396 // @(#)types.h 8.4 (Berkeley) 1/21/94 6397 6398 // File status flags: these are used by open(2), fcntl(2). 6399 // They are also used (indirectly) in the kernel file structure f_flags, 6400 // which is a superset of the open/fcntl flags. Open flags and f_flags 6401 // are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags). 6402 // Open/fcntl flags begin with O_; kernel-internal flags begin with F. 6403 // open-only flags 6404 6405 // Kernel encoding of open mode; separate read and write bits that are 6406 // independently testable: 1 greater than the above. 6407 // 6408 // XXX 6409 // FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH, 6410 // which was documented to use FREAD/FWRITE, continues to work. 6411 6412 // POSIX 1003.1 specifies a higher granularity for synchronous operations 6413 // than we support. Since synchronicity is all or nothing in OpenBSD 6414 // we just define these to be the same as O_SYNC. 6415 6416 // defined by POSIX 1003.1; BSD default, this bit is not required 6417 6418 // defined by POSIX Issue 7 6419 6420 // The O_* flags used to have only F* names, which were used in the kernel 6421 // and by fcntl. We retain the F* names for the kernel f_flags field 6422 // and for backward compatibility for fcntl. 6423 6424 // Constants used for fcntl(2) 6425 6426 // command values 6427 6428 // file descriptor flags (F_GETFD, F_SETFD) 6429 6430 // record locking flags (F_GETLK, F_SETLK, F_SETLKW) 6431 6432 // Advisory file segment locking data type - 6433 // information passed to system by user 6434 type Flock = struct { 6435 Fl_start Off_t 6436 Fl_len Off_t 6437 Fl_pid Pid_t 6438 Fl_type int16 6439 Fl_whence int16 6440 } /* fcntl.h:180:1 */ 6441 6442 // default memLevel 6443 6444 // default i/o buffer size -- double this for output when reading (this and 6445 // twice this must be able to fit in an unsigned type) 6446 6447 // gzip modes, also provide a little integrity check on the passed structure 6448 6449 // values for gz_state how 6450 6451 // internal gzip file state data structure 6452 type Gz_state = struct { 6453 Fx GzFile_s 6454 Fmode int32 6455 Ffd int32 6456 Fpath uintptr 6457 Fsize uint32 6458 Fwant uint32 6459 Fin uintptr 6460 Fout uintptr 6461 Fdirect int32 6462 Fhow int32 6463 Fstart Off_t 6464 Feof int32 6465 Fpast int32 6466 Flevel int32 6467 Fstrategy int32 6468 Fskip Off_t 6469 Fseek int32 6470 Ferr int32 6471 Fmsg uintptr 6472 Fstrm Z_stream 6473 } /* gzguts.h:201:3 */ 6474 type Gz_statep = uintptr /* gzguts.h:202:22 */ 6475 6476 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 6477 // value -- needed when comparing unsigned to z_off64_t, which is signed 6478 // (possible z_off64_t types off_t, off64_t, and long are all signed) 6479 6480 // gzclose() is in a separate file so that it is linked in only if it is used. 6481 // 6482 // That way the other gzclose functions can be used instead to avoid linking in 6483 // unneeded compression or decompression routines. 6484 func Xgzclose(tls *libc.TLS, file GzFile) int32 { /* gzclose.c:11:13: */ 6485 var state Gz_statep 6486 6487 if file == uintptr(0) { 6488 return -2 6489 } 6490 state = file 6491 6492 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 6493 return Xgzclose_r(tls, file) 6494 } 6495 return Xgzclose_w(tls, file) 6496 } 6497 6498 // Reset gzip file state 6499 func gz_reset(tls *libc.TLS, state Gz_statep) { /* gzlib.c:75:12: */ 6500 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) // no output data available 6501 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // for reading ... 6502 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 // not at end of file 6503 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 // have not read past end yet 6504 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK // look for gzip header 6505 } 6506 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 // no seek request pending 6507 Xgz_error(tls, state, Z_OK, uintptr(0)) // clear error 6508 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos = int64(0) // no uncompressed data yet 6509 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) // no input data yet 6510 } 6511 6512 // Open a gzip file either by name or file descriptor. 6513 func gz_open(tls *libc.TLS, path uintptr, fd int32, mode uintptr) GzFile { /* gzlib.c:91:14: */ 6514 bp := tls.Alloc(16) 6515 defer tls.Free(16) 6516 6517 var state Gz_statep 6518 var len Z_size_t 6519 var oflag int32 6520 var cloexec int32 = 0 6521 var exclusive int32 = 0 6522 6523 // check input 6524 if path == uintptr(0) { 6525 return uintptr(0) 6526 } 6527 6528 // allocate gzFile structure to return 6529 state = libc.Xmalloc(tls, uint64(unsafe.Sizeof(Gz_state{}))) 6530 if state == uintptr(0) { 6531 return uintptr(0) 6532 } 6533 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) // no buffers allocated yet 6534 (*Gz_state)(unsafe.Pointer(state)).Fwant = uint32(GZBUFSIZE) // requested buffer size 6535 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) // no error message yet 6536 6537 // interpret mode 6538 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_NONE 6539 (*Gz_state)(unsafe.Pointer(state)).Flevel = -1 6540 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_DEFAULT_STRATEGY 6541 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 6542 for *(*int8)(unsafe.Pointer(mode)) != 0 { 6543 if int32(*(*int8)(unsafe.Pointer(mode))) >= '0' && int32(*(*int8)(unsafe.Pointer(mode))) <= '9' { 6544 (*Gz_state)(unsafe.Pointer(state)).Flevel = int32(*(*int8)(unsafe.Pointer(mode))) - '0' 6545 } else { 6546 switch int32(*(*int8)(unsafe.Pointer(mode))) { 6547 case 'r': 6548 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_READ 6549 break 6550 fallthrough 6551 case 'w': 6552 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE 6553 break 6554 fallthrough 6555 case 'a': 6556 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_APPEND 6557 break 6558 fallthrough 6559 case '+': // can't read and write at the same time 6560 libc.Xfree(tls, state) 6561 return uintptr(0) 6562 fallthrough 6563 case 'b': // ignore -- will request binary anyway 6564 break 6565 fallthrough 6566 case 'e': 6567 cloexec = 1 6568 break 6569 fallthrough 6570 case 'x': 6571 exclusive = 1 6572 break 6573 fallthrough 6574 case 'f': 6575 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FILTERED 6576 break 6577 fallthrough 6578 case 'h': 6579 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_HUFFMAN_ONLY 6580 break 6581 fallthrough 6582 case 'R': 6583 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_RLE 6584 break 6585 fallthrough 6586 case 'F': 6587 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FIXED 6588 break 6589 fallthrough 6590 case 'T': 6591 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 6592 break 6593 fallthrough 6594 default: // could consider as an error, but just ignore 6595 6596 } 6597 } 6598 mode++ 6599 } 6600 6601 // must provide an "r", "w", or "a" 6602 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_NONE { 6603 libc.Xfree(tls, state) 6604 return uintptr(0) 6605 } 6606 6607 // can't force transparent read 6608 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 6609 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 6610 libc.Xfree(tls, state) 6611 return uintptr(0) 6612 } 6613 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 // for empty file 6614 } 6615 6616 // save the path name for error messages 6617 len = libc.Xstrlen(tls, path) 6618 (*Gz_state)(unsafe.Pointer(state)).Fpath = libc.Xmalloc(tls, len+uint64(1)) 6619 if (*Gz_state)(unsafe.Pointer(state)).Fpath == uintptr(0) { 6620 libc.Xfree(tls, state) 6621 return uintptr(0) 6622 } 6623 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath, len+uint64(1), ts+76, libc.VaList(bp, path)) 6624 6625 // compute the flags for open() 6626 oflag = func() int32 { 6627 if cloexec != 0 { 6628 return O_CLOEXEC 6629 } 6630 return 0 6631 }() | func() int32 { 6632 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 6633 return O_RDONLY 6634 } 6635 return O_WRONLY | O_CREAT | func() int32 { 6636 if exclusive != 0 { 6637 return O_EXCL 6638 } 6639 return 0 6640 }() | func() int32 { 6641 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_WRITE { 6642 return O_TRUNC 6643 } 6644 return O_APPEND 6645 }() 6646 }() 6647 6648 // open the file with the appropriate flags (or just use fd) 6649 (*Gz_state)(unsafe.Pointer(state)).Ffd = func() int32 { 6650 if fd > -1 { 6651 return fd 6652 } 6653 return libc.Xopen(tls, path, oflag, libc.VaList(bp+8, 0666)) 6654 }() 6655 if (*Gz_state)(unsafe.Pointer(state)).Ffd == -1 { 6656 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 6657 libc.Xfree(tls, state) 6658 return uintptr(0) 6659 } 6660 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_APPEND { 6661 libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_END) // so gzoffset() is correct 6662 (*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE // simplify later checks 6663 } 6664 6665 // save the current position for rewinding (only if reading) 6666 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 6667 (*Gz_state)(unsafe.Pointer(state)).Fstart = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR) 6668 if (*Gz_state)(unsafe.Pointer(state)).Fstart == int64(-1) { 6669 (*Gz_state)(unsafe.Pointer(state)).Fstart = int64(0) 6670 } 6671 } 6672 6673 // initialize stream 6674 gz_reset(tls, state) 6675 6676 // return stream 6677 return state 6678 } 6679 6680 // -- see zlib.h -- 6681 func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:270:16: */ 6682 return gz_open(tls, path, -1, mode) 6683 } 6684 6685 // -- see zlib.h -- 6686 func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:278:16: */ 6687 return gz_open(tls, path, -1, mode) 6688 } 6689 6690 // -- see zlib.h -- 6691 func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) GzFile { /* gzlib.c:286:16: */ 6692 bp := tls.Alloc(8) 6693 defer tls.Free(8) 6694 6695 var path uintptr // identifier for error messages 6696 var gz GzFile 6697 6698 if fd == -1 || libc.AssignUintptr(&path, libc.Xmalloc(tls, uint64(7)+uint64(3)*uint64(unsafe.Sizeof(int32(0))))) == uintptr(0) { 6699 return uintptr(0) 6700 } 6701 libc.Xsnprintf(tls, path, uint64(7)+uint64(3)*uint64(unsafe.Sizeof(int32(0))), ts+79, libc.VaList(bp, fd)) 6702 gz = gz_open(tls, path, fd, mode) 6703 libc.Xfree(tls, path) 6704 return gz 6705 } 6706 6707 // -- see zlib.h -- 6708 6709 // -- see zlib.h -- 6710 func Xgzbuffer(tls *libc.TLS, file GzFile, size uint32) int32 { /* gzlib.c:316:13: */ 6711 var state Gz_statep 6712 6713 // get internal structure and check integrity 6714 if file == uintptr(0) { 6715 return -1 6716 } 6717 state = file 6718 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 6719 return -1 6720 } 6721 6722 // make sure we haven't already allocated memory 6723 if (*Gz_state)(unsafe.Pointer(state)).Fsize != uint32(0) { 6724 return -1 6725 } 6726 6727 // check and set requested size 6728 if size<<1 < size { 6729 return -1 6730 } // need to be able to double it 6731 if size < uint32(2) { 6732 size = uint32(2) 6733 } // need two bytes to check magic header 6734 (*Gz_state)(unsafe.Pointer(state)).Fwant = size 6735 return 0 6736 } 6737 6738 // -- see zlib.h -- 6739 func Xgzrewind(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:343:13: */ 6740 var state Gz_statep 6741 6742 // get internal structure 6743 if file == uintptr(0) { 6744 return -1 6745 } 6746 state = file 6747 6748 // check that we're reading and that there's no error 6749 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 6750 return -1 6751 } 6752 6753 // back up and start over 6754 if libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fstart, SEEK_SET) == int64(-1) { 6755 return -1 6756 } 6757 gz_reset(tls, state) 6758 return 0 6759 } 6760 6761 // -- see zlib.h -- 6762 func Xgzseek64(tls *libc.TLS, file GzFile, offset Off_t, whence int32) Off_t { /* gzlib.c:366:19: */ 6763 var n uint32 6764 var ret Off_t 6765 var state Gz_statep 6766 6767 // get internal structure and check integrity 6768 if file == uintptr(0) { 6769 return int64(-1) 6770 } 6771 state = file 6772 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 6773 return int64(-1) 6774 } 6775 6776 // check that there's no error 6777 if (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 6778 return int64(-1) 6779 } 6780 6781 // can only seek from start or relative to current position 6782 if whence != SEEK_SET && whence != SEEK_CUR { 6783 return int64(-1) 6784 } 6785 6786 // normalize offset to a SEEK_CUR specification 6787 if whence == SEEK_SET { 6788 offset = offset - (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos 6789 } else if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 6790 offset = offset + (*Gz_state)(unsafe.Pointer(state)).Fskip 6791 } 6792 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 6793 6794 // if within raw area while reading, just go there 6795 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) { 6796 ret = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, offset-Off_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave), SEEK_CUR) 6797 if ret == int64(-1) { 6798 return int64(-1) 6799 } 6800 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 6801 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 6802 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 6803 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 6804 Xgz_error(tls, state, Z_OK, uintptr(0)) 6805 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 6806 *(*Off_t)(unsafe.Pointer(state + 16)) += offset 6807 return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos 6808 } 6809 6810 // calculate skip amount, rewinding if needed for back seek when reading 6811 if offset < int64(0) { 6812 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { // writing -- can't go backwards 6813 return int64(-1) 6814 } 6815 offset = offset + (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos 6816 if offset < int64(0) { // before start of file! 6817 return int64(-1) 6818 } 6819 if Xgzrewind(tls, file) == -1 { // rewind, then skip to offset 6820 return int64(-1) 6821 } 6822 } 6823 6824 // if reading, skip what's in output buffer (one less gzgetc() check) 6825 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 6826 if uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off_t(0))) && (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > uint32(INT_MAX) || Off_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > offset { 6827 n = uint32(offset) 6828 } else { 6829 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 6830 } 6831 *(*uint32)(unsafe.Pointer(state)) -= n 6832 *(*uintptr)(unsafe.Pointer(state + 8)) += uintptr(n) 6833 *(*Off_t)(unsafe.Pointer(state + 16)) += Off_t(n) 6834 offset = offset - Off_t(n) 6835 } 6836 6837 // request skip (if not zero) 6838 if offset != 0 { 6839 (*Gz_state)(unsafe.Pointer(state)).Fseek = 1 6840 (*Gz_state)(unsafe.Pointer(state)).Fskip = offset 6841 } 6842 return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + offset 6843 } 6844 6845 // -- see zlib.h -- 6846 func Xgzseek(tls *libc.TLS, file GzFile, offset Off_t, whence int32) Off_t { /* gzlib.c:443:17: */ 6847 var ret Off_t 6848 6849 ret = Xgzseek64(tls, file, offset, whence) 6850 if ret == ret { 6851 return ret 6852 } 6853 return int64(-1) 6854 } 6855 6856 // -- see zlib.h -- 6857 func Xgztell64(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:455:19: */ 6858 var state Gz_statep 6859 6860 // get internal structure and check integrity 6861 if file == uintptr(0) { 6862 return int64(-1) 6863 } 6864 state = file 6865 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 6866 return int64(-1) 6867 } 6868 6869 // return position 6870 return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + func() int64 { 6871 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 6872 return (*Gz_state)(unsafe.Pointer(state)).Fskip 6873 } 6874 return int64(0) 6875 }() 6876 } 6877 6878 // -- see zlib.h -- 6879 func Xgztell(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:472:17: */ 6880 var ret Off_t 6881 6882 ret = Xgztell64(tls, file) 6883 if ret == ret { 6884 return ret 6885 } 6886 return int64(-1) 6887 } 6888 6889 // -- see zlib.h -- 6890 func Xgzoffset64(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:482:19: */ 6891 var offset Off_t 6892 var state Gz_statep 6893 6894 // get internal structure and check integrity 6895 if file == uintptr(0) { 6896 return int64(-1) 6897 } 6898 state = file 6899 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 6900 return int64(-1) 6901 } 6902 6903 // compute and return effective offset in file 6904 offset = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR) 6905 if offset == int64(-1) { 6906 return int64(-1) 6907 } 6908 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // reading 6909 offset = offset - Off_t((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in) 6910 } // don't count buffered input 6911 return offset 6912 } 6913 6914 // -- see zlib.h -- 6915 func Xgzoffset(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:505:17: */ 6916 var ret Off_t 6917 6918 ret = Xgzoffset64(tls, file) 6919 if ret == ret { 6920 return ret 6921 } 6922 return int64(-1) 6923 } 6924 6925 // -- see zlib.h -- 6926 func Xgzeof(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:515:13: */ 6927 var state Gz_statep 6928 6929 // get internal structure and check integrity 6930 if file == uintptr(0) { 6931 return 0 6932 } 6933 state = file 6934 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 6935 return 0 6936 } 6937 6938 // return end-of-file state 6939 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 6940 return (*Gz_state)(unsafe.Pointer(state)).Fpast 6941 } 6942 return 0 6943 } 6944 6945 // -- see zlib.h -- 6946 func Xgzerror(tls *libc.TLS, file GzFile, errnum uintptr) uintptr { /* gzlib.c:532:12: */ 6947 var state Gz_statep 6948 6949 // get internal structure and check integrity 6950 if file == uintptr(0) { 6951 return uintptr(0) 6952 } 6953 state = file 6954 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 6955 return uintptr(0) 6956 } 6957 6958 // return error information 6959 if errnum != uintptr(0) { 6960 *(*int32)(unsafe.Pointer(errnum)) = (*Gz_state)(unsafe.Pointer(state)).Ferr 6961 } 6962 if (*Gz_state)(unsafe.Pointer(state)).Ferr == -4 { 6963 return ts + 87 /* "out of memory" */ 6964 } 6965 return func() uintptr { 6966 if (*Gz_state)(unsafe.Pointer(state)).Fmsg == uintptr(0) { 6967 return ts + 101 6968 } 6969 return (*Gz_state)(unsafe.Pointer(state)).Fmsg 6970 }() 6971 } 6972 6973 // -- see zlib.h -- 6974 func Xgzclearerr(tls *libc.TLS, file GzFile) { /* gzlib.c:553:14: */ 6975 var state Gz_statep 6976 6977 // get internal structure and check integrity 6978 if file == uintptr(0) { 6979 return 6980 } 6981 state = file 6982 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 6983 return 6984 } 6985 6986 // clear error and end-of-file 6987 if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { 6988 (*Gz_state)(unsafe.Pointer(state)).Feof = 0 6989 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 6990 } 6991 Xgz_error(tls, state, Z_OK, uintptr(0)) 6992 } 6993 6994 // Create an error message in allocated memory and set state->err and 6995 // 6996 // state->msg accordingly. Free any previous error message already there. Do 6997 // not try to free or allocate space if the error is Z_MEM_ERROR (out of 6998 // memory). Simply save the error message as a static string. If there is an 6999 // allocation failure constructing the error message, then convert the error to 7000 // out of memory. 7001 func Xgz_error(tls *libc.TLS, state Gz_statep, err int32, msg uintptr) { /* gzlib.c:579:20: */ 7002 bp := tls.Alloc(24) 7003 defer tls.Free(24) 7004 7005 // free previously allocated message and clear 7006 if (*Gz_state)(unsafe.Pointer(state)).Fmsg != uintptr(0) { 7007 if (*Gz_state)(unsafe.Pointer(state)).Ferr != -4 { 7008 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg) 7009 } 7010 (*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0) 7011 } 7012 7013 // if fatal, set state->x.have to 0 so that the gzgetc() macro fails 7014 if err != Z_OK && err != -5 { 7015 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 7016 } 7017 7018 // set error code, and if no message, then done 7019 (*Gz_state)(unsafe.Pointer(state)).Ferr = err 7020 if msg == uintptr(0) { 7021 return 7022 } 7023 7024 // for an out of memory error, return literal string when requested 7025 if err == -4 { 7026 return 7027 } 7028 7029 // construct error message with path 7030 if libc.AssignPtrUintptr(state+112, libc.Xmalloc(tls, libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg)+uint64(3))) == uintptr(0) { 7031 (*Gz_state)(unsafe.Pointer(state)).Ferr = -4 7032 return 7033 } 7034 libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg, libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg)+uint64(3), 7035 ts+102, libc.VaList(bp, (*Gz_state)(unsafe.Pointer(state)).Fpath, ts+109, msg)) 7036 } 7037 7038 // Use read() to load a buffer -- return -1 on error, otherwise 0. Read from 7039 // 7040 // state->fd, and update state->eof, state->err, and state->msg as appropriate. 7041 // This function needs to loop on read(), since read() is not guaranteed to 7042 // read the number of bytes requested, depending on the type of descriptor. 7043 func gz_load(tls *libc.TLS, state Gz_statep, buf uintptr, len uint32, have uintptr) int32 { /* gzread.c:21:11: */ 7044 var ret int32 7045 var get uint32 7046 var max uint32 = uint32(libc.Uint32(libc.Uint32FromInt32(-1)))>>2 + uint32(1) 7047 7048 *(*uint32)(unsafe.Pointer(have)) = uint32(0) 7049 for __ccgo := true; __ccgo; __ccgo = *(*uint32)(unsafe.Pointer(have)) < len { 7050 get = len - *(*uint32)(unsafe.Pointer(have)) 7051 if get > max { 7052 get = max 7053 } 7054 ret = int32(libc.Xread(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, buf+uintptr(*(*uint32)(unsafe.Pointer(have))), uint64(get))) 7055 if ret <= 0 { 7056 break 7057 } 7058 *(*uint32)(unsafe.Pointer(have)) += uint32(ret) 7059 } 7060 if ret < 0 { 7061 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno(tls))))) 7062 return -1 7063 } 7064 if ret == 0 { 7065 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 7066 } 7067 return 0 7068 } 7069 7070 // Load up input buffer and set eof flag if last data loaded -- return -1 on 7071 // 7072 // error, 0 otherwise. Note that the eof flag is set when the end of the input 7073 // file is reached, even though there may be unused data in the buffer. Once 7074 // that data has been used, no more attempts will be made to read the file. 7075 // If strm->avail_in != 0, then the current data is moved to the beginning of 7076 // the input buffer, and then the remainder of the buffer is loaded with the 7077 // available data from the input file. 7078 func gz_avail(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:56:11: */ 7079 bp := tls.Alloc(4) 7080 defer tls.Free(4) 7081 7082 // var got uint32 at bp, 4 7083 7084 var strm Z_streamp = state + 120 7085 7086 if (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 7087 return -1 7088 } 7089 if (*Gz_state)(unsafe.Pointer(state)).Feof == 0 { 7090 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { // copy what's there to the start 7091 var p uintptr = (*Gz_state)(unsafe.Pointer(state)).Fin 7092 var q uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 7093 var n uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 7094 for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 { 7095 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1))) 7096 } 7097 } 7098 if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in), 7099 (*Gz_state)(unsafe.Pointer(state)).Fsize-(*Z_stream)(unsafe.Pointer(strm)).Favail_in, bp) == -1 { 7100 return -1 7101 } 7102 *(*UInt)(unsafe.Pointer(strm + 8)) += *(*uint32)(unsafe.Pointer(bp)) 7103 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 7104 } 7105 return 0 7106 } 7107 7108 // Look for gzip header, set up for inflate or copy. state->x.have must be 0. 7109 // 7110 // If this is the first time in, allocate required memory. state->how will be 7111 // left unchanged if there is no more input data available, will be set to COPY 7112 // if there is no gzip header and direct copying will be performed, or it will 7113 // be set to GZIP for decompression. If direct copying, then leftover input 7114 // data from the input buffer will be copied to the output buffer. In that 7115 // case, all further file reads will be directly to either the output buffer or 7116 // a user buffer. If decompressing, the inflate state will be initialized. 7117 // gz_look() will return 0 on success or -1 on failure. 7118 func gz_look(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:91:11: */ 7119 var strm Z_streamp = state + 120 7120 7121 // allocate read buffers and inflate memory 7122 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) { 7123 // allocate buffers 7124 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant)) 7125 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant<<1)) 7126 if (*Gz_state)(unsafe.Pointer(state)).Fin == uintptr(0) || (*Gz_state)(unsafe.Pointer(state)).Fout == uintptr(0) { 7127 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 7128 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 7129 Xgz_error(tls, state, -4, ts+87) 7130 return -1 7131 } 7132 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 7133 7134 // allocate inflate memory 7135 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzalloc = Alloc_func(Z_NULL) 7136 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzfree = Free_func(Z_NULL) 7137 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fopaque = Voidpf(Z_NULL) 7138 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) 7139 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = uintptr(Z_NULL) 7140 if XinflateInit2_(tls, state+120, 15+16, ts, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK { // gunzip 7141 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 7142 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 7143 (*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0) 7144 Xgz_error(tls, state, -4, ts+87) 7145 return -1 7146 } 7147 } 7148 7149 // get at least the magic bytes in the input buffer 7150 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in < UInt(2) { 7151 if gz_avail(tls, state) == -1 { 7152 return -1 7153 } 7154 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 7155 return 0 7156 } 7157 } 7158 7159 // look for gzip magic bytes -- if there, do gzip decoding (note: there is 7160 // a logical dilemma here when considering the case of a partially written 7161 // gzip file, to wit, if a single 31 byte is written, then we cannot tell 7162 // whether this is a single-byte file, or just a partially written gzip 7163 // file -- for here we assume that if a gzip file is being written, then 7164 // the header will be written in a single operation, so that reading a 7165 // single byte is sufficient indication that it is not a gzip file) 7166 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 { 7167 XinflateReset(tls, strm) 7168 (*Gz_state)(unsafe.Pointer(state)).Fhow = /* GZIP */ 2 7169 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 0 7170 return 0 7171 } 7172 7173 // no gzip header -- if we were decoding gzip before, then this is trailing 7174 // garbage. Ignore the trailing garbage and finish. 7175 if (*Gz_state)(unsafe.Pointer(state)).Fdirect == 0 { 7176 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 7177 (*Gz_state)(unsafe.Pointer(state)).Feof = 1 7178 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 7179 return 0 7180 } 7181 7182 // doing raw i/o, copy any leftover input to output -- this assumes that 7183 // the output buffer is larger than the input buffer, which also assures 7184 // space for gzungetc() 7185 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 7186 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 7187 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)) 7188 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 7189 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0) 7190 } 7191 (*Gz_state)(unsafe.Pointer(state)).Fhow = COPY1 7192 (*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 7193 return 0 7194 } 7195 7196 // Decompress from input to the provided next_out and avail_out in the state. 7197 // 7198 // On return, state->x.have and state->x.next point to the just decompressed 7199 // data. If the gzip stream completes, state->how is reset to LOOK to look for 7200 // the next gzip stream or raw data, once state->x.have is depleted. Returns 0 7201 // on success, -1 on failure. 7202 func gz_decomp(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:175:11: */ 7203 var ret int32 = Z_OK 7204 var had uint32 7205 var strm Z_streamp = state + 120 7206 7207 // fill output buffer up to end of deflate stream 7208 had = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 7209 for __ccgo := true; __ccgo; __ccgo = (*Z_stream)(unsafe.Pointer(strm)).Favail_out != 0 && ret != Z_STREAM_END { 7210 // get more input for inflate() 7211 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && gz_avail(tls, state) == -1 { 7212 return -1 7213 } 7214 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 7215 Xgz_error(tls, state, -5, ts+112) 7216 break 7217 } 7218 7219 // decompress and handle errors 7220 ret = Xinflate(tls, strm, Z_NO_FLUSH) 7221 if ret == -2 || ret == Z_NEED_DICT { 7222 Xgz_error(tls, state, -2, 7223 ts+135) 7224 return -1 7225 } 7226 if ret == -4 { 7227 Xgz_error(tls, state, -4, ts+87) 7228 return -1 7229 } 7230 if ret == -3 { // deflate stream invalid 7231 Xgz_error(tls, state, -3, 7232 func() uintptr { 7233 if (*Z_stream)(unsafe.Pointer(strm)).Fmsg == uintptr(0) { 7234 return ts + 174 /* "compressed data ..." */ 7235 } 7236 return (*Z_stream)(unsafe.Pointer(strm)).Fmsg 7237 }()) 7238 return -1 7239 } 7240 } 7241 7242 // update available output 7243 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = had - (*Z_stream)(unsafe.Pointer(strm)).Favail_out 7244 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) 7245 7246 // if the gzip stream completed successfully, look for another 7247 if ret == Z_STREAM_END { 7248 (*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK 7249 } 7250 7251 // good decompression 7252 return 0 7253 } 7254 7255 // Fetch data and put it in the output buffer. Assumes state->x.have is 0. 7256 // 7257 // Data is either copied from the input file or decompressed from the input 7258 // file depending on state->how. If state->how is LOOK, then a gzip header is 7259 // looked for to determine whether to copy or decompress. Returns -1 on error, 7260 // otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the 7261 // end of the input file has been reached and all data has been processed. 7262 func gz_fetch(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:229:11: */ 7263 var strm Z_streamp = state + 120 7264 7265 for __ccgo := true; __ccgo; __ccgo = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) && (!((*Gz_state)(unsafe.Pointer(state)).Feof != 0) || (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) { 7266 switch (*Gz_state)(unsafe.Pointer(state)).Fhow { 7267 case LOOK: // -> LOOK, COPY (only if never GZIP), or GZIP 7268 if gz_look(tls, state) == -1 { 7269 return -1 7270 } 7271 if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK { 7272 return 0 7273 } 7274 break 7275 case COPY1: // -> COPY 7276 if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fout, (*Gz_state)(unsafe.Pointer(state)).Fsize<<1, state) == 7277 -1 { 7278 return -1 7279 } 7280 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 7281 return 0 7282 case /* GZIP */ 2: // -> GZIP or LOOK (if end of gzip stream) 7283 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize << 1 7284 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 7285 if gz_decomp(tls, state) == -1 { 7286 return -1 7287 } 7288 } 7289 } 7290 return 0 7291 } 7292 7293 // Skip len uncompressed bytes of output. Return -1 on error, 0 on success. 7294 func gz_skip(tls *libc.TLS, state Gz_statep, len Off_t) int32 { /* gzread.c:259:11: */ 7295 var n uint32 7296 7297 // skip over len bytes or reach end-of-file, whichever comes first 7298 for len != 0 { 7299 // skip over whatever is in output buffer 7300 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 7301 if uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off_t(0))) && (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > uint32(INT_MAX) || Off_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > len { 7302 n = uint32(len) 7303 } else { 7304 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 7305 } 7306 *(*uint32)(unsafe.Pointer(state)) -= n 7307 *(*uintptr)(unsafe.Pointer(state + 8)) += uintptr(n) 7308 *(*Off_t)(unsafe.Pointer(state + 16)) += Off_t(n) 7309 len = len - Off_t(n) 7310 } else if (*Gz_state)(unsafe.Pointer(state)).Feof != 0 && (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) { 7311 break 7312 } else { 7313 // get more output, looking for header if required 7314 if gz_fetch(tls, state) == -1 { 7315 return -1 7316 } 7317 } 7318 } 7319 return 0 7320 } 7321 7322 // Read len bytes into buf from file, or less than len up to the end of the 7323 // 7324 // input. Return the number of bytes read. If zero is returned, either the 7325 // end of file was reached, or there was an error. state->err must be 7326 // consulted in that case to determine which. 7327 func gz_read(tls *libc.TLS, state Gz_statep, buf Voidp, len Z_size_t) Z_size_t { /* gzread.c:294:16: */ 7328 bp := tls.Alloc(4) 7329 defer tls.Free(4) 7330 7331 var got Z_size_t 7332 // var n uint32 at bp, 4 7333 7334 // if len is zero, avoid unnecessary operations 7335 if len == uint64(0) { 7336 return uint64(0) 7337 } 7338 7339 // process a skip request 7340 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 7341 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 7342 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 7343 return uint64(0) 7344 } 7345 } 7346 7347 // get len bytes to buf, or less than len if at the end 7348 got = uint64(0) 7349 for __ccgo := true; __ccgo; __ccgo = len != 0 { 7350 // set n to the maximum amount of len that fits in an unsigned int 7351 *(*uint32)(unsafe.Pointer(bp /* n */)) = libc.Uint32FromInt32(-1) 7352 if Z_size_t(*(*uint32)(unsafe.Pointer(bp))) > len { 7353 *(*uint32)(unsafe.Pointer(bp /* n */)) = uint32(len) 7354 } 7355 7356 // first just try copying data from the output buffer 7357 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 7358 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave < *(*uint32)(unsafe.Pointer(bp)) { 7359 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 7360 } 7361 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(*(*uint32)(unsafe.Pointer(bp /* n */)))) 7362 *(*uintptr)(unsafe.Pointer(state + 8)) += uintptr(*(*uint32)(unsafe.Pointer(bp))) 7363 *(*uint32)(unsafe.Pointer(state)) -= *(*uint32)(unsafe.Pointer(bp)) 7364 } else if (*Gz_state)(unsafe.Pointer(state)).Feof != 0 && (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) { 7365 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // tried to read past end 7366 break 7367 } else if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK || *(*uint32)(unsafe.Pointer(bp)) < (*Gz_state)(unsafe.Pointer(state)).Fsize<<1 { 7368 // get more output, looking for header if required 7369 if gz_fetch(tls, state) == -1 { 7370 return uint64(0) 7371 } 7372 continue // no progress yet -- go back to copy above 7373 // the copy above assures that we will leave with space in the 7374 // output buffer, allowing at least one gzungetc() to succeed 7375 } else if (*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1 { // read directly 7376 if gz_load(tls, state, buf, *(*uint32)(unsafe.Pointer(bp)), bp) == -1 { 7377 return uint64(0) 7378 } 7379 } else { // state->how == GZIP 7380 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_out = *(*uint32)(unsafe.Pointer(bp /* n */)) 7381 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_out = buf 7382 if gz_decomp(tls, state) == -1 { 7383 return uint64(0) 7384 } 7385 *(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 7386 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) 7387 } 7388 7389 // update progress 7390 len = len - Z_size_t(*(*uint32)(unsafe.Pointer(bp))) 7391 buf = buf + uintptr(*(*uint32)(unsafe.Pointer(bp))) 7392 got = got + Z_size_t(*(*uint32)(unsafe.Pointer(bp))) 7393 *(*Off_t)(unsafe.Pointer(state + 16)) += Off_t(*(*uint32)(unsafe.Pointer(bp))) 7394 } 7395 7396 // return number of bytes read into user buffer 7397 return got 7398 } 7399 7400 // -- see zlib.h -- 7401 func Xgzread(tls *libc.TLS, file GzFile, buf Voidp, len uint32) int32 { /* gzread.c:375:13: */ 7402 var state Gz_statep 7403 7404 // get internal structure 7405 if file == uintptr(0) { 7406 return -1 7407 } 7408 state = file 7409 7410 // check that we're reading and that there's no (serious) error 7411 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 7412 return -1 7413 } 7414 7415 // since an int is returned, make sure len fits in one, otherwise return 7416 // with an error (this avoids a flaw in the interface) 7417 if int32(len) < 0 { 7418 Xgz_error(tls, state, -2, ts+196) 7419 return -1 7420 } 7421 7422 // read len or fewer bytes to buf 7423 len = uint32(gz_read(tls, state, buf, uint64(len))) 7424 7425 // check for an error 7426 if len == uint32(0) && (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 7427 return -1 7428 } 7429 7430 // return the number of bytes read (this is assured to fit in an int) 7431 return int32(len) 7432 } 7433 7434 // -- see zlib.h -- 7435 func Xgzfread(tls *libc.TLS, buf Voidp, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzread.c:411:18: */ 7436 var len Z_size_t 7437 var state Gz_statep 7438 7439 // get internal structure 7440 if file == uintptr(0) { 7441 return uint64(0) 7442 } 7443 state = file 7444 7445 // check that we're reading and that there's no (serious) error 7446 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 7447 return uint64(0) 7448 } 7449 7450 // compute bytes to read -- error on overflow 7451 len = nitems * size 7452 if size != 0 && len/size != nitems { 7453 Xgz_error(tls, state, -2, ts+227) 7454 return uint64(0) 7455 } 7456 7457 // read len or fewer bytes to buf, return the number of full items read 7458 if len != 0 { 7459 return gz_read(tls, state, buf, len) / size 7460 } 7461 return uint64(0) 7462 } 7463 7464 // -- see zlib.h -- 7465 func Xgzgetc(tls *libc.TLS, file GzFile) int32 { /* gzread.c:447:13: */ 7466 bp := tls.Alloc(1) 7467 defer tls.Free(1) 7468 7469 var ret int32 7470 // var buf [1]uint8 at bp, 1 7471 7472 var state Gz_statep 7473 7474 // get internal structure 7475 if file == uintptr(0) { 7476 return -1 7477 } 7478 state = file 7479 7480 // check that we're reading and that there's no (serious) error 7481 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 7482 return -1 7483 } 7484 7485 // try output buffer (no need to check for skip request) 7486 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { 7487 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave-- 7488 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 7489 return int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, 1)))) 7490 } 7491 7492 // nothing there -- try gz_read() 7493 ret = int32(gz_read(tls, state, bp, uint64(1))) 7494 if ret < 1 { 7495 return -1 7496 } 7497 return int32(*(*uint8)(unsafe.Pointer(bp))) 7498 } 7499 7500 func Xgzgetc_(tls *libc.TLS, file GzFile) int32 { /* gzread.c:476:13: */ 7501 return Xgzgetc(tls, file) 7502 } 7503 7504 // -- see zlib.h -- 7505 func Xgzungetc(tls *libc.TLS, c int32, file GzFile) int32 { /* gzread.c:483:13: */ 7506 var state Gz_statep 7507 7508 // get internal structure 7509 if file == uintptr(0) { 7510 return -1 7511 } 7512 state = file 7513 7514 // check that we're reading and that there's no (serious) error 7515 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 7516 return -1 7517 } 7518 7519 // process a skip request 7520 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 7521 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 7522 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 7523 return -1 7524 } 7525 } 7526 7527 // can't push EOF 7528 if c < 0 { 7529 return -1 7530 } 7531 7532 // if output buffer empty, put byte at end (allows more pushing) 7533 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { 7534 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(1) 7535 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize<<1) - uintptr(1) 7536 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 7537 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 7538 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 7539 return c 7540 } 7541 7542 // if no room, give up (must have already done a gzungetc()) 7543 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == (*Gz_state)(unsafe.Pointer(state)).Fsize<<1 { 7544 Xgz_error(tls, state, -3, ts+260) 7545 return -1 7546 } 7547 7548 // slide output data if needed and insert byte before existing data 7549 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext == (*Gz_state)(unsafe.Pointer(state)).Fout { 7550 var src uintptr = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) 7551 var dest uintptr = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize<<1) 7552 for src > (*Gz_state)(unsafe.Pointer(state)).Fout { 7553 *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&dest, 1))) = *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&src, 1))) 7554 } 7555 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = dest 7556 } 7557 (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave++ 7558 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext-- 7559 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c) 7560 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos-- 7561 (*Gz_state)(unsafe.Pointer(state)).Fpast = 0 7562 return c 7563 } 7564 7565 // -- see zlib.h -- 7566 func Xgzgets(tls *libc.TLS, file GzFile, buf uintptr, len int32) uintptr { /* gzread.c:543:6: */ 7567 var left uint32 7568 var n uint32 7569 var str uintptr 7570 var eol uintptr 7571 var state Gz_statep 7572 7573 // check parameters and get internal structure 7574 if file == uintptr(0) || buf == uintptr(0) || len < 1 { 7575 return uintptr(0) 7576 } 7577 state = file 7578 7579 // check that we're reading and that there's no (serious) error 7580 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 { 7581 return uintptr(0) 7582 } 7583 7584 // process a skip request 7585 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 7586 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 7587 if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 7588 return uintptr(0) 7589 } 7590 } 7591 7592 // copy output bytes up to new line or len - 1, whichever comes first -- 7593 // append a terminating zero to the string (we don't check for a zero in 7594 // the contents, let the user worry about that) 7595 str = buf 7596 left = uint32(len) - uint32(1) 7597 if left != 0 { 7598 for __ccgo := true; __ccgo; __ccgo = left != 0 && eol == uintptr(0) { 7599 // assure that something is in the output buffer 7600 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) && gz_fetch(tls, state) == -1 { 7601 return uintptr(0) 7602 } // error 7603 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { // end of file 7604 (*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // read past end 7605 break // return what we have 7606 } 7607 7608 // look for end-of-line in current output buffer 7609 if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > left { 7610 n = left 7611 } else { 7612 n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave 7613 } 7614 eol = libc.Xmemchr(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, '\n', uint64(n)) 7615 if eol != uintptr(0) { 7616 n = uint32((int64(eol)-int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext))/1) + uint32(1) 7617 } 7618 7619 // copy through end-of-line, or remainder if not found 7620 libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(n)) 7621 *(*uint32)(unsafe.Pointer(state)) -= n 7622 *(*uintptr)(unsafe.Pointer(state + 8)) += uintptr(n) 7623 *(*Off_t)(unsafe.Pointer(state + 16)) += Off_t(n) 7624 left = left - n 7625 buf += uintptr(n) 7626 } 7627 } 7628 7629 // return terminated string, or if nothing, end of file 7630 if buf == str { 7631 return uintptr(0) 7632 } 7633 *(*int8)(unsafe.Pointer(buf)) = int8(0) 7634 return str 7635 } 7636 7637 // -- see zlib.h -- 7638 func Xgzdirect(tls *libc.TLS, file GzFile) int32 { /* gzread.c:607:13: */ 7639 var state Gz_statep 7640 7641 // get internal structure 7642 if file == uintptr(0) { 7643 return 0 7644 } 7645 state = file 7646 7647 // if the state is not known, but we can find out, then do so (this is 7648 // mainly for right after a gzopen() or gzdopen()) 7649 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) { 7650 gz_look(tls, state) 7651 } 7652 7653 // return 1 if transparent, 0 if processing a gzip stream 7654 return (*Gz_state)(unsafe.Pointer(state)).Fdirect 7655 } 7656 7657 // -- see zlib.h -- 7658 func Xgzclose_r(tls *libc.TLS, file GzFile) int32 { /* gzread.c:627:13: */ 7659 var ret int32 7660 var err int32 7661 var state Gz_statep 7662 7663 // get internal structure 7664 if file == uintptr(0) { 7665 return -2 7666 } 7667 state = file 7668 7669 // check that we're reading 7670 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { 7671 return -2 7672 } 7673 7674 // free memory and close file 7675 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 7676 XinflateEnd(tls, state+120) 7677 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 7678 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 7679 } 7680 if (*Gz_state)(unsafe.Pointer(state)).Ferr == -5 { 7681 err = -5 7682 } else { 7683 err = Z_OK 7684 } 7685 Xgz_error(tls, state, Z_OK, uintptr(0)) 7686 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 7687 ret = libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) 7688 libc.Xfree(tls, state) 7689 if ret != 0 { 7690 return -1 7691 } 7692 return err 7693 } 7694 7695 // Initialize state for writing a gzip file. Mark initialization by setting 7696 // 7697 // state->size to non-zero. Return -1 on a memory allocation failure, or 0 on 7698 // success. 7699 func gz_init(tls *libc.TLS, state Gz_statep) int32 { /* gzwrite.c:17:11: */ 7700 var ret int32 7701 var strm Z_streamp = state + 120 7702 7703 // allocate input buffer (double size for gzprintf) 7704 (*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant<<1)) 7705 if (*Gz_state)(unsafe.Pointer(state)).Fin == uintptr(0) { 7706 Xgz_error(tls, state, -4, ts+87) 7707 return -1 7708 } 7709 7710 // only need output buffer and deflate state if compressing 7711 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 7712 // allocate output buffer 7713 (*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant)) 7714 if (*Gz_state)(unsafe.Pointer(state)).Fout == uintptr(0) { 7715 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 7716 Xgz_error(tls, state, -4, ts+87) 7717 return -1 7718 } 7719 7720 // allocate deflate memory, set up for gzip compression 7721 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = Alloc_func(Z_NULL) 7722 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = Free_func(Z_NULL) 7723 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = Voidpf(Z_NULL) 7724 ret = XdeflateInit2_(tls, strm, (*Gz_state)(unsafe.Pointer(state)).Flevel, Z_DEFLATED, MAX_WBITS+16, DEF_MEM_LEVEL, (*Gz_state)(unsafe.Pointer(state)).Fstrategy, ts, int32(unsafe.Sizeof(Z_stream{}))) 7725 if ret != Z_OK { 7726 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 7727 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 7728 Xgz_error(tls, state, -4, ts+87) 7729 return -1 7730 } 7731 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = uintptr(0) 7732 } 7733 7734 // mark state as initialized 7735 (*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant 7736 7737 // initialize write buffer if compressing 7738 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 7739 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 7740 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 7741 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 7742 } 7743 return 0 7744 } 7745 7746 // Compress whatever is at avail_in and next_in and write to the output file. 7747 // 7748 // Return -1 if there is an error writing to the output file or if gz_init() 7749 // fails to allocate memory, otherwise 0. flush is assumed to be a valid 7750 // deflate() flush value. If flush is Z_FINISH, then the deflate() state is 7751 // reset to start a new gzip stream. If gz->direct is true, then simply write 7752 // to the output file without compressing, and ignore flush. 7753 func gz_comp(tls *libc.TLS, state Gz_statep, flush int32) int32 { /* gzwrite.c:73:11: */ 7754 var ret int32 7755 var writ int32 7756 var have uint32 7757 var put uint32 7758 var max uint32 = uint32(libc.Uint32(libc.Uint32FromInt32(-1)))>>2 + uint32(1) 7759 var strm Z_streamp = state + 120 7760 7761 // allocate memory if this is the first time through 7762 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 { 7763 return -1 7764 } 7765 7766 // write directly if requested 7767 if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 { 7768 for (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { 7769 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in > max { 7770 put = max 7771 } else { 7772 put = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 7773 } 7774 writ = int32(libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(put))) 7775 if writ < 0 { 7776 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno(tls))))) 7777 return -1 7778 } 7779 *(*UInt)(unsafe.Pointer(strm + 8)) -= uint32(writ) 7780 *(*uintptr)(unsafe.Pointer(strm)) += uintptr(writ) 7781 } 7782 return 0 7783 } 7784 7785 // run deflate() on provided input until it produces no more output 7786 ret = Z_OK 7787 for __ccgo := true; __ccgo; __ccgo = have != 0 { 7788 // write out current buffer contents if full, or if flushing, but if 7789 // doing Z_FINISH then don't write until we get to Z_STREAM_END 7790 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) || flush != Z_NO_FLUSH && (flush != Z_FINISH || ret == Z_STREAM_END) { 7791 for (*Z_stream)(unsafe.Pointer(strm)).Fnext_out > (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext { 7792 if (int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out)-int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext))/1 > int64(int32(max)) { 7793 put = max 7794 } else { 7795 put = uint32((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1) 7796 } 7797 writ = int32(libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(put))) 7798 if writ < 0 { 7799 Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno(tls))))) 7800 return -1 7801 } 7802 *(*uintptr)(unsafe.Pointer(state + 8)) += uintptr(writ) 7803 } 7804 if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) { 7805 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize 7806 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout 7807 (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout 7808 } 7809 } 7810 7811 // compress 7812 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 7813 ret = Xdeflate(tls, strm, flush) 7814 if ret == -2 { 7815 Xgz_error(tls, state, -2, 7816 ts+291) 7817 return -1 7818 } 7819 have = have - (*Z_stream)(unsafe.Pointer(strm)).Favail_out 7820 } 7821 7822 // if that completed a deflate stream, allow another to start 7823 if flush == Z_FINISH { 7824 XdeflateReset(tls, strm) 7825 } 7826 7827 // all done, no errors 7828 return 0 7829 } 7830 7831 // Compress len zeros to output. Return -1 on a write error or memory 7832 // 7833 // allocation failure by gz_comp(), or 0 on success. 7834 func gz_zero(tls *libc.TLS, state Gz_statep, len Off_t) int32 { /* gzwrite.c:145:11: */ 7835 var first int32 7836 var n uint32 7837 var strm Z_streamp = state + 120 7838 7839 // consume whatever's left in the input buffer 7840 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 { 7841 return -1 7842 } 7843 7844 // compress len zeros (len guaranteed > 0) 7845 first = 1 7846 for len != 0 { 7847 if uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off_t(0))) && (*Gz_state)(unsafe.Pointer(state)).Fsize > uint32(INT_MAX) || Off_t((*Gz_state)(unsafe.Pointer(state)).Fsize) > len { 7848 n = uint32(len) 7849 } else { 7850 n = (*Gz_state)(unsafe.Pointer(state)).Fsize 7851 } 7852 if first != 0 { 7853 libc.Xmemset(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, 0, uint64(n)) 7854 first = 0 7855 } 7856 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = n 7857 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 7858 *(*Off_t)(unsafe.Pointer(state + 16)) += Off_t(n) 7859 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 7860 return -1 7861 } 7862 len = len - Off_t(n) 7863 } 7864 return 0 7865 } 7866 7867 // Write len bytes from buf to file. Return the number of bytes written. If 7868 // 7869 // the returned value is less than len, then there was an error. 7870 func gz_write(tls *libc.TLS, state Gz_statep, buf Voidpc, len Z_size_t) Z_size_t { /* gzwrite.c:178:16: */ 7871 var put Z_size_t = len 7872 7873 // if len is zero, avoid unnecessary operations 7874 if len == uint64(0) { 7875 return uint64(0) 7876 } 7877 7878 // allocate memory if this is the first time through 7879 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 { 7880 return uint64(0) 7881 } 7882 7883 // check for seek request 7884 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 7885 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 7886 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 7887 return uint64(0) 7888 } 7889 } 7890 7891 // for small len, copy to input buffer, otherwise compress directly 7892 if len < Z_size_t((*Gz_state)(unsafe.Pointer(state)).Fsize) { 7893 // copy to input buffer, compress when full 7894 for __ccgo := true; __ccgo; __ccgo = len != 0 { 7895 var have uint32 7896 var copy uint32 7897 7898 if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) { 7899 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 7900 } 7901 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) 7902 copy = (*Gz_state)(unsafe.Pointer(state)).Fsize - have 7903 if Z_size_t(copy) > len { 7904 copy = uint32(len) 7905 } 7906 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr(have), buf, uint64(copy)) 7907 *(*UInt)(unsafe.Pointer(state + 120 + 8)) += copy 7908 *(*Off_t)(unsafe.Pointer(state + 16)) += Off_t(copy) 7909 buf = buf + uintptr(copy) 7910 len = len - Z_size_t(copy) 7911 if len != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 { 7912 return uint64(0) 7913 } 7914 } 7915 } else { 7916 // consume whatever's left in the input buffer 7917 if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 { 7918 return uint64(0) 7919 } 7920 7921 // directly compress user buffer to file 7922 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = buf 7923 for __ccgo1 := true; __ccgo1; __ccgo1 = len != 0 { 7924 var n uint32 = libc.Uint32(libc.Uint32FromInt32(-1)) 7925 if Z_size_t(n) > len { 7926 n = uint32(len) 7927 } 7928 (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = n 7929 *(*Off_t)(unsafe.Pointer(state + 16)) += Off_t(n) 7930 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 7931 return uint64(0) 7932 } 7933 len = len - Z_size_t(n) 7934 } 7935 } 7936 7937 // input was all buffered or compressed 7938 return put 7939 } 7940 7941 // -- see zlib.h -- 7942 func Xgzwrite(tls *libc.TLS, file GzFile, buf Voidpc, len uint32) int32 { /* gzwrite.c:246:13: */ 7943 var state Gz_statep 7944 7945 // get internal structure 7946 if file == uintptr(0) { 7947 return 0 7948 } 7949 state = file 7950 7951 // check that we're writing and that there's no error 7952 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 7953 return 0 7954 } 7955 7956 // since an int is returned, make sure len fits in one, otherwise return 7957 // with an error (this avoids a flaw in the interface) 7958 if int32(len) < 0 { 7959 Xgz_error(tls, state, -3, ts+330) 7960 return 0 7961 } 7962 7963 // write len bytes from buf (the return value will fit in an int) 7964 return int32(gz_write(tls, state, buf, uint64(len))) 7965 } 7966 7967 // -- see zlib.h -- 7968 func Xgzfwrite(tls *libc.TLS, buf Voidpc, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzwrite.c:274:18: */ 7969 var len Z_size_t 7970 var state Gz_statep 7971 7972 // get internal structure 7973 if file == uintptr(0) { 7974 return uint64(0) 7975 } 7976 state = file 7977 7978 // check that we're writing and that there's no error 7979 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 7980 return uint64(0) 7981 } 7982 7983 // compute bytes to read -- error on overflow 7984 len = nitems * size 7985 if size != 0 && len/size != nitems { 7986 Xgz_error(tls, state, -2, ts+227) 7987 return uint64(0) 7988 } 7989 7990 // write len bytes to buf, return the number of full items written 7991 if len != 0 { 7992 return gz_write(tls, state, buf, len) / size 7993 } 7994 return uint64(0) 7995 } 7996 7997 // -- see zlib.h -- 7998 func Xgzputc(tls *libc.TLS, file GzFile, c int32) int32 { /* gzwrite.c:304:13: */ 7999 bp := tls.Alloc(1) 8000 defer tls.Free(1) 8001 8002 var have uint32 8003 // var buf [1]uint8 at bp, 1 8004 8005 var state Gz_statep 8006 var strm Z_streamp 8007 8008 // get internal structure 8009 if file == uintptr(0) { 8010 return -1 8011 } 8012 state = file 8013 strm = state + 120 8014 8015 // check that we're writing and that there's no error 8016 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 8017 return -1 8018 } 8019 8020 // check for seek request 8021 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8022 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8023 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8024 return -1 8025 } 8026 } 8027 8028 // try writing to input buffer for speed (state->size == 0 if buffer not 8029 // initialized) 8030 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 8031 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 8032 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 8033 } 8034 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) 8035 if have < (*Gz_state)(unsafe.Pointer(state)).Fsize { 8036 *(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have))) = uint8(c) 8037 (*Z_stream)(unsafe.Pointer(strm)).Favail_in++ 8038 (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++ 8039 return c & 0xff 8040 } 8041 } 8042 8043 // no room in buffer or not initialized, use gz_write() 8044 *(*uint8)(unsafe.Pointer(bp)) = uint8(c) 8045 if gz_write(tls, state, bp, uint64(1)) != uint64(1) { 8046 return -1 8047 } 8048 return c & 0xff 8049 } 8050 8051 // -- see zlib.h -- 8052 func Xgzputs(tls *libc.TLS, file GzFile, str uintptr) int32 { /* gzwrite.c:352:13: */ 8053 var ret int32 8054 var len Z_size_t 8055 var state Gz_statep 8056 8057 // get internal structure 8058 if file == uintptr(0) { 8059 return -1 8060 } 8061 state = file 8062 8063 // check that we're writing and that there's no error 8064 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 8065 return -1 8066 } 8067 8068 // write string 8069 len = libc.Xstrlen(tls, str) 8070 ret = int32(gz_write(tls, state, str, len)) 8071 if ret == 0 && len != uint64(0) { 8072 return -1 8073 } 8074 return ret 8075 } 8076 8077 // $OpenBSD: stdarg.h,v 1.10 2020/07/21 23:09:00 daniel Exp $ 8078 // Copyright (c) 2003, 2004 Marc espie <espie@openbsd.org> 8079 // 8080 // Permission to use, copy, modify, and distribute this software for any 8081 // purpose with or without fee is hereby granted, provided that the above 8082 // copyright notice and this permission notice appear in all copies. 8083 // 8084 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8085 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 8086 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 8087 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 8088 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 8089 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 8090 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 8091 8092 // -- see zlib.h -- 8093 func Xgzvprintf(tls *libc.TLS, file GzFile, format uintptr, va Va_list) int32 { /* gzwrite.c:379:15: */ 8094 var len int32 8095 var left uint32 8096 var next uintptr 8097 var state Gz_statep 8098 var strm Z_streamp 8099 8100 // get internal structure 8101 if file == uintptr(0) { 8102 return -2 8103 } 8104 state = file 8105 strm = state + 120 8106 8107 // check that we're writing and that there's no error 8108 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 8109 return -2 8110 } 8111 8112 // make sure we have some buffer space 8113 if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 { 8114 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8115 } 8116 8117 // check for seek request 8118 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8119 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8120 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8121 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8122 } 8123 } 8124 8125 // do the printf() into the input buffer, put length in len -- the input 8126 // buffer is double-sized just for this function, so there is guaranteed to 8127 // be state->size bytes available after the current contents 8128 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) { 8129 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 8130 } 8131 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) 8132 *(*int8)(unsafe.Pointer(next + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize-uint32(1)))) = int8(0) 8133 len = libc.Xvsnprintf(tls, next, uint64((*Gz_state)(unsafe.Pointer(state)).Fsize), format, va) 8134 8135 // check that printf() results fit in buffer 8136 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 { 8137 return 0 8138 } 8139 8140 // update buffer and position, compress first half if past that 8141 *(*UInt)(unsafe.Pointer(strm + 8)) += uint32(len) 8142 *(*Off_t)(unsafe.Pointer(state + 16)) += Off_t(len) 8143 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in >= (*Gz_state)(unsafe.Pointer(state)).Fsize { 8144 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_in - (*Gz_state)(unsafe.Pointer(state)).Fsize 8145 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = (*Gz_state)(unsafe.Pointer(state)).Fsize 8146 if gz_comp(tls, state, Z_NO_FLUSH) == -1 { 8147 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8148 } 8149 libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize), uint64(left)) 8150 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin 8151 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = left 8152 } 8153 return len 8154 } 8155 8156 func Xgzprintf(tls *libc.TLS, file GzFile, format uintptr, va uintptr) int32 { /* gzwrite.c:451:15: */ 8157 var va1 Va_list 8158 _ = va1 8159 var ret int32 8160 8161 va1 = va 8162 ret = Xgzvprintf(tls, file, format, va1) 8163 _ = va1 8164 return ret 8165 } 8166 8167 // -- see zlib.h -- 8168 func Xgzflush(tls *libc.TLS, file GzFile, flush int32) int32 { /* gzwrite.c:553:13: */ 8169 var state Gz_statep 8170 8171 // get internal structure 8172 if file == uintptr(0) { 8173 return -2 8174 } 8175 state = file 8176 8177 // check that we're writing and that there's no error 8178 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 8179 return -2 8180 } 8181 8182 // check flush parameter 8183 if flush < 0 || flush > Z_FINISH { 8184 return -2 8185 } 8186 8187 // check for seek request 8188 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8189 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8190 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8191 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8192 } 8193 } 8194 8195 // compress remaining data with requested flush 8196 gz_comp(tls, state, flush) 8197 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8198 } 8199 8200 // -- see zlib.h -- 8201 func Xgzsetparams(tls *libc.TLS, file GzFile, level int32, strategy int32) int32 { /* gzwrite.c:585:13: */ 8202 var state Gz_statep 8203 var strm Z_streamp 8204 8205 // get internal structure 8206 if file == uintptr(0) { 8207 return -2 8208 } 8209 state = file 8210 strm = state + 120 8211 8212 // check that we're writing and that there's no error 8213 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK { 8214 return -2 8215 } 8216 8217 // if no change is requested, then do nothing 8218 if level == (*Gz_state)(unsafe.Pointer(state)).Flevel && strategy == (*Gz_state)(unsafe.Pointer(state)).Fstrategy { 8219 return Z_OK 8220 } 8221 8222 // check for seek request 8223 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8224 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8225 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8226 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8227 } 8228 } 8229 8230 // change compression parameters for subsequent input 8231 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 8232 // flush previous input with previous parameters before changing 8233 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 && gz_comp(tls, state, Z_BLOCK) == -1 { 8234 return (*Gz_state)(unsafe.Pointer(state)).Ferr 8235 } 8236 XdeflateParams(tls, strm, level, strategy) 8237 } 8238 (*Gz_state)(unsafe.Pointer(state)).Flevel = level 8239 (*Gz_state)(unsafe.Pointer(state)).Fstrategy = strategy 8240 return Z_OK 8241 } 8242 8243 // -- see zlib.h -- 8244 func Xgzclose_w(tls *libc.TLS, file GzFile) int32 { /* gzwrite.c:627:13: */ 8245 var ret int32 = Z_OK 8246 var state Gz_statep 8247 8248 // get internal structure 8249 if file == uintptr(0) { 8250 return -2 8251 } 8252 state = file 8253 8254 // check that we're writing 8255 if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE { 8256 return -2 8257 } 8258 8259 // check for seek request 8260 if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 { 8261 (*Gz_state)(unsafe.Pointer(state)).Fseek = 0 8262 if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 { 8263 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 8264 } 8265 } 8266 8267 // flush, free memory, and close file 8268 if gz_comp(tls, state, Z_FINISH) == -1 { 8269 ret = (*Gz_state)(unsafe.Pointer(state)).Ferr 8270 } 8271 if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 { 8272 if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) { 8273 XdeflateEnd(tls, state+120) 8274 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout) 8275 } 8276 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin) 8277 } 8278 Xgz_error(tls, state, Z_OK, uintptr(0)) 8279 libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) 8280 if libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) == -1 { 8281 ret = -1 8282 } 8283 libc.Xfree(tls, state) 8284 return ret 8285 } 8286 8287 // Reverse the bytes in a 32-bit value 8288 8289 // inftrees.h -- header to use inftrees.c 8290 // Copyright (C) 1995-2005, 2010 Mark Adler 8291 // For conditions of distribution and use, see copyright notice in zlib.h 8292 8293 // WARNING: this file should *not* be used by applications. It is 8294 // part of the implementation of the compression library and is 8295 // subject to change. Applications should only use zlib.h. 8296 // 8297 8298 // Structure for decoding tables. Each entry provides either the 8299 // 8300 // information needed to do the operation requested by the code that 8301 // indexed that table entry, or it provides a pointer to another 8302 // table that indexes more bits of the code. op indicates whether 8303 // the entry is a pointer to another table, a literal, a length or 8304 // distance, an end-of-block, or an invalid code. For a table 8305 // pointer, the low four bits of op is the number of index bits of 8306 // that table. For a length or distance, the low four bits of op 8307 // is the number of extra bits to get after the code. bits is 8308 // the number of bits in this code or part of the code to drop off 8309 // of the bit buffer. val is the actual byte to output in the case 8310 // of a literal, the base length or distance, or the offset from 8311 // the current table to the next table. Each entry is four bytes. 8312 type Code = struct { 8313 Fop uint8 8314 Fbits uint8 8315 Fval uint16 8316 } /* inftrees.h:28:3 */ 8317 8318 // op values as set by inflate_table(): 8319 // 00000000 - literal 8320 // 0000tttt - table link, tttt != 0 is the number of table index bits 8321 // 0001eeee - length or distance, eeee is the number of extra bits 8322 // 01100000 - end of block 8323 // 01000000 - invalid code 8324 // 8325 8326 // Maximum size of the dynamic table. The maximum number of code structures is 8327 // 1444, which is the sum of 852 for literal/length codes and 592 for distance 8328 // codes. These values were found by exhaustive searches using the program 8329 // examples/enough.c found in the zlib distribtution. The arguments to that 8330 // program are the number of symbols, the initial root table size, and the 8331 // maximum bit length of a code. "enough 286 9 15" for literal/length codes 8332 // returns returns 852, and "enough 30 6 15" for distance codes returns 592. 8333 // The initial root table size (9 or 6) is found in the fifth argument of the 8334 // inflate_table() calls in inflate.c and infback.c. If the root table size is 8335 // changed, then these maximum sizes would be need to be recalculated and 8336 // updated. 8337 8338 // Type of code to build for inflate_table() 8339 type Codetype = uint32 /* inftrees.h:58:3 */ 8340 // inflate.h -- internal inflate state definition 8341 // Copyright (C) 1995-2016 Mark Adler 8342 // For conditions of distribution and use, see copyright notice in zlib.h 8343 8344 // WARNING: this file should *not* be used by applications. It is 8345 // part of the implementation of the compression library and is 8346 // subject to change. Applications should only use zlib.h. 8347 // 8348 8349 // define NO_GZIP when compiling if you want to disable gzip header and 8350 // trailer decoding by inflate(). NO_GZIP would be used to avoid linking in 8351 // the crc code when it is not needed. For shared libraries, gzip decoding 8352 // should be left enabled. 8353 8354 // Possible inflate modes between inflate() calls 8355 type Inflate_mode = uint32 /* inflate.h:53:3 */ 8356 8357 // 8358 // State transitions between above modes - 8359 // 8360 // (most modes can go to BAD or MEM on error -- not shown for clarity) 8361 // 8362 // Process header: 8363 // HEAD -> (gzip) or (zlib) or (raw) 8364 // (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> 8365 // HCRC -> TYPE 8366 // (zlib) -> DICTID or TYPE 8367 // DICTID -> DICT -> TYPE 8368 // (raw) -> TYPEDO 8369 // Read deflate blocks: 8370 // TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK 8371 // STORED -> COPY_ -> COPY -> TYPE 8372 // TABLE -> LENLENS -> CODELENS -> LEN_ 8373 // LEN_ -> LEN 8374 // Read deflate codes in fixed or dynamic block: 8375 // LEN -> LENEXT or LIT or TYPE 8376 // LENEXT -> DIST -> DISTEXT -> MATCH -> LEN 8377 // LIT -> LEN 8378 // Process trailer: 8379 // CHECK -> LENGTH -> DONE 8380 // 8381 8382 // State maintained between inflate() calls -- approximately 7K bytes, not 8383 // 8384 // including the allocated sliding window, which is up to 32K bytes. 8385 type Inflate_state = struct { 8386 Fstrm Z_streamp 8387 Fmode Inflate_mode 8388 Flast int32 8389 Fwrap int32 8390 Fhavedict int32 8391 Fflags int32 8392 Fdmax uint32 8393 Fcheck uint64 8394 Ftotal uint64 8395 Fhead Gz_headerp 8396 Fwbits uint32 8397 Fwsize uint32 8398 Fwhave uint32 8399 Fwnext uint32 8400 Fwindow uintptr 8401 Fhold uint64 8402 Fbits uint32 8403 Flength uint32 8404 Foffset uint32 8405 Fextra uint32 8406 Flencode uintptr 8407 Fdistcode uintptr 8408 Flenbits uint32 8409 Fdistbits uint32 8410 Fncode uint32 8411 Fnlen uint32 8412 Fndist uint32 8413 Fhave uint32 8414 Fnext uintptr 8415 Flens [320]uint16 8416 Fwork [288]uint16 8417 Fcodes [1444]Code 8418 Fsane int32 8419 Fback int32 8420 Fwas uint32 8421 F__ccgo_pad1 [4]byte 8422 } /* inflate.h:82:1 */ 8423 8424 // strm provides memory allocation functions in zalloc and zfree, or 8425 // Z_NULL to use the library memory allocation functions. 8426 // 8427 // windowBits is in the range 8..15, and window is a user-supplied 8428 // window and output buffer that is 2**windowBits bytes. 8429 func XinflateBackInit_(tls *libc.TLS, strm Z_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) int32 { /* infback.c:28:13: */ 8430 var state uintptr 8431 8432 if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts))) || stream_size != int32(unsafe.Sizeof(Z_stream{})) { 8433 return -6 8434 } 8435 if strm == uintptr(Z_NULL) || window == uintptr(Z_NULL) || windowBits < 8 || windowBits > 15 { 8436 return -2 8437 } 8438 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 8439 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 8440 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 8441 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 8442 }{Xzcalloc})) 8443 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 8444 } 8445 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 8446 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 8447 f func(*libc.TLS, Voidpf, Voidpf) 8448 }{Xzcfree})) 8449 } 8450 state = (*struct { 8451 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 8452 })(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{}))) 8453 if state == uintptr(Z_NULL) { 8454 return -4 8455 } 8456 8457 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 8458 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 8459 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = UInt(windowBits) 8460 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << windowBits 8461 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = window 8462 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 8463 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 8464 return Z_OK 8465 } 8466 8467 // Return state with length and distance decoding tables and index sizes set to 8468 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 8469 // If BUILDFIXED is defined, then instead this routine builds the tables the 8470 // first time it's called, and returns those tables the first time and 8471 // thereafter. This reduces the size of the code by about 2K bytes, in 8472 // exchange for a little execution time. However, BUILDFIXED should not be 8473 // used for threaded applications, since the rewriting of the tables and virgin 8474 // may not be thread-safe. 8475 func fixedtables(tls *libc.TLS, state uintptr) { /* infback.c:82:12: */ 8476 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix)) 8477 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 8478 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix)) 8479 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 8480 } 8481 8482 var lenfix = [512]Code{ 8483 {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)}, 8484 {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)}, 8485 {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)}, 8486 {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)}, 8487 {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)}, 8488 {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)}, 8489 {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)}, 8490 {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)}, 8491 {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)}, 8492 {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)}, 8493 {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)}, 8494 {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)}, 8495 {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)}, 8496 {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)}, 8497 {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)}, 8498 {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)}, 8499 {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)}, 8500 {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)}, 8501 {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)}, 8502 {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)}, 8503 {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)}, 8504 {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)}, 8505 {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)}, 8506 {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)}, 8507 {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)}, 8508 {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)}, 8509 {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)}, 8510 {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)}, 8511 {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)}, 8512 {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)}, 8513 {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)}, 8514 {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)}, 8515 {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)}, 8516 {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)}, 8517 {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)}, 8518 {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)}, 8519 {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)}, 8520 {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)}, 8521 {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)}, 8522 {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)}, 8523 {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)}, 8524 {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)}, 8525 {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)}, 8526 {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)}, 8527 {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)}, 8528 {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)}, 8529 {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)}, 8530 {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)}, 8531 {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)}, 8532 {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)}, 8533 {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)}, 8534 {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)}, 8535 {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)}, 8536 {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)}, 8537 {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)}, 8538 {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)}, 8539 {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)}, 8540 {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)}, 8541 {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)}, 8542 {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)}, 8543 {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)}, 8544 {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)}, 8545 {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)}, 8546 {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)}, 8547 {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)}, 8548 {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)}, 8549 {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)}, 8550 {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)}, 8551 {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)}, 8552 {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)}, 8553 {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)}, 8554 {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)}, 8555 {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)}, 8556 {Fbits: uint8(9), Fval: uint16(255)}, 8557 } /* inffixed.h:10:23 */ 8558 var distfix = [32]Code{ 8559 {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)}, 8560 {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)}, 8561 {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)}, 8562 {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)}, 8563 {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)}, 8564 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 8565 } /* inffixed.h:87:23 */ 8566 8567 // Macros for inflateBack(): 8568 8569 // Load returned state from inflate_fast() 8570 8571 // Set state from registers for inflate_fast() 8572 8573 // Clear the input bit accumulator 8574 8575 // Assure that some input is available. If input is requested, but denied, 8576 // then return a Z_BUF_ERROR from inflateBack(). 8577 8578 // Get a byte of input into the bit accumulator, or return from inflateBack() 8579 // with an error if there is no input available. 8580 8581 // Assure that there are at least n bits in the bit accumulator. If there is 8582 // not enough available input to do that, then return from inflateBack() with 8583 // an error. 8584 8585 // Return the low n bits of the bit accumulator (n < 16) 8586 8587 // Remove n bits from the bit accumulator 8588 8589 // Remove zero to seven bits as needed to go to a byte boundary 8590 8591 // Assure that some output space is available, by writing out the window 8592 // if it's full. If the write fails, return from inflateBack() with a 8593 // Z_BUF_ERROR. 8594 8595 // strm provides the memory allocation functions and window buffer on input, 8596 // and provides information on the unused input on return. For Z_DATA_ERROR 8597 // returns, strm will also provide an error message. 8598 // 8599 // in() and out() are the call-back input and output functions. When 8600 // inflateBack() needs more input, it calls in(). When inflateBack() has 8601 // filled the window with output, or when it completes with data in the 8602 // window, it calls out() to write out the data. The application must not 8603 // change the provided input until in() is called again or inflateBack() 8604 // returns. The application must not change the window/output buffer until 8605 // inflateBack() returns. 8606 // 8607 // in() and out() are called with a descriptor parameter provided in the 8608 // inflateBack() call. This parameter can be a structure that provides the 8609 // information required to do the read or write, as well as accumulated 8610 // information on the input and output such as totals and check values. 8611 // 8612 // in() should return zero on failure. out() should return non-zero on 8613 // failure. If either in() or out() fails, than inflateBack() returns a 8614 // Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it 8615 // was in() or out() that caused in the error. Otherwise, inflateBack() 8616 // returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format 8617 // error, or Z_MEM_ERROR if it could not allocate memory for the state. 8618 // inflateBack() can also return Z_STREAM_ERROR if the input parameters 8619 // are not correct, i.e. strm is Z_NULL or the state was not initialized. 8620 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: */ 8621 bp := tls.Alloc(8) 8622 defer tls.Free(8) 8623 8624 var state uintptr 8625 // var next uintptr at bp, 8 8626 // next input 8627 var put uintptr // next output 8628 var have uint32 8629 var left uint32 // available input and output 8630 var hold uint64 // bit buffer 8631 var bits uint32 // bits in bit buffer 8632 var copy uint32 // number of stored or match bytes to copy 8633 var from uintptr // where to copy match bytes from 8634 var here Code // current decoding table entry 8635 var last Code // parent table entry 8636 var len uint32 // length to copy for repeats, bits to drop 8637 var ret int32 8638 8639 // Check that the strm exists and that the state was initialized 8640 if !(strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL)) { 8641 goto __1 8642 } 8643 return -2 8644 __1: 8645 ; 8646 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 8647 8648 // Reset the state 8649 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 8650 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 8651 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 8652 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 8653 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 8654 if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(Z_NULL) { 8655 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 8656 } else { 8657 have = uint32(0) 8658 } 8659 hold = uint64(0) 8660 bits = uint32(0) 8661 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 8662 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 8663 8664 // Inflate until end of block marked as last 8665 __2: 8666 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 8667 case TYPE: 8668 goto __6 8669 8670 case STORED: 8671 goto __7 8672 8673 case TABLE: 8674 goto __8 8675 8676 case LEN: 8677 goto __9 8678 8679 case DONE: 8680 goto __10 8681 8682 case BAD: 8683 goto __11 8684 8685 default: 8686 goto __12 8687 } 8688 goto __5 8689 __6: 8690 // determine and dispatch block type 8691 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 8692 goto __13 8693 } 8694 __14: 8695 hold >>= bits & uint32(7) 8696 bits = bits - bits&uint32(7) 8697 goto __15 8698 __15: 8699 if 0 != 0 { 8700 goto __14 8701 } 8702 goto __16 8703 __16: 8704 ; 8705 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 8706 goto __5 8707 __13: 8708 ; 8709 __17: 8710 __20: 8711 if !(bits < uint32(3)) { 8712 goto __21 8713 } 8714 __22: 8715 __25: 8716 if !(have == uint32(0)) { 8717 goto __28 8718 } 8719 have = (*struct { 8720 f func(*libc.TLS, uintptr, uintptr) uint32 8721 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 8722 if !(have == uint32(0)) { 8723 goto __29 8724 } 8725 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 8726 ret = -5 8727 goto inf_leave 8728 __29: 8729 ; 8730 __28: 8731 ; 8732 goto __26 8733 __26: 8734 if 0 != 0 { 8735 goto __25 8736 } 8737 goto __27 8738 __27: 8739 ; 8740 have-- 8741 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 8742 bits = bits + uint32(8) 8743 goto __23 8744 __23: 8745 if 0 != 0 { 8746 goto __22 8747 } 8748 goto __24 8749 __24: 8750 ; 8751 goto __20 8752 __21: 8753 ; 8754 goto __18 8755 __18: 8756 if 0 != 0 { 8757 goto __17 8758 } 8759 goto __19 8760 __19: 8761 ; 8762 (*Inflate_state)(unsafe.Pointer(state)).Flast = int32(uint32(hold) & (uint32(1)<<1 - uint32(1))) 8763 __30: 8764 hold >>= 1 8765 bits = bits - uint32(1) 8766 goto __31 8767 __31: 8768 if 0 != 0 { 8769 goto __30 8770 } 8771 goto __32 8772 __32: 8773 ; 8774 switch uint32(hold) & (uint32(1)<<2 - uint32(1)) { 8775 case uint32(0): 8776 goto __34 8777 case uint32(1): 8778 goto __35 8779 case uint32(2): 8780 goto __36 8781 case uint32(3): 8782 goto __37 8783 } 8784 goto __33 8785 __34: // stored block 8786 ; 8787 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 8788 goto __33 8789 __35: // fixed block 8790 fixedtables(tls, state) 8791 8792 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN // decode codes 8793 goto __33 8794 __36: // dynamic block 8795 ; 8796 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 8797 goto __33 8798 __37: 8799 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 8800 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 8801 __33: 8802 ; 8803 __38: 8804 hold >>= 2 8805 bits = bits - uint32(2) 8806 goto __39 8807 __39: 8808 if 0 != 0 { 8809 goto __38 8810 } 8811 goto __40 8812 __40: 8813 ; 8814 goto __5 8815 8816 __7: 8817 // get and verify stored block length 8818 __41: 8819 hold >>= bits & uint32(7) 8820 bits = bits - bits&uint32(7) 8821 goto __42 8822 __42: 8823 if 0 != 0 { 8824 goto __41 8825 } 8826 goto __43 8827 __43: 8828 ; // go to byte boundary 8829 __44: 8830 __47: 8831 if !(bits < uint32(32)) { 8832 goto __48 8833 } 8834 __49: 8835 __52: 8836 if !(have == uint32(0)) { 8837 goto __55 8838 } 8839 have = (*struct { 8840 f func(*libc.TLS, uintptr, uintptr) uint32 8841 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 8842 if !(have == uint32(0)) { 8843 goto __56 8844 } 8845 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 8846 ret = -5 8847 goto inf_leave 8848 __56: 8849 ; 8850 __55: 8851 ; 8852 goto __53 8853 __53: 8854 if 0 != 0 { 8855 goto __52 8856 } 8857 goto __54 8858 __54: 8859 ; 8860 have-- 8861 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 8862 bits = bits + uint32(8) 8863 goto __50 8864 __50: 8865 if 0 != 0 { 8866 goto __49 8867 } 8868 goto __51 8869 __51: 8870 ; 8871 goto __47 8872 __48: 8873 ; 8874 goto __45 8875 __45: 8876 if 0 != 0 { 8877 goto __44 8878 } 8879 goto __46 8880 __46: 8881 ; 8882 if !(hold&uint64(0xffff) != hold>>16^uint64(0xffff)) { 8883 goto __57 8884 } 8885 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 8886 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 8887 goto __5 8888 __57: 8889 ; 8890 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff) 8891 8892 __58: 8893 hold = uint64(0) 8894 bits = uint32(0) 8895 goto __59 8896 __59: 8897 if 0 != 0 { 8898 goto __58 8899 } 8900 goto __60 8901 __60: 8902 ; 8903 8904 // copy stored block from input to output 8905 __61: 8906 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0)) { 8907 goto __62 8908 } 8909 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 8910 __63: 8911 if !(have == uint32(0)) { 8912 goto __66 8913 } 8914 have = (*struct { 8915 f func(*libc.TLS, uintptr, uintptr) uint32 8916 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 8917 if !(have == uint32(0)) { 8918 goto __67 8919 } 8920 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 8921 ret = -5 8922 goto inf_leave 8923 __67: 8924 ; 8925 __66: 8926 ; 8927 goto __64 8928 __64: 8929 if 0 != 0 { 8930 goto __63 8931 } 8932 goto __65 8933 __65: 8934 ; 8935 __68: 8936 if !(left == uint32(0)) { 8937 goto __71 8938 } 8939 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 8940 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 8941 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 8942 if !((*struct { 8943 f func(*libc.TLS, uintptr, uintptr, uint32) int32 8944 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 8945 goto __72 8946 } 8947 ret = -5 8948 goto inf_leave 8949 __72: 8950 ; 8951 __71: 8952 ; 8953 goto __69 8954 __69: 8955 if 0 != 0 { 8956 goto __68 8957 } 8958 goto __70 8959 __70: 8960 ; 8961 if !(copy > have) { 8962 goto __73 8963 } 8964 copy = have 8965 __73: 8966 ; 8967 if !(copy > left) { 8968 goto __74 8969 } 8970 copy = left 8971 __74: 8972 ; 8973 libc.Xmemcpy(tls, put, *(*uintptr)(unsafe.Pointer(bp /* next */)), uint64(copy)) 8974 have = have - copy 8975 *(*uintptr)(unsafe.Pointer(bp /* next */)) += uintptr(copy) 8976 left = left - copy 8977 put += uintptr(copy) 8978 *(*uint32)(unsafe.Pointer(state + 92)) -= copy 8979 goto __61 8980 __62: 8981 ; 8982 8983 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 8984 goto __5 8985 8986 __8: 8987 // get dynamic table entries descriptor 8988 __75: 8989 __78: 8990 if !(bits < uint32(14)) { 8991 goto __79 8992 } 8993 __80: 8994 __83: 8995 if !(have == uint32(0)) { 8996 goto __86 8997 } 8998 have = (*struct { 8999 f func(*libc.TLS, uintptr, uintptr) uint32 9000 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9001 if !(have == uint32(0)) { 9002 goto __87 9003 } 9004 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9005 ret = -5 9006 goto inf_leave 9007 __87: 9008 ; 9009 __86: 9010 ; 9011 goto __84 9012 __84: 9013 if 0 != 0 { 9014 goto __83 9015 } 9016 goto __85 9017 __85: 9018 ; 9019 have-- 9020 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9021 bits = bits + uint32(8) 9022 goto __81 9023 __81: 9024 if 0 != 0 { 9025 goto __80 9026 } 9027 goto __82 9028 __82: 9029 ; 9030 goto __78 9031 __79: 9032 ; 9033 goto __76 9034 __76: 9035 if 0 != 0 { 9036 goto __75 9037 } 9038 goto __77 9039 __77: 9040 ; 9041 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(257) 9042 __88: 9043 hold >>= 5 9044 bits = bits - uint32(5) 9045 goto __89 9046 __89: 9047 if 0 != 0 { 9048 goto __88 9049 } 9050 goto __90 9051 __90: 9052 ; 9053 (*Inflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(1) 9054 __91: 9055 hold >>= 5 9056 bits = bits - uint32(5) 9057 goto __92 9058 __92: 9059 if 0 != 0 { 9060 goto __91 9061 } 9062 goto __93 9063 __93: 9064 ; 9065 (*Inflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(4) 9066 __94: 9067 hold >>= 4 9068 bits = bits - uint32(4) 9069 goto __95 9070 __95: 9071 if 0 != 0 { 9072 goto __94 9073 } 9074 goto __96 9075 __96: 9076 ; 9077 if !((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30)) { 9078 goto __97 9079 } 9080 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 9081 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9082 goto __5 9083 __97: 9084 ; 9085 9086 // get code length code lengths (not a typo) 9087 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 9088 __98: 9089 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 9090 goto __99 9091 } 9092 __100: 9093 __103: 9094 if !(bits < uint32(3)) { 9095 goto __104 9096 } 9097 __105: 9098 __108: 9099 if !(have == uint32(0)) { 9100 goto __111 9101 } 9102 have = (*struct { 9103 f func(*libc.TLS, uintptr, uintptr) uint32 9104 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9105 if !(have == uint32(0)) { 9106 goto __112 9107 } 9108 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9109 ret = -5 9110 goto inf_leave 9111 __112: 9112 ; 9113 __111: 9114 ; 9115 goto __109 9116 __109: 9117 if 0 != 0 { 9118 goto __108 9119 } 9120 goto __110 9121 __110: 9122 ; 9123 have-- 9124 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9125 bits = bits + uint32(8) 9126 goto __106 9127 __106: 9128 if 0 != 0 { 9129 goto __105 9130 } 9131 goto __107 9132 __107: 9133 ; 9134 goto __103 9135 __104: 9136 ; 9137 goto __101 9138 __101: 9139 if 0 != 0 { 9140 goto __100 9141 } 9142 goto __102 9143 __102: 9144 ; 9145 *(*uint16)(unsafe.Pointer(state + 152 + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(uint32(hold) & (uint32(1)<<3 - uint32(1))) 9146 __113: 9147 hold >>= 3 9148 bits = bits - uint32(3) 9149 goto __114 9150 __114: 9151 if 0 != 0 { 9152 goto __113 9153 } 9154 goto __115 9155 __115: 9156 ; 9157 goto __98 9158 __99: 9159 ; 9160 __116: 9161 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 9162 goto __117 9163 } 9164 *(*uint16)(unsafe.Pointer(state + 152 + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 9165 goto __116 9166 __117: 9167 ; 9168 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 9169 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 9170 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 9171 ret = Xinflate_table(tls, CODES, state+152, uint32(19), state+144, 9172 state+120, state+792) 9173 if !(ret != 0) { 9174 goto __118 9175 } 9176 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 9177 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9178 goto __5 9179 __118: 9180 ; 9181 9182 // get length and distance code code lengths 9183 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 9184 __119: 9185 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) { 9186 goto __120 9187 } 9188 __121: 9189 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4)) 9190 if !(uint32(here.Fbits) <= bits) { 9191 goto __124 9192 } 9193 goto __123 9194 __124: 9195 ; 9196 __125: 9197 __128: 9198 if !(have == uint32(0)) { 9199 goto __131 9200 } 9201 have = (*struct { 9202 f func(*libc.TLS, uintptr, uintptr) uint32 9203 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9204 if !(have == uint32(0)) { 9205 goto __132 9206 } 9207 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9208 ret = -5 9209 goto inf_leave 9210 __132: 9211 ; 9212 __131: 9213 ; 9214 goto __129 9215 __129: 9216 if 0 != 0 { 9217 goto __128 9218 } 9219 goto __130 9220 __130: 9221 ; 9222 have-- 9223 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9224 bits = bits + uint32(8) 9225 goto __126 9226 __126: 9227 if 0 != 0 { 9228 goto __125 9229 } 9230 goto __127 9231 __127: 9232 ; 9233 goto __122 9234 __122: 9235 goto __121 9236 goto __123 9237 __123: 9238 ; 9239 if !(int32(here.Fval) < 16) { 9240 goto __133 9241 } 9242 __135: 9243 hold >>= int32(here.Fbits) 9244 bits = bits - uint32(here.Fbits) 9245 goto __136 9246 __136: 9247 if 0 != 0 { 9248 goto __135 9249 } 9250 goto __137 9251 __137: 9252 ; 9253 *(*uint16)(unsafe.Pointer(state + 152 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 9254 goto __134 9255 __133: 9256 if !(int32(here.Fval) == 16) { 9257 goto __138 9258 } 9259 __140: 9260 __143: 9261 if !(bits < uint32(int32(here.Fbits)+2)) { 9262 goto __144 9263 } 9264 __145: 9265 __148: 9266 if !(have == uint32(0)) { 9267 goto __151 9268 } 9269 have = (*struct { 9270 f func(*libc.TLS, uintptr, uintptr) uint32 9271 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9272 if !(have == uint32(0)) { 9273 goto __152 9274 } 9275 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9276 ret = -5 9277 goto inf_leave 9278 __152: 9279 ; 9280 __151: 9281 ; 9282 goto __149 9283 __149: 9284 if 0 != 0 { 9285 goto __148 9286 } 9287 goto __150 9288 __150: 9289 ; 9290 have-- 9291 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9292 bits = bits + uint32(8) 9293 goto __146 9294 __146: 9295 if 0 != 0 { 9296 goto __145 9297 } 9298 goto __147 9299 __147: 9300 ; 9301 goto __143 9302 __144: 9303 ; 9304 goto __141 9305 __141: 9306 if 0 != 0 { 9307 goto __140 9308 } 9309 goto __142 9310 __142: 9311 ; 9312 __153: 9313 hold >>= int32(here.Fbits) 9314 bits = bits - uint32(here.Fbits) 9315 goto __154 9316 __154: 9317 if 0 != 0 { 9318 goto __153 9319 } 9320 goto __155 9321 __155: 9322 ; 9323 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 9324 goto __156 9325 } 9326 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 9327 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9328 goto __120 9329 __156: 9330 ; 9331 len = uint32(*(*uint16)(unsafe.Pointer(state + 152 + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2))) 9332 copy = uint32(3) + uint32(hold)&(uint32(1)<<2-uint32(1)) 9333 __157: 9334 hold >>= 2 9335 bits = bits - uint32(2) 9336 goto __158 9337 __158: 9338 if 0 != 0 { 9339 goto __157 9340 } 9341 goto __159 9342 __159: 9343 ; 9344 goto __139 9345 __138: 9346 if !(int32(here.Fval) == 17) { 9347 goto __160 9348 } 9349 __162: 9350 __165: 9351 if !(bits < uint32(int32(here.Fbits)+3)) { 9352 goto __166 9353 } 9354 __167: 9355 __170: 9356 if !(have == uint32(0)) { 9357 goto __173 9358 } 9359 have = (*struct { 9360 f func(*libc.TLS, uintptr, uintptr) uint32 9361 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9362 if !(have == uint32(0)) { 9363 goto __174 9364 } 9365 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9366 ret = -5 9367 goto inf_leave 9368 __174: 9369 ; 9370 __173: 9371 ; 9372 goto __171 9373 __171: 9374 if 0 != 0 { 9375 goto __170 9376 } 9377 goto __172 9378 __172: 9379 ; 9380 have-- 9381 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9382 bits = bits + uint32(8) 9383 goto __168 9384 __168: 9385 if 0 != 0 { 9386 goto __167 9387 } 9388 goto __169 9389 __169: 9390 ; 9391 goto __165 9392 __166: 9393 ; 9394 goto __163 9395 __163: 9396 if 0 != 0 { 9397 goto __162 9398 } 9399 goto __164 9400 __164: 9401 ; 9402 __175: 9403 hold >>= int32(here.Fbits) 9404 bits = bits - uint32(here.Fbits) 9405 goto __176 9406 __176: 9407 if 0 != 0 { 9408 goto __175 9409 } 9410 goto __177 9411 __177: 9412 ; 9413 len = uint32(0) 9414 copy = uint32(3) + uint32(hold)&(uint32(1)<<3-uint32(1)) 9415 __178: 9416 hold >>= 3 9417 bits = bits - uint32(3) 9418 goto __179 9419 __179: 9420 if 0 != 0 { 9421 goto __178 9422 } 9423 goto __180 9424 __180: 9425 ; 9426 goto __161 9427 __160: 9428 __181: 9429 __184: 9430 if !(bits < uint32(int32(here.Fbits)+7)) { 9431 goto __185 9432 } 9433 __186: 9434 __189: 9435 if !(have == uint32(0)) { 9436 goto __192 9437 } 9438 have = (*struct { 9439 f func(*libc.TLS, uintptr, uintptr) uint32 9440 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9441 if !(have == uint32(0)) { 9442 goto __193 9443 } 9444 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9445 ret = -5 9446 goto inf_leave 9447 __193: 9448 ; 9449 __192: 9450 ; 9451 goto __190 9452 __190: 9453 if 0 != 0 { 9454 goto __189 9455 } 9456 goto __191 9457 __191: 9458 ; 9459 have-- 9460 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9461 bits = bits + uint32(8) 9462 goto __187 9463 __187: 9464 if 0 != 0 { 9465 goto __186 9466 } 9467 goto __188 9468 __188: 9469 ; 9470 goto __184 9471 __185: 9472 ; 9473 goto __182 9474 __182: 9475 if 0 != 0 { 9476 goto __181 9477 } 9478 goto __183 9479 __183: 9480 ; 9481 __194: 9482 hold >>= int32(here.Fbits) 9483 bits = bits - uint32(here.Fbits) 9484 goto __195 9485 __195: 9486 if 0 != 0 { 9487 goto __194 9488 } 9489 goto __196 9490 __196: 9491 ; 9492 len = uint32(0) 9493 copy = uint32(11) + uint32(hold)&(uint32(1)<<7-uint32(1)) 9494 __197: 9495 hold >>= 7 9496 bits = bits - uint32(7) 9497 goto __198 9498 __198: 9499 if 0 != 0 { 9500 goto __197 9501 } 9502 goto __199 9503 __199: 9504 ; 9505 __161: 9506 ; 9507 __139: 9508 ; 9509 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave+copy > (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) { 9510 goto __200 9511 } 9512 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 9513 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9514 goto __120 9515 __200: 9516 ; 9517 __201: 9518 if !(libc.PostDecUint32(©, 1) != 0) { 9519 goto __202 9520 } 9521 *(*uint16)(unsafe.Pointer(state + 152 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 9522 goto __201 9523 __202: 9524 ; 9525 __134: 9526 ; 9527 goto __119 9528 __120: 9529 ; 9530 9531 // handle error breaks in while 9532 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 9533 goto __203 9534 } 9535 goto __5 9536 __203: 9537 ; 9538 9539 // check for end-of-block code (better have one) 9540 if !(int32(*(*uint16)(unsafe.Pointer(state + 152 + 256*2))) == 0) { 9541 goto __204 9542 } 9543 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 9544 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9545 goto __5 9546 __204: 9547 ; 9548 9549 // build code tables -- note: do not change the lenbits or distbits 9550 // values here (9 and 6) without reading the comments in inftrees.h 9551 // concerning the ENOUGH constants, which depend on those values 9552 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 9553 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 9554 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 9555 ret = Xinflate_table(tls, LENS, state+152, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, state+144, 9556 state+120, state+792) 9557 if !(ret != 0) { 9558 goto __205 9559 } 9560 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 9561 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9562 goto __5 9563 __205: 9564 ; 9565 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 9566 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 9567 ret = Xinflate_table(tls, DISTS, state+152+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Inflate_state)(unsafe.Pointer(state)).Fndist, 9568 state+144, state+124, state+792) 9569 if !(ret != 0) { 9570 goto __206 9571 } 9572 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 9573 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9574 goto __5 9575 __206: 9576 ; 9577 9578 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 9579 9580 __9: 9581 // use inflate_fast() if we have enough input and output 9582 if !(have >= uint32(6) && left >= uint32(258)) { 9583 goto __207 9584 } 9585 __208: 9586 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 9587 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 9588 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 9589 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 9590 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 9591 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 9592 goto __209 9593 __209: 9594 if 0 != 0 { 9595 goto __208 9596 } 9597 goto __210 9598 __210: 9599 ; 9600 if !((*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 9601 goto __211 9602 } 9603 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - left 9604 __211: 9605 ; 9606 Xinflate_fast(tls, strm, (*Inflate_state)(unsafe.Pointer(state)).Fwsize) 9607 __212: 9608 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 9609 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 9610 *(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 9611 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 9612 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 9613 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 9614 goto __213 9615 __213: 9616 if 0 != 0 { 9617 goto __212 9618 } 9619 goto __214 9620 __214: 9621 ; 9622 goto __5 9623 __207: 9624 ; 9625 9626 // get a literal, length, or end-of-block code 9627 __215: 9628 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4)) 9629 if !(uint32(here.Fbits) <= bits) { 9630 goto __218 9631 } 9632 goto __217 9633 __218: 9634 ; 9635 __219: 9636 __222: 9637 if !(have == uint32(0)) { 9638 goto __225 9639 } 9640 have = (*struct { 9641 f func(*libc.TLS, uintptr, uintptr) uint32 9642 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9643 if !(have == uint32(0)) { 9644 goto __226 9645 } 9646 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9647 ret = -5 9648 goto inf_leave 9649 __226: 9650 ; 9651 __225: 9652 ; 9653 goto __223 9654 __223: 9655 if 0 != 0 { 9656 goto __222 9657 } 9658 goto __224 9659 __224: 9660 ; 9661 have-- 9662 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9663 bits = bits + uint32(8) 9664 goto __220 9665 __220: 9666 if 0 != 0 { 9667 goto __219 9668 } 9669 goto __221 9670 __221: 9671 ; 9672 goto __216 9673 __216: 9674 goto __215 9675 goto __217 9676 __217: 9677 ; 9678 if !(here.Fop != 0 && int32(here.Fop)&0xf0 == 0) { 9679 goto __227 9680 } 9681 last = here 9682 __228: 9683 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)) 9684 if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) { 9685 goto __231 9686 } 9687 goto __230 9688 __231: 9689 ; 9690 __232: 9691 __235: 9692 if !(have == uint32(0)) { 9693 goto __238 9694 } 9695 have = (*struct { 9696 f func(*libc.TLS, uintptr, uintptr) uint32 9697 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9698 if !(have == uint32(0)) { 9699 goto __239 9700 } 9701 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9702 ret = -5 9703 goto inf_leave 9704 __239: 9705 ; 9706 __238: 9707 ; 9708 goto __236 9709 __236: 9710 if 0 != 0 { 9711 goto __235 9712 } 9713 goto __237 9714 __237: 9715 ; 9716 have-- 9717 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9718 bits = bits + uint32(8) 9719 goto __233 9720 __233: 9721 if 0 != 0 { 9722 goto __232 9723 } 9724 goto __234 9725 __234: 9726 ; 9727 goto __229 9728 __229: 9729 goto __228 9730 goto __230 9731 __230: 9732 ; 9733 __240: 9734 hold >>= int32(last.Fbits) 9735 bits = bits - uint32(last.Fbits) 9736 goto __241 9737 __241: 9738 if 0 != 0 { 9739 goto __240 9740 } 9741 goto __242 9742 __242: 9743 ; 9744 __227: 9745 ; 9746 __243: 9747 hold >>= int32(here.Fbits) 9748 bits = bits - uint32(here.Fbits) 9749 goto __244 9750 __244: 9751 if 0 != 0 { 9752 goto __243 9753 } 9754 goto __245 9755 __245: 9756 ; 9757 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 9758 9759 // process literal 9760 if !(int32(here.Fop) == 0) { 9761 goto __246 9762 } 9763 9764 __247: 9765 if !(left == uint32(0)) { 9766 goto __250 9767 } 9768 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 9769 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 9770 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 9771 if !((*struct { 9772 f func(*libc.TLS, uintptr, uintptr, uint32) int32 9773 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 9774 goto __251 9775 } 9776 ret = -5 9777 goto inf_leave 9778 __251: 9779 ; 9780 __250: 9781 ; 9782 goto __248 9783 __248: 9784 if 0 != 0 { 9785 goto __247 9786 } 9787 goto __249 9788 __249: 9789 ; 9790 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 9791 left-- 9792 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 9793 goto __5 9794 __246: 9795 ; 9796 9797 // process end of block 9798 if !(int32(here.Fop)&32 != 0) { 9799 goto __252 9800 } 9801 9802 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 9803 goto __5 9804 __252: 9805 ; 9806 9807 // invalid code 9808 if !(int32(here.Fop)&64 != 0) { 9809 goto __253 9810 } 9811 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 9812 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 9813 goto __5 9814 __253: 9815 ; 9816 9817 // length code -- get extra bits, if any 9818 (*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) 9819 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 9820 goto __254 9821 } 9822 __255: 9823 __258: 9824 if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) { 9825 goto __259 9826 } 9827 __260: 9828 __263: 9829 if !(have == uint32(0)) { 9830 goto __266 9831 } 9832 have = (*struct { 9833 f func(*libc.TLS, uintptr, uintptr) uint32 9834 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9835 if !(have == uint32(0)) { 9836 goto __267 9837 } 9838 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9839 ret = -5 9840 goto inf_leave 9841 __267: 9842 ; 9843 __266: 9844 ; 9845 goto __264 9846 __264: 9847 if 0 != 0 { 9848 goto __263 9849 } 9850 goto __265 9851 __265: 9852 ; 9853 have-- 9854 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9855 bits = bits + uint32(8) 9856 goto __261 9857 __261: 9858 if 0 != 0 { 9859 goto __260 9860 } 9861 goto __262 9862 __262: 9863 ; 9864 goto __258 9865 __259: 9866 ; 9867 goto __256 9868 __256: 9869 if 0 != 0 { 9870 goto __255 9871 } 9872 goto __257 9873 __257: 9874 ; 9875 *(*uint32)(unsafe.Pointer(state + 92)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) 9876 __268: 9877 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 9878 bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra 9879 goto __269 9880 __269: 9881 if 0 != 0 { 9882 goto __268 9883 } 9884 goto __270 9885 __270: 9886 ; 9887 __254: 9888 ; 9889 9890 // get distance code 9891 __271: 9892 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits-uint32(1)))*4)) 9893 if !(uint32(here.Fbits) <= bits) { 9894 goto __274 9895 } 9896 goto __273 9897 __274: 9898 ; 9899 __275: 9900 __278: 9901 if !(have == uint32(0)) { 9902 goto __281 9903 } 9904 have = (*struct { 9905 f func(*libc.TLS, uintptr, uintptr) uint32 9906 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9907 if !(have == uint32(0)) { 9908 goto __282 9909 } 9910 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9911 ret = -5 9912 goto inf_leave 9913 __282: 9914 ; 9915 __281: 9916 ; 9917 goto __279 9918 __279: 9919 if 0 != 0 { 9920 goto __278 9921 } 9922 goto __280 9923 __280: 9924 ; 9925 have-- 9926 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9927 bits = bits + uint32(8) 9928 goto __276 9929 __276: 9930 if 0 != 0 { 9931 goto __275 9932 } 9933 goto __277 9934 __277: 9935 ; 9936 goto __272 9937 __272: 9938 goto __271 9939 goto __273 9940 __273: 9941 ; 9942 if !(int32(here.Fop)&0xf0 == 0) { 9943 goto __283 9944 } 9945 last = here 9946 __284: 9947 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)) 9948 if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) { 9949 goto __287 9950 } 9951 goto __286 9952 __287: 9953 ; 9954 __288: 9955 __291: 9956 if !(have == uint32(0)) { 9957 goto __294 9958 } 9959 have = (*struct { 9960 f func(*libc.TLS, uintptr, uintptr) uint32 9961 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 9962 if !(have == uint32(0)) { 9963 goto __295 9964 } 9965 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 9966 ret = -5 9967 goto inf_leave 9968 __295: 9969 ; 9970 __294: 9971 ; 9972 goto __292 9973 __292: 9974 if 0 != 0 { 9975 goto __291 9976 } 9977 goto __293 9978 __293: 9979 ; 9980 have-- 9981 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 9982 bits = bits + uint32(8) 9983 goto __289 9984 __289: 9985 if 0 != 0 { 9986 goto __288 9987 } 9988 goto __290 9989 __290: 9990 ; 9991 goto __285 9992 __285: 9993 goto __284 9994 goto __286 9995 __286: 9996 ; 9997 __296: 9998 hold >>= int32(last.Fbits) 9999 bits = bits - uint32(last.Fbits) 10000 goto __297 10001 __297: 10002 if 0 != 0 { 10003 goto __296 10004 } 10005 goto __298 10006 __298: 10007 ; 10008 __283: 10009 ; 10010 __299: 10011 hold >>= int32(here.Fbits) 10012 bits = bits - uint32(here.Fbits) 10013 goto __300 10014 __300: 10015 if 0 != 0 { 10016 goto __299 10017 } 10018 goto __301 10019 __301: 10020 ; 10021 if !(int32(here.Fop)&64 != 0) { 10022 goto __302 10023 } 10024 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 10025 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10026 goto __5 10027 __302: 10028 ; 10029 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 10030 10031 // get distance extra bits, if any 10032 (*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) 10033 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) { 10034 goto __303 10035 } 10036 __304: 10037 __307: 10038 if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) { 10039 goto __308 10040 } 10041 __309: 10042 __312: 10043 if !(have == uint32(0)) { 10044 goto __315 10045 } 10046 have = (*struct { 10047 f func(*libc.TLS, uintptr, uintptr) uint32 10048 })(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */) 10049 if !(have == uint32(0)) { 10050 goto __316 10051 } 10052 *(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL) 10053 ret = -5 10054 goto inf_leave 10055 __316: 10056 ; 10057 __315: 10058 ; 10059 goto __313 10060 __313: 10061 if 0 != 0 { 10062 goto __312 10063 } 10064 goto __314 10065 __314: 10066 ; 10067 have-- 10068 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits 10069 bits = bits + uint32(8) 10070 goto __310 10071 __310: 10072 if 0 != 0 { 10073 goto __309 10074 } 10075 goto __311 10076 __311: 10077 ; 10078 goto __307 10079 __308: 10080 ; 10081 goto __305 10082 __305: 10083 if 0 != 0 { 10084 goto __304 10085 } 10086 goto __306 10087 __306: 10088 ; 10089 *(*uint32)(unsafe.Pointer(state + 96)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) 10090 __317: 10091 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 10092 bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra 10093 goto __318 10094 __318: 10095 if 0 != 0 { 10096 goto __317 10097 } 10098 goto __319 10099 __319: 10100 ; 10101 __303: 10102 ; 10103 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > (*Inflate_state)(unsafe.Pointer(state)).Fwsize-func() uint32 { 10104 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 10105 return left 10106 } 10107 return uint32(0) 10108 }()) { 10109 goto __320 10110 } 10111 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 10112 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10113 goto __5 10114 __320: 10115 ; 10116 10117 // copy match from window to output 10118 __321: 10119 __324: 10120 if !(left == uint32(0)) { 10121 goto __327 10122 } 10123 put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 10124 left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 10125 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = left 10126 if !((*struct { 10127 f func(*libc.TLS, uintptr, uintptr, uint32) int32 10128 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) { 10129 goto __328 10130 } 10131 ret = -5 10132 goto inf_leave 10133 __328: 10134 ; 10135 __327: 10136 ; 10137 goto __325 10138 __325: 10139 if 0 != 0 { 10140 goto __324 10141 } 10142 goto __326 10143 __326: 10144 ; 10145 copy = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Foffset 10146 if !(copy < left) { 10147 goto __329 10148 } 10149 from = put + uintptr(copy) 10150 copy = left - copy 10151 goto __330 10152 __329: 10153 from = put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset) 10154 copy = left 10155 __330: 10156 ; 10157 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 10158 goto __331 10159 } 10160 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 10161 __331: 10162 ; 10163 *(*uint32)(unsafe.Pointer(state + 92)) -= copy 10164 left = left - copy 10165 __332: 10166 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10167 goto __333 10168 __333: 10169 if libc.PreDecUint32(©, 1) != 0 { 10170 goto __332 10171 } 10172 goto __334 10173 __334: 10174 ; 10175 goto __322 10176 __322: 10177 if (*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0) { 10178 goto __321 10179 } 10180 goto __323 10181 __323: 10182 ; 10183 goto __5 10184 10185 __10: 10186 // inflate stream terminated properly -- write leftover output 10187 ret = Z_STREAM_END 10188 if !(left < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) { 10189 goto __335 10190 } 10191 if !((*struct { 10192 f func(*libc.TLS, uintptr, uintptr, uint32) int32 10193 })(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (*Inflate_state)(unsafe.Pointer(state)).Fwsize-left) != 0) { 10194 goto __336 10195 } 10196 ret = -5 10197 __336: 10198 ; 10199 __335: 10200 ; 10201 goto inf_leave 10202 10203 __11: 10204 ret = -3 10205 goto inf_leave 10206 10207 __12: // can't happen, but makes compilers happy 10208 ret = -2 10209 goto inf_leave 10210 __5: 10211 ; 10212 goto __3 10213 __3: 10214 goto __2 10215 goto __4 10216 __4: 10217 ; 10218 10219 // Return unused input 10220 inf_leave: 10221 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */)) 10222 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 10223 return ret 10224 } 10225 10226 var order = // permutation of code lengths 10227 [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 */ 10228 10229 func XinflateBackEnd(tls *libc.TLS, strm Z_streamp) int32 { /* infback.c:631:13: */ 10230 if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 10231 return -2 10232 } 10233 (*struct { 10234 f func(*libc.TLS, Voidpf, Voidpf) 10235 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 10236 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 10237 10238 return Z_OK 10239 } 10240 10241 // Decode literal, length, and distance codes and write out the resulting 10242 // literal and match bytes until either not enough input or output is 10243 // available, an end-of-block is encountered, or a data error is encountered. 10244 // When large enough input and output buffers are supplied to inflate(), for 10245 // example, a 16K input buffer and a 64K output buffer, more than 95% of the 10246 // inflate execution time is spent in this routine. 10247 // 10248 // Entry assumptions: 10249 // 10250 // state->mode == LEN 10251 // strm->avail_in >= 6 10252 // strm->avail_out >= 258 10253 // start >= strm->avail_out 10254 // state->bits < 8 10255 // 10256 // On return, state->mode is one of: 10257 // 10258 // LEN -- ran out of enough output space or enough available input 10259 // TYPE -- reached end of block code, inflate() to interpret next block 10260 // BAD -- error in block data 10261 // 10262 // Notes: 10263 // 10264 // - The maximum input bits used by a length/distance pair is 15 bits for the 10265 // length code, 5 bits for the length extra, 15 bits for the distance code, 10266 // and 13 bits for the distance extra. This totals 48 bits, or six bytes. 10267 // Therefore if strm->avail_in >= 6, then there is enough input to avoid 10268 // checking for available input while decoding. 10269 // 10270 // - The maximum bytes that a single length/distance pair can output is 258 10271 // bytes, which is the maximum length that can be coded. inflate_fast() 10272 // requires strm->avail_out >= 258 for each loop to avoid checking for 10273 // output space. 10274 func Xinflate_fast(tls *libc.TLS, strm Z_streamp, start uint32) { /* inffast.c:50:20: */ 10275 var state uintptr 10276 var in uintptr // local strm->next_in 10277 var last uintptr // have enough input while in < last 10278 var out uintptr // local strm->next_out 10279 var beg uintptr // inflate()'s initial strm->next_out 10280 var end uintptr // while out < end, enough space available 10281 var wsize uint32 // window size or zero if not using window 10282 var whave uint32 // valid bytes in the window 10283 var wnext uint32 // window write index 10284 var window uintptr // allocated sliding window, if wsize != 0 10285 var hold uint64 // local strm->hold 10286 var bits uint32 // local strm->bits 10287 var lcode uintptr // local strm->lencode 10288 var dcode uintptr // local strm->distcode 10289 var lmask uint32 // mask for first level of length codes 10290 var dmask uint32 // mask for first level of distance codes 10291 var here Code // retrieved table entry 10292 var op uint32 // code bits, operation, extra bits, or 10293 // window position, window bytes to copy 10294 var len uint32 // match length, unused bytes 10295 var dist uint32 // match distance 10296 var from uintptr // where to copy match from 10297 10298 // copy state to local variables 10299 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 10300 in = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 10301 last = in + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in-UInt(5)) 10302 out = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 10303 beg = out - uintptr(start-(*Z_stream)(unsafe.Pointer(strm)).Favail_out) 10304 end = out + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_out-UInt(257)) 10305 wsize = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 10306 whave = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 10307 wnext = (*Inflate_state)(unsafe.Pointer(state)).Fwnext 10308 window = (*Inflate_state)(unsafe.Pointer(state)).Fwindow 10309 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 10310 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 10311 lcode = (*Inflate_state)(unsafe.Pointer(state)).Flencode 10312 dcode = (*Inflate_state)(unsafe.Pointer(state)).Fdistcode 10313 lmask = uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits - uint32(1) 10314 dmask = uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits - uint32(1) 10315 10316 // decode literals and length/distances until end-of-block or not enough 10317 // input data or output space 10318 __1: 10319 if !(bits < uint32(15)) { 10320 goto __4 10321 } 10322 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 10323 bits = bits + uint32(8) 10324 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 10325 bits = bits + uint32(8) 10326 __4: 10327 ; 10328 here = *(*Code)(unsafe.Pointer(lcode + uintptr(hold&uint64(lmask))*4)) 10329 dolen: 10330 op = uint32(here.Fbits) 10331 hold >>= op 10332 bits = bits - op 10333 op = uint32(here.Fop) 10334 if !(op == uint32(0)) { 10335 goto __5 10336 } // literal 10337 10338 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = uint8(here.Fval) 10339 goto __6 10340 __5: 10341 if !(op&uint32(16) != 0) { 10342 goto __7 10343 } // length base 10344 len = uint32(here.Fval) 10345 op = op & uint32(15) // number of extra bits 10346 if !(op != 0) { 10347 goto __9 10348 } 10349 if !(bits < op) { 10350 goto __10 10351 } 10352 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 10353 bits = bits + uint32(8) 10354 __10: 10355 ; 10356 len = len + uint32(hold)&(uint32(1)<<op-uint32(1)) 10357 hold >>= op 10358 bits = bits - op 10359 __9: 10360 ; 10361 10362 if !(bits < uint32(15)) { 10363 goto __11 10364 } 10365 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 10366 bits = bits + uint32(8) 10367 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 10368 bits = bits + uint32(8) 10369 __11: 10370 ; 10371 here = *(*Code)(unsafe.Pointer(dcode + uintptr(hold&uint64(dmask))*4)) 10372 dodist: 10373 op = uint32(here.Fbits) 10374 hold >>= op 10375 bits = bits - op 10376 op = uint32(here.Fop) 10377 if !(op&uint32(16) != 0) { 10378 goto __12 10379 } // distance base 10380 dist = uint32(here.Fval) 10381 op = op & uint32(15) // number of extra bits 10382 if !(bits < op) { 10383 goto __14 10384 } 10385 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 10386 bits = bits + uint32(8) 10387 if !(bits < op) { 10388 goto __15 10389 } 10390 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits 10391 bits = bits + uint32(8) 10392 __15: 10393 ; 10394 __14: 10395 ; 10396 dist = dist + uint32(hold)&(uint32(1)<<op-uint32(1)) 10397 hold >>= op 10398 bits = bits - op 10399 10400 op = uint32((int64(out) - int64(beg)) / 1) // max distance in output 10401 if !(dist > op) { 10402 goto __16 10403 } // see if copy from window 10404 op = dist - op // distance back in window 10405 if !(op > whave) { 10406 goto __18 10407 } 10408 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 10409 goto __19 10410 } 10411 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 10412 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10413 goto __3 10414 __19: 10415 ; 10416 __18: 10417 ; 10418 from = window 10419 if !(wnext == uint32(0)) { 10420 goto __20 10421 } // very common case 10422 from += uintptr(wsize - op) 10423 if !(op < len) { 10424 goto __22 10425 } // some from window 10426 len = len - op 10427 __23: 10428 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10429 goto __24 10430 __24: 10431 if libc.PreDecUint32(&op, 1) != 0 { 10432 goto __23 10433 } 10434 goto __25 10435 __25: 10436 ; 10437 from = out - uintptr(dist) // rest from output 10438 __22: 10439 ; 10440 goto __21 10441 __20: 10442 if !(wnext < op) { 10443 goto __26 10444 } // wrap around window 10445 from += uintptr(wsize + wnext - op) 10446 op = op - wnext 10447 if !(op < len) { 10448 goto __28 10449 } // some from end of window 10450 len = len - op 10451 __29: 10452 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10453 goto __30 10454 __30: 10455 if libc.PreDecUint32(&op, 1) != 0 { 10456 goto __29 10457 } 10458 goto __31 10459 __31: 10460 ; 10461 from = window 10462 if !(wnext < len) { 10463 goto __32 10464 } // some from start of window 10465 op = wnext 10466 len = len - op 10467 __33: 10468 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10469 goto __34 10470 __34: 10471 if libc.PreDecUint32(&op, 1) != 0 { 10472 goto __33 10473 } 10474 goto __35 10475 __35: 10476 ; 10477 from = out - uintptr(dist) // rest from output 10478 __32: 10479 ; 10480 __28: 10481 ; 10482 goto __27 10483 __26: // contiguous in window 10484 from += uintptr(wnext - op) 10485 if !(op < len) { 10486 goto __36 10487 } // some from window 10488 len = len - op 10489 __37: 10490 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10491 goto __38 10492 __38: 10493 if libc.PreDecUint32(&op, 1) != 0 { 10494 goto __37 10495 } 10496 goto __39 10497 __39: 10498 ; 10499 from = out - uintptr(dist) // rest from output 10500 __36: 10501 ; 10502 __27: 10503 ; 10504 __21: 10505 ; 10506 __40: 10507 if !(len > uint32(2)) { 10508 goto __41 10509 } 10510 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10511 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10512 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10513 len = len - uint32(3) 10514 goto __40 10515 __41: 10516 ; 10517 if !(len != 0) { 10518 goto __42 10519 } 10520 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10521 if !(len > uint32(1)) { 10522 goto __43 10523 } 10524 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10525 __43: 10526 ; 10527 __42: 10528 ; 10529 goto __17 10530 __16: 10531 from = out - uintptr(dist) // copy direct from output 10532 __44: // minimum length is three 10533 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10534 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10535 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10536 len = len - uint32(3) 10537 goto __45 10538 __45: 10539 if len > uint32(2) { 10540 goto __44 10541 } 10542 goto __46 10543 __46: 10544 ; 10545 if !(len != 0) { 10546 goto __47 10547 } 10548 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10549 if !(len > uint32(1)) { 10550 goto __48 10551 } 10552 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 10553 __48: 10554 ; 10555 __47: 10556 ; 10557 __17: 10558 ; 10559 goto __13 10560 __12: 10561 if !(op&uint32(64) == uint32(0)) { 10562 goto __49 10563 } // 2nd level distance code 10564 here = *(*Code)(unsafe.Pointer(dcode + uintptr(uint64(here.Fval)+hold&uint64(uint32(1)<<op-uint32(1)))*4)) 10565 goto dodist 10566 goto __50 10567 __49: 10568 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 10569 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10570 goto __3 10571 __50: 10572 ; 10573 __13: 10574 ; 10575 goto __8 10576 __7: 10577 if !(op&uint32(64) == uint32(0)) { 10578 goto __51 10579 } // 2nd level length code 10580 here = *(*Code)(unsafe.Pointer(lcode + uintptr(uint64(here.Fval)+hold&uint64(uint32(1)<<op-uint32(1)))*4)) 10581 goto dolen 10582 goto __52 10583 __51: 10584 if !(op&uint32(32) != 0) { 10585 goto __53 10586 } // end-of-block 10587 10588 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 10589 goto __3 10590 goto __54 10591 __53: 10592 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 10593 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 10594 goto __3 10595 __54: 10596 ; 10597 __52: 10598 ; 10599 __8: 10600 ; 10601 __6: 10602 ; 10603 goto __2 10604 __2: 10605 if in < last && out < end { 10606 goto __1 10607 } 10608 goto __3 10609 __3: 10610 ; 10611 10612 // return unused bytes (on entry, bits < 8, so in won't go too far back) 10613 len = bits >> 3 10614 in -= uintptr(len) 10615 bits = bits - len<<3 10616 hold = hold & uint64(uint32(1)<<bits-uint32(1)) 10617 10618 // update state and return 10619 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = in 10620 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = out 10621 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = func() uint32 { 10622 if in < last { 10623 return uint32(int64(5) + (int64(last)-int64(in))/1) 10624 } 10625 return uint32(int64(5) - (int64(in)-int64(last))/1) 10626 }() 10627 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = func() uint32 { 10628 if out < end { 10629 return uint32(int64(257) + (int64(end)-int64(out))/1) 10630 } 10631 return uint32(int64(257) - (int64(out)-int64(end))/1) 10632 }() 10633 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 10634 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 10635 return 10636 } 10637 10638 // 10639 // inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): 10640 // - Using bit fields for code structure 10641 // - Different op definition to avoid & for extra bits (do & for table bits) 10642 // - Three separate decoding do-loops for direct, window, and wnext == 0 10643 // - Special case for distance > 1 copies to do overlapped load and store copy 10644 // - Explicit branch predictions (based on measured branch probabilities) 10645 // - Deferring match copy and interspersed it with decoding subsequent codes 10646 // - Swapping literal/length else 10647 // - Swapping window/direct else 10648 // - Larger unrolled copy loops (three is about right) 10649 // - Moving len -= 3 statement into middle of loop 10650 // 10651 10652 func inflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:105:11: */ 10653 var state uintptr 10654 if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 10655 return 1 10656 } 10657 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 10658 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 { 10659 return 1 10660 } 10661 return 0 10662 } 10663 10664 func XinflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:119:13: */ 10665 var state uintptr 10666 10667 if inflateStateCheck(tls, strm) != 0 { 10668 return -2 10669 } 10670 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 10671 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint64(strm+40, libc.AssignPtrUint64(state+40, uint64(0))) 10672 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) 10673 if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 { // to support ill-conceived Java test suite 10674 (*Z_stream)(unsafe.Pointer(strm)).Fadler = ULong((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1) 10675 } 10676 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD 10677 (*Inflate_state)(unsafe.Pointer(state)).Flast = 0 10678 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 0 10679 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768 10680 (*Inflate_state)(unsafe.Pointer(state)).Fhead = Gz_headerp(Z_NULL) 10681 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint64(0) 10682 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 10683 (*Inflate_state)(unsafe.Pointer(state)).Flencode = libc.AssignPtrUintptr(state+112, libc.AssignPtrUintptr(state+144, state+1368 /* &.codes */)) 10684 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 10685 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 10686 10687 return Z_OK 10688 } 10689 10690 func XinflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:144:13: */ 10691 var state uintptr 10692 10693 if inflateStateCheck(tls, strm) != 0 { 10694 return -2 10695 } 10696 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 10697 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0) 10698 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 10699 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 10700 return XinflateResetKeep(tls, strm) 10701 } 10702 10703 func XinflateReset2(tls *libc.TLS, strm Z_streamp, windowBits int32) int32 { /* inflate.c:157:13: */ 10704 var wrap int32 10705 var state uintptr 10706 10707 // get the state 10708 if inflateStateCheck(tls, strm) != 0 { 10709 return -2 10710 } 10711 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 10712 10713 // extract wrap request from windowBits parameter 10714 if windowBits < 0 { 10715 wrap = 0 10716 windowBits = -windowBits 10717 } else { 10718 wrap = windowBits>>4 + 5 10719 if windowBits < 48 { 10720 windowBits = windowBits & 15 10721 } 10722 } 10723 10724 // set number of window bits, free window if different 10725 if windowBits != 0 && (windowBits < 8 || windowBits > 15) { 10726 return -2 10727 } 10728 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) && (*Inflate_state)(unsafe.Pointer(state)).Fwbits != uint32(windowBits) { 10729 (*struct { 10730 f func(*libc.TLS, Voidpf, Voidpf) 10731 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 10732 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 10733 } 10734 10735 // update state and reset the rest of it 10736 (*Inflate_state)(unsafe.Pointer(state)).Fwrap = wrap 10737 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(windowBits) 10738 return XinflateReset(tls, strm) 10739 } 10740 10741 func XinflateInit2_(tls *libc.TLS, strm Z_streamp, windowBits int32, version uintptr, stream_size int32) int32 { /* inflate.c:195:13: */ 10742 var ret int32 10743 var state uintptr 10744 10745 if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts))) || stream_size != int32(unsafe.Sizeof(Z_stream{})) { 10746 return -6 10747 } 10748 if strm == uintptr(Z_NULL) { 10749 return -2 10750 } 10751 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error 10752 if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) { 10753 (*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct { 10754 f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf 10755 }{Xzcalloc})) 10756 (*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0) 10757 } 10758 if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) { 10759 (*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct { 10760 f func(*libc.TLS, Voidpf, Voidpf) 10761 }{Xzcfree})) 10762 } 10763 state = (*struct { 10764 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 10765 })(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{}))) 10766 if state == uintptr(Z_NULL) { 10767 return -4 10768 } 10769 10770 (*Z_stream)(unsafe.Pointer(strm)).Fstate = state 10771 (*Inflate_state)(unsafe.Pointer(state)).Fstrm = strm 10772 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL) 10773 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD // to pass state test in inflateReset2() 10774 ret = XinflateReset2(tls, strm, windowBits) 10775 if ret != Z_OK { 10776 (*struct { 10777 f func(*libc.TLS, Voidpf, Voidpf) 10778 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, state) 10779 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 10780 } 10781 return ret 10782 } 10783 10784 func XinflateInit_(tls *libc.TLS, strm Z_streamp, version uintptr, stream_size int32) int32 { /* inflate.c:239:13: */ 10785 return XinflateInit2_(tls, strm, MAX_WBITS, version, stream_size) 10786 } 10787 10788 func XinflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* inflate.c:247:13: */ 10789 var state uintptr 10790 10791 if inflateStateCheck(tls, strm) != 0 { 10792 return -2 10793 } 10794 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 10795 if bits < 0 { 10796 (*Inflate_state)(unsafe.Pointer(state)).Fhold = uint64(0) 10797 (*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) 10798 return Z_OK 10799 } 10800 if bits > 16 || (*Inflate_state)(unsafe.Pointer(state)).Fbits+UInt(bits) > uint32(32) { 10801 return -2 10802 } 10803 value = int32(int64(value) & (int64(1)<<bits - int64(1))) 10804 *(*uint64)(unsafe.Pointer(state + 80)) += uint64(uint32(value) << (*Inflate_state)(unsafe.Pointer(state)).Fbits) 10805 *(*uint32)(unsafe.Pointer(state + 88)) += UInt(bits) 10806 return Z_OK 10807 } 10808 10809 // Return state with length and distance decoding tables and index sizes set to 10810 // fixed code decoding. Normally this returns fixed tables from inffixed.h. 10811 // If BUILDFIXED is defined, then instead this routine builds the tables the 10812 // first time it's called, and returns those tables the first time and 10813 // thereafter. This reduces the size of the code by about 2K bytes, in 10814 // exchange for a little execution time. However, BUILDFIXED should not be 10815 // used for threaded applications, since the rewriting of the tables and virgin 10816 // may not be thread-safe. 10817 func fixedtables1(tls *libc.TLS, state uintptr) { /* inflate.c:278:12: */ 10818 (*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix1)) 10819 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 10820 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix1)) 10821 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) 10822 } 10823 10824 var lenfix1 = [512]Code{ 10825 {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)}, 10826 {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)}, 10827 {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)}, 10828 {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)}, 10829 {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)}, 10830 {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)}, 10831 {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)}, 10832 {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)}, 10833 {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)}, 10834 {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)}, 10835 {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)}, 10836 {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)}, 10837 {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)}, 10838 {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)}, 10839 {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)}, 10840 {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)}, 10841 {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)}, 10842 {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)}, 10843 {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)}, 10844 {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)}, 10845 {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)}, 10846 {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)}, 10847 {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)}, 10848 {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)}, 10849 {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)}, 10850 {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)}, 10851 {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)}, 10852 {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)}, 10853 {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)}, 10854 {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)}, 10855 {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)}, 10856 {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)}, 10857 {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)}, 10858 {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)}, 10859 {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)}, 10860 {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)}, 10861 {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)}, 10862 {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)}, 10863 {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)}, 10864 {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)}, 10865 {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)}, 10866 {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)}, 10867 {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)}, 10868 {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)}, 10869 {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)}, 10870 {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)}, 10871 {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)}, 10872 {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)}, 10873 {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)}, 10874 {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)}, 10875 {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)}, 10876 {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)}, 10877 {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)}, 10878 {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)}, 10879 {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)}, 10880 {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)}, 10881 {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)}, 10882 {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)}, 10883 {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)}, 10884 {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)}, 10885 {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)}, 10886 {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)}, 10887 {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)}, 10888 {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)}, 10889 {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)}, 10890 {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)}, 10891 {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)}, 10892 {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)}, 10893 {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)}, 10894 {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)}, 10895 {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)}, 10896 {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)}, 10897 {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)}, 10898 {Fbits: uint8(9), Fval: uint16(255)}, 10899 } /* inffixed.h:10:23 */ 10900 var distfix1 = [32]Code{ 10901 {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)}, 10902 {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)}, 10903 {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)}, 10904 {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)}, 10905 {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)}, 10906 {Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)}, 10907 } /* inffixed.h:87:23 */ 10908 10909 // Update the window with the last wsize (normally 32K) bytes written before 10910 // returning. If window does not exist yet, create it. This is only called 10911 // when a window is already in use, or when output has been written during this 10912 // inflate call, but the end of the deflate stream has not been reached yet. 10913 // It is also called to create a window for dictionary data when a dictionary 10914 // is loaded. 10915 // 10916 // Providing output buffers larger than 32K to inflate() should provide a speed 10917 // advantage, since only the last 32K of output is copied to the sliding window 10918 // upon return from inflate(), and since all distances after the first 32K of 10919 // output will fall in the output data, making match copies simpler and faster. 10920 // The advantage may be dependent on the size of the processor's data caches. 10921 func updatewindow(tls *libc.TLS, strm Z_streamp, end uintptr, copy uint32) int32 { /* inflate.c:396:11: */ 10922 var state uintptr 10923 var dist uint32 10924 10925 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 10926 10927 // if it hasn't been done already, allocate space for the window 10928 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 10929 (*Inflate_state)(unsafe.Pointer(state)).Fwindow = (*struct { 10930 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 10931 })(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)))) 10932 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) { 10933 return 1 10934 } 10935 } 10936 10937 // if window not in use yet, initialize 10938 if (*Inflate_state)(unsafe.Pointer(state)).Fwsize == uint32(0) { 10939 (*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits 10940 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 10941 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) 10942 } 10943 10944 // copy state->wsize or less output bytes into the circular window 10945 if copy >= (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 10946 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize), uint64((*Inflate_state)(unsafe.Pointer(state)).Fwsize)) 10947 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 10948 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 10949 } else { 10950 dist = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Fwnext 10951 if dist > copy { 10952 dist = copy 10953 } 10954 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext), end-uintptr(copy), uint64(dist)) 10955 copy = copy - dist 10956 if copy != 0 { 10957 libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr(copy), uint64(copy)) 10958 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = copy 10959 (*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize 10960 } else { 10961 *(*uint32)(unsafe.Pointer(state + 68)) += dist 10962 if (*Inflate_state)(unsafe.Pointer(state)).Fwnext == (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 10963 (*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) 10964 } 10965 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize { 10966 *(*uint32)(unsafe.Pointer(state + 64)) += dist 10967 } 10968 } 10969 } 10970 return 0 10971 } 10972 10973 // Macros for inflate(): 10974 10975 // check function to use adler32() for zlib or crc32() for gzip 10976 10977 // check macros for header crc 10978 10979 // Load registers with state in inflate() for speed 10980 10981 // Restore state from registers in inflate() 10982 10983 // Clear the input bit accumulator 10984 10985 // Get a byte of input into the bit accumulator, or return from inflate() 10986 // if there is no input available. 10987 10988 // Assure that there are at least n bits in the bit accumulator. If there is 10989 // not enough available input to do that, then return from inflate(). 10990 10991 // Return the low n bits of the bit accumulator (n < 16) 10992 10993 // Remove n bits from the bit accumulator 10994 10995 // Remove zero to seven bits as needed to go to a byte boundary 10996 10997 // 10998 // inflate() uses a state machine to process as much input data and generate as 10999 // much output data as possible before returning. The state machine is 11000 // structured roughly as follows: 11001 // 11002 // for (;;) switch (state) { 11003 // ... 11004 // case STATEn: 11005 // if (not enough input data or output space to make progress) 11006 // return; 11007 // ... make progress ... 11008 // state = STATEm; 11009 // break; 11010 // ... 11011 // } 11012 // 11013 // so when inflate() is called again, the same case is attempted again, and 11014 // if the appropriate resources are provided, the machine proceeds to the 11015 // next state. The NEEDBITS() macro is usually the way the state evaluates 11016 // whether it can proceed or should return. NEEDBITS() does the return if 11017 // the requested bits are not available. The typical use of the BITS macros 11018 // is: 11019 // 11020 // NEEDBITS(n); 11021 // ... do something with BITS(n) ... 11022 // DROPBITS(n); 11023 // 11024 // where NEEDBITS(n) either returns from inflate() if there isn't enough 11025 // input left to load n bits into the accumulator, or it continues. BITS(n) 11026 // gives the low n bits in the accumulator. When done, DROPBITS(n) drops 11027 // the low n bits off the accumulator. INITBITS() clears the accumulator 11028 // and sets the number of available bits to zero. BYTEBITS() discards just 11029 // enough bits to put the accumulator on a byte boundary. After BYTEBITS() 11030 // and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. 11031 // 11032 // NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return 11033 // if there is no input available. The decoding of variable length codes uses 11034 // PULLBYTE() directly in order to pull just enough bytes to decode the next 11035 // code, and no more. 11036 // 11037 // Some states loop until they get enough input, making sure that enough 11038 // state information is maintained to continue the loop where it left off 11039 // if NEEDBITS() returns in the loop. For example, want, need, and keep 11040 // would all have to actually be part of the saved state in case NEEDBITS() 11041 // returns: 11042 // 11043 // case STATEw: 11044 // while (want < need) { 11045 // NEEDBITS(n); 11046 // keep[want++] = BITS(n); 11047 // DROPBITS(n); 11048 // } 11049 // state = STATEx; 11050 // case STATEx: 11051 // 11052 // As shown above, if the next state is also the next case, then the break 11053 // is omitted. 11054 // 11055 // A state may also return if there is not enough output space available to 11056 // complete that state. Those states are copying stored data, writing a 11057 // literal byte, and copying a matching string. 11058 // 11059 // When returning, a "goto inf_leave" is used to update the total counters, 11060 // update the check value, and determine whether any progress has been made 11061 // during that inflate() call in order to return the proper return code. 11062 // Progress is defined as a change in either strm->avail_in or strm->avail_out. 11063 // When there is a window, goto inf_leave will update the window with the last 11064 // output written. If a goto inf_leave occurs in the middle of decompression 11065 // and there is no window currently, goto inf_leave will create one and copy 11066 // output to the window for the next call of inflate(). 11067 // 11068 // In this implementation, the flush parameter of inflate() only affects the 11069 // return code (per zlib.h). inflate() always writes as much as possible to 11070 // strm->next_out, given the space available and the provided input--the effect 11071 // documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers 11072 // the allocation of and copying into a sliding window until necessary, which 11073 // provides the effect documented in zlib.h for Z_FINISH when the entire input 11074 // stream available. So the only thing the flush parameter actually does is: 11075 // when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it 11076 // will return Z_BUF_ERROR if it has not reached the end of the stream. 11077 // 11078 11079 func Xinflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* inflate.c:622:13: */ 11080 bp := tls.Alloc(4) 11081 defer tls.Free(4) 11082 11083 var state uintptr 11084 var next uintptr // next input 11085 var put uintptr // next output 11086 var have uint32 11087 var left uint32 // available input and output 11088 var hold uint64 // bit buffer 11089 var bits uint32 // bits in bit buffer 11090 var in uint32 11091 var out uint32 // save starting available input and output 11092 var copy uint32 // number of stored or match bytes to copy 11093 var from uintptr // where to copy match bytes from 11094 var here Code // current decoding table entry 11095 var last Code // parent table entry 11096 var len uint32 // length to copy for repeats, bits to drop 11097 var ret int32 // return code 11098 // var hbuf [4]uint8 at bp, 4 11099 11100 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)) { 11101 goto __1 11102 } 11103 return -2 11104 __1: 11105 ; 11106 11107 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 11108 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 11109 goto __2 11110 } 11111 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 11112 __2: 11113 ; // skip check 11114 __3: 11115 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 11116 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 11117 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 11118 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 11119 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 11120 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 11121 goto __4 11122 __4: 11123 if 0 != 0 { 11124 goto __3 11125 } 11126 goto __5 11127 __5: 11128 ; 11129 in = have 11130 out = left 11131 ret = Z_OK 11132 __6: 11133 switch (*Inflate_state)(unsafe.Pointer(state)).Fmode { 11134 case HEAD: 11135 goto __10 11136 case FLAGS: 11137 goto __11 11138 case TIME: 11139 goto __12 11140 case OS: 11141 goto __13 11142 case EXLEN: 11143 goto __14 11144 case EXTRA: 11145 goto __15 11146 case NAME: 11147 goto __16 11148 case COMMENT: 11149 goto __17 11150 case HCRC: 11151 goto __18 11152 case DICTID: 11153 goto __19 11154 case DICT: 11155 goto __20 11156 case TYPE: 11157 goto __21 11158 case TYPEDO: 11159 goto __22 11160 case STORED: 11161 goto __23 11162 case COPY_: 11163 goto __24 11164 case COPY: 11165 goto __25 11166 case TABLE: 11167 goto __26 11168 case LENLENS: 11169 goto __27 11170 case CODELENS: 11171 goto __28 11172 case LEN_: 11173 goto __29 11174 case LEN: 11175 goto __30 11176 case LENEXT: 11177 goto __31 11178 case DIST: 11179 goto __32 11180 case DISTEXT: 11181 goto __33 11182 case MATCH: 11183 goto __34 11184 case LIT: 11185 goto __35 11186 case CHECK: 11187 goto __36 11188 case LENGTH: 11189 goto __37 11190 case DONE: 11191 goto __38 11192 case BAD: 11193 goto __39 11194 case MEM: 11195 goto __40 11196 case SYNC: 11197 goto __41 11198 default: 11199 goto __42 11200 } 11201 goto __9 11202 __10: 11203 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap == 0) { 11204 goto __43 11205 } 11206 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO 11207 goto __9 11208 __43: 11209 ; 11210 __44: 11211 __47: 11212 if !(bits < uint32(16)) { 11213 goto __48 11214 } 11215 __49: 11216 if !(have == uint32(0)) { 11217 goto __52 11218 } 11219 goto inf_leave 11220 __52: 11221 ; 11222 have-- 11223 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11224 bits = bits + uint32(8) 11225 goto __50 11226 __50: 11227 if 0 != 0 { 11228 goto __49 11229 } 11230 goto __51 11231 __51: 11232 ; 11233 goto __47 11234 __48: 11235 ; 11236 goto __45 11237 __45: 11238 if 0 != 0 { 11239 goto __44 11240 } 11241 goto __46 11242 __46: 11243 ; 11244 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&2 != 0 && hold == uint64(0x8b1f)) { 11245 goto __53 11246 } // gzip header 11247 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 11248 goto __54 11249 } 11250 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15) 11251 __54: 11252 ; 11253 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 11254 __55: 11255 *(*uint8)(unsafe.Pointer(bp)) = uint8(hold) 11256 *(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8) 11257 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) 11258 goto __56 11259 __56: 11260 if 0 != 0 { 11261 goto __55 11262 } 11263 goto __57 11264 __57: 11265 ; 11266 __58: 11267 hold = uint64(0) 11268 bits = uint32(0) 11269 goto __59 11270 __59: 11271 if 0 != 0 { 11272 goto __58 11273 } 11274 goto __60 11275 __60: 11276 ; 11277 (*Inflate_state)(unsafe.Pointer(state)).Fmode = FLAGS 11278 goto __9 11279 __53: 11280 ; 11281 (*Inflate_state)(unsafe.Pointer(state)).Fflags = 0 // expect zlib header 11282 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 11283 goto __61 11284 } 11285 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -1 11286 __61: 11287 ; 11288 if !(!((*Inflate_state)(unsafe.Pointer(state)).Fwrap&1 != 0) || (uint64(uint32(hold)&(uint32(1)<<8-uint32(1))<<8)+hold>>8)%uint64(31) != 0) { 11289 goto __62 11290 } 11291 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 669 /* "incorrect header..." */ 11292 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11293 goto __9 11294 __62: 11295 ; 11296 if !(uint32(hold)&(uint32(1)<<4-uint32(1)) != uint32(Z_DEFLATED)) { 11297 goto __63 11298 } 11299 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 11300 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11301 goto __9 11302 __63: 11303 ; 11304 __64: 11305 hold >>= 4 11306 bits = bits - uint32(4) 11307 goto __65 11308 __65: 11309 if 0 != 0 { 11310 goto __64 11311 } 11312 goto __66 11313 __66: 11314 ; 11315 len = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(8) 11316 if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) { 11317 goto __67 11318 } 11319 (*Inflate_state)(unsafe.Pointer(state)).Fwbits = len 11320 __67: 11321 ; 11322 if !(len > uint32(15) || len > (*Inflate_state)(unsafe.Pointer(state)).Fwbits) { 11323 goto __68 11324 } 11325 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 719 /* "invalid window s..." */ 11326 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11327 goto __9 11328 __68: 11329 ; 11330 (*Inflate_state)(unsafe.Pointer(state)).Fdmax = uint32(1) << len 11331 11332 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32, Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 11333 (*Inflate_state)(unsafe.Pointer(state)).Fmode = func() uint32 { 11334 if hold&uint64(0x200) != 0 { 11335 return DICTID 11336 } 11337 return TYPE 11338 }() 11339 __69: 11340 hold = uint64(0) 11341 bits = uint32(0) 11342 goto __70 11343 __70: 11344 if 0 != 0 { 11345 goto __69 11346 } 11347 goto __71 11348 __71: 11349 ; 11350 goto __9 11351 __11: 11352 __72: 11353 __75: 11354 if !(bits < uint32(16)) { 11355 goto __76 11356 } 11357 __77: 11358 if !(have == uint32(0)) { 11359 goto __80 11360 } 11361 goto inf_leave 11362 __80: 11363 ; 11364 have-- 11365 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11366 bits = bits + uint32(8) 11367 goto __78 11368 __78: 11369 if 0 != 0 { 11370 goto __77 11371 } 11372 goto __79 11373 __79: 11374 ; 11375 goto __75 11376 __76: 11377 ; 11378 goto __73 11379 __73: 11380 if 0 != 0 { 11381 goto __72 11382 } 11383 goto __74 11384 __74: 11385 ; 11386 (*Inflate_state)(unsafe.Pointer(state)).Fflags = int32(hold) 11387 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0xff != Z_DEFLATED) { 11388 goto __81 11389 } 11390 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */ 11391 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11392 goto __9 11393 __81: 11394 ; 11395 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0xe000 != 0) { 11396 goto __82 11397 } 11398 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 739 /* "unknown header f..." */ 11399 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11400 goto __9 11401 __82: 11402 ; 11403 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 11404 goto __83 11405 } 11406 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = int32(hold >> 8 & uint64(1)) 11407 __83: 11408 ; 11409 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 11410 goto __84 11411 } 11412 __85: 11413 *(*uint8)(unsafe.Pointer(bp)) = uint8(hold) 11414 *(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8) 11415 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) 11416 goto __86 11417 __86: 11418 if 0 != 0 { 11419 goto __85 11420 } 11421 goto __87 11422 __87: 11423 ; 11424 __84: 11425 ; 11426 __88: 11427 hold = uint64(0) 11428 bits = uint32(0) 11429 goto __89 11430 __89: 11431 if 0 != 0 { 11432 goto __88 11433 } 11434 goto __90 11435 __90: 11436 ; 11437 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TIME 11438 __12: 11439 __91: 11440 __94: 11441 if !(bits < uint32(32)) { 11442 goto __95 11443 } 11444 __96: 11445 if !(have == uint32(0)) { 11446 goto __99 11447 } 11448 goto inf_leave 11449 __99: 11450 ; 11451 have-- 11452 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11453 bits = bits + uint32(8) 11454 goto __97 11455 __97: 11456 if 0 != 0 { 11457 goto __96 11458 } 11459 goto __98 11460 __98: 11461 ; 11462 goto __94 11463 __95: 11464 ; 11465 goto __92 11466 __92: 11467 if 0 != 0 { 11468 goto __91 11469 } 11470 goto __93 11471 __93: 11472 ; 11473 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 11474 goto __100 11475 } 11476 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold 11477 __100: 11478 ; 11479 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 11480 goto __101 11481 } 11482 __102: 11483 *(*uint8)(unsafe.Pointer(bp)) = uint8(hold) 11484 *(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8) 11485 *(*uint8)(unsafe.Pointer(bp + 2)) = uint8(hold >> 16) 11486 *(*uint8)(unsafe.Pointer(bp + 3)) = uint8(hold >> 24) 11487 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(4)) 11488 goto __103 11489 __103: 11490 if 0 != 0 { 11491 goto __102 11492 } 11493 goto __104 11494 __104: 11495 ; 11496 __101: 11497 ; 11498 __105: 11499 hold = uint64(0) 11500 bits = uint32(0) 11501 goto __106 11502 __106: 11503 if 0 != 0 { 11504 goto __105 11505 } 11506 goto __107 11507 __107: 11508 ; 11509 (*Inflate_state)(unsafe.Pointer(state)).Fmode = OS 11510 __13: 11511 __108: 11512 __111: 11513 if !(bits < uint32(16)) { 11514 goto __112 11515 } 11516 __113: 11517 if !(have == uint32(0)) { 11518 goto __116 11519 } 11520 goto inf_leave 11521 __116: 11522 ; 11523 have-- 11524 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11525 bits = bits + uint32(8) 11526 goto __114 11527 __114: 11528 if 0 != 0 { 11529 goto __113 11530 } 11531 goto __115 11532 __115: 11533 ; 11534 goto __111 11535 __112: 11536 ; 11537 goto __109 11538 __109: 11539 if 0 != 0 { 11540 goto __108 11541 } 11542 goto __110 11543 __110: 11544 ; 11545 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 11546 goto __117 11547 } 11548 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = int32(hold & uint64(0xff)) 11549 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fos = int32(hold >> 8) 11550 __117: 11551 ; 11552 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 11553 goto __118 11554 } 11555 __119: 11556 *(*uint8)(unsafe.Pointer(bp)) = uint8(hold) 11557 *(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8) 11558 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) 11559 goto __120 11560 __120: 11561 if 0 != 0 { 11562 goto __119 11563 } 11564 goto __121 11565 __121: 11566 ; 11567 __118: 11568 ; 11569 __122: 11570 hold = uint64(0) 11571 bits = uint32(0) 11572 goto __123 11573 __123: 11574 if 0 != 0 { 11575 goto __122 11576 } 11577 goto __124 11578 __124: 11579 ; 11580 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXLEN 11581 __14: 11582 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0400 != 0) { 11583 goto __125 11584 } 11585 __127: 11586 __130: 11587 if !(bits < uint32(16)) { 11588 goto __131 11589 } 11590 __132: 11591 if !(have == uint32(0)) { 11592 goto __135 11593 } 11594 goto inf_leave 11595 __135: 11596 ; 11597 have-- 11598 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11599 bits = bits + uint32(8) 11600 goto __133 11601 __133: 11602 if 0 != 0 { 11603 goto __132 11604 } 11605 goto __134 11606 __134: 11607 ; 11608 goto __130 11609 __131: 11610 ; 11611 goto __128 11612 __128: 11613 if 0 != 0 { 11614 goto __127 11615 } 11616 goto __129 11617 __129: 11618 ; 11619 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) 11620 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 11621 goto __136 11622 } 11623 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold) 11624 __136: 11625 ; 11626 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 11627 goto __137 11628 } 11629 __138: 11630 *(*uint8)(unsafe.Pointer(bp)) = uint8(hold) 11631 *(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8) 11632 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) 11633 goto __139 11634 __139: 11635 if 0 != 0 { 11636 goto __138 11637 } 11638 goto __140 11639 __140: 11640 ; 11641 __137: 11642 ; 11643 __141: 11644 hold = uint64(0) 11645 bits = uint32(0) 11646 goto __142 11647 __142: 11648 if 0 != 0 { 11649 goto __141 11650 } 11651 goto __143 11652 __143: 11653 ; 11654 goto __126 11655 __125: 11656 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 11657 goto __144 11658 } 11659 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(Z_NULL) 11660 __144: 11661 ; 11662 __126: 11663 ; 11664 (*Inflate_state)(unsafe.Pointer(state)).Fmode = EXTRA 11665 __15: 11666 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0400 != 0) { 11667 goto __145 11668 } 11669 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 11670 if !(copy > have) { 11671 goto __146 11672 } 11673 copy = have 11674 __146: 11675 ; 11676 if !(copy != 0) { 11677 goto __147 11678 } 11679 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL) && (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(Z_NULL)) { 11680 goto __148 11681 } 11682 len = (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Inflate_state)(unsafe.Pointer(state)).Flength 11683 libc.Xmemcpy(tls, (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra+uintptr(len), next, 11684 func() uint64 { 11685 if len+copy > (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max { 11686 return uint64((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len) 11687 } 11688 return uint64(copy) 11689 }()) 11690 __148: 11691 ; 11692 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 11693 goto __149 11694 } 11695 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 11696 __149: 11697 ; 11698 have = have - copy 11699 next += uintptr(copy) 11700 *(*uint32)(unsafe.Pointer(state + 92)) -= copy 11701 __147: 11702 ; 11703 if !((*Inflate_state)(unsafe.Pointer(state)).Flength != 0) { 11704 goto __150 11705 } 11706 goto inf_leave 11707 __150: 11708 ; 11709 __145: 11710 ; 11711 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 11712 (*Inflate_state)(unsafe.Pointer(state)).Fmode = NAME 11713 __16: 11714 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0800 != 0) { 11715 goto __151 11716 } 11717 if !(have == uint32(0)) { 11718 goto __153 11719 } 11720 goto inf_leave 11721 __153: 11722 ; 11723 copy = uint32(0) 11724 __154: 11725 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 11726 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) { 11727 goto __157 11728 } 11729 *(*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) 11730 __157: 11731 ; 11732 goto __155 11733 __155: 11734 if len != 0 && copy < have { 11735 goto __154 11736 } 11737 goto __156 11738 __156: 11739 ; 11740 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 11741 goto __158 11742 } 11743 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 11744 __158: 11745 ; 11746 have = have - copy 11747 next += uintptr(copy) 11748 if !(len != 0) { 11749 goto __159 11750 } 11751 goto inf_leave 11752 __159: 11753 ; 11754 goto __152 11755 __151: 11756 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 11757 goto __160 11758 } 11759 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(Z_NULL) 11760 __160: 11761 ; 11762 __152: 11763 ; 11764 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0) 11765 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COMMENT 11766 __17: 11767 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x1000 != 0) { 11768 goto __161 11769 } 11770 if !(have == uint32(0)) { 11771 goto __163 11772 } 11773 goto inf_leave 11774 __163: 11775 ; 11776 copy = uint32(0) 11777 __164: 11778 len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(©, 1))))) 11779 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) { 11780 goto __167 11781 } 11782 *(*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) 11783 __167: 11784 ; 11785 goto __165 11786 __165: 11787 if len != 0 && copy < have { 11788 goto __164 11789 } 11790 goto __166 11791 __166: 11792 ; 11793 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) { 11794 goto __168 11795 } 11796 (*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy) 11797 __168: 11798 ; 11799 have = have - copy 11800 next += uintptr(copy) 11801 if !(len != 0) { 11802 goto __169 11803 } 11804 goto inf_leave 11805 __169: 11806 ; 11807 goto __162 11808 __161: 11809 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 11810 goto __170 11811 } 11812 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(Z_NULL) 11813 __170: 11814 ; 11815 __162: 11816 ; 11817 (*Inflate_state)(unsafe.Pointer(state)).Fmode = HCRC 11818 __18: 11819 if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0) { 11820 goto __171 11821 } 11822 __172: 11823 __175: 11824 if !(bits < uint32(16)) { 11825 goto __176 11826 } 11827 __177: 11828 if !(have == uint32(0)) { 11829 goto __180 11830 } 11831 goto inf_leave 11832 __180: 11833 ; 11834 have-- 11835 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11836 bits = bits + uint32(8) 11837 goto __178 11838 __178: 11839 if 0 != 0 { 11840 goto __177 11841 } 11842 goto __179 11843 __179: 11844 ; 11845 goto __175 11846 __176: 11847 ; 11848 goto __173 11849 __173: 11850 if 0 != 0 { 11851 goto __172 11852 } 11853 goto __174 11854 __174: 11855 ; 11856 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && hold != (*Inflate_state)(unsafe.Pointer(state)).Fcheck&uint64(0xffff)) { 11857 goto __181 11858 } 11859 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 764 /* "header crc misma..." */ 11860 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 11861 goto __9 11862 __181: 11863 ; 11864 __182: 11865 hold = uint64(0) 11866 bits = uint32(0) 11867 goto __183 11868 __183: 11869 if 0 != 0 { 11870 goto __182 11871 } 11872 goto __184 11873 __184: 11874 ; 11875 __171: 11876 ; 11877 if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) { 11878 goto __185 11879 } 11880 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (*Inflate_state)(unsafe.Pointer(state)).Fflags >> 9 & 1 11881 (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = 1 11882 __185: 11883 ; 11884 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32, Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 11885 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 11886 goto __9 11887 __19: 11888 __186: 11889 __189: 11890 if !(bits < uint32(32)) { 11891 goto __190 11892 } 11893 __191: 11894 if !(have == uint32(0)) { 11895 goto __194 11896 } 11897 goto inf_leave 11898 __194: 11899 ; 11900 have-- 11901 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11902 bits = bits + uint32(8) 11903 goto __192 11904 __192: 11905 if 0 != 0 { 11906 goto __191 11907 } 11908 goto __193 11909 __193: 11910 ; 11911 goto __189 11912 __190: 11913 ; 11914 goto __187 11915 __187: 11916 if 0 != 0 { 11917 goto __186 11918 } 11919 goto __188 11920 __188: 11921 ; 11922 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32, hold>>24&uint64(0xff)+hold>>8&uint64(0xff00)+hold&uint64(0xff00)<<8+hold&uint64(0xff)<<24) 11923 __195: 11924 hold = uint64(0) 11925 bits = uint32(0) 11926 goto __196 11927 __196: 11928 if 0 != 0 { 11929 goto __195 11930 } 11931 goto __197 11932 __197: 11933 ; 11934 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DICT 11935 __20: 11936 if !((*Inflate_state)(unsafe.Pointer(state)).Fhavedict == 0) { 11937 goto __198 11938 } 11939 __199: 11940 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 11941 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 11942 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 11943 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 11944 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 11945 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 11946 goto __200 11947 __200: 11948 if 0 != 0 { 11949 goto __199 11950 } 11951 goto __201 11952 __201: 11953 ; 11954 return Z_NEED_DICT 11955 __198: 11956 ; 11957 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32, Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))) 11958 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 11959 __21: 11960 if !(flush == Z_BLOCK || flush == Z_TREES) { 11961 goto __202 11962 } 11963 goto inf_leave 11964 __202: 11965 ; 11966 __22: 11967 if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) { 11968 goto __203 11969 } 11970 __204: 11971 hold >>= bits & uint32(7) 11972 bits = bits - bits&uint32(7) 11973 goto __205 11974 __205: 11975 if 0 != 0 { 11976 goto __204 11977 } 11978 goto __206 11979 __206: 11980 ; 11981 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CHECK 11982 goto __9 11983 __203: 11984 ; 11985 __207: 11986 __210: 11987 if !(bits < uint32(3)) { 11988 goto __211 11989 } 11990 __212: 11991 if !(have == uint32(0)) { 11992 goto __215 11993 } 11994 goto inf_leave 11995 __215: 11996 ; 11997 have-- 11998 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 11999 bits = bits + uint32(8) 12000 goto __213 12001 __213: 12002 if 0 != 0 { 12003 goto __212 12004 } 12005 goto __214 12006 __214: 12007 ; 12008 goto __210 12009 __211: 12010 ; 12011 goto __208 12012 __208: 12013 if 0 != 0 { 12014 goto __207 12015 } 12016 goto __209 12017 __209: 12018 ; 12019 (*Inflate_state)(unsafe.Pointer(state)).Flast = int32(uint32(hold) & (uint32(1)<<1 - uint32(1))) 12020 __216: 12021 hold >>= 1 12022 bits = bits - uint32(1) 12023 goto __217 12024 __217: 12025 if 0 != 0 { 12026 goto __216 12027 } 12028 goto __218 12029 __218: 12030 ; 12031 switch uint32(hold) & (uint32(1)<<2 - uint32(1)) { 12032 case uint32(0): 12033 goto __220 12034 case uint32(1): 12035 goto __221 12036 case uint32(2): 12037 goto __222 12038 case uint32(3): 12039 goto __223 12040 } 12041 goto __219 12042 __220: // stored block 12043 ; 12044 (*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED 12045 goto __219 12046 __221: // fixed block 12047 fixedtables1(tls, state) 12048 12049 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ // decode codes 12050 if !(flush == Z_TREES) { 12051 goto __224 12052 } 12053 __225: 12054 hold >>= 2 12055 bits = bits - uint32(2) 12056 goto __226 12057 __226: 12058 if 0 != 0 { 12059 goto __225 12060 } 12061 goto __227 12062 __227: 12063 ; 12064 goto inf_leave 12065 __224: 12066 ; 12067 goto __219 12068 __222: // dynamic block 12069 ; 12070 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE 12071 goto __219 12072 __223: 12073 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */ 12074 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12075 __219: 12076 ; 12077 __228: 12078 hold >>= 2 12079 bits = bits - uint32(2) 12080 goto __229 12081 __229: 12082 if 0 != 0 { 12083 goto __228 12084 } 12085 goto __230 12086 __230: 12087 ; 12088 goto __9 12089 __23: 12090 __231: 12091 hold >>= bits & uint32(7) 12092 bits = bits - bits&uint32(7) 12093 goto __232 12094 __232: 12095 if 0 != 0 { 12096 goto __231 12097 } 12098 goto __233 12099 __233: 12100 ; // go to byte boundary 12101 __234: 12102 __237: 12103 if !(bits < uint32(32)) { 12104 goto __238 12105 } 12106 __239: 12107 if !(have == uint32(0)) { 12108 goto __242 12109 } 12110 goto inf_leave 12111 __242: 12112 ; 12113 have-- 12114 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12115 bits = bits + uint32(8) 12116 goto __240 12117 __240: 12118 if 0 != 0 { 12119 goto __239 12120 } 12121 goto __241 12122 __241: 12123 ; 12124 goto __237 12125 __238: 12126 ; 12127 goto __235 12128 __235: 12129 if 0 != 0 { 12130 goto __234 12131 } 12132 goto __236 12133 __236: 12134 ; 12135 if !(hold&uint64(0xffff) != hold>>16^uint64(0xffff)) { 12136 goto __243 12137 } 12138 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */ 12139 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12140 goto __9 12141 __243: 12142 ; 12143 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff) 12144 12145 __244: 12146 hold = uint64(0) 12147 bits = uint32(0) 12148 goto __245 12149 __245: 12150 if 0 != 0 { 12151 goto __244 12152 } 12153 goto __246 12154 __246: 12155 ; 12156 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY_ 12157 if !(flush == Z_TREES) { 12158 goto __247 12159 } 12160 goto inf_leave 12161 __247: 12162 ; 12163 __24: 12164 (*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY 12165 __25: 12166 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 12167 if !(copy != 0) { 12168 goto __248 12169 } 12170 if !(copy > have) { 12171 goto __249 12172 } 12173 copy = have 12174 __249: 12175 ; 12176 if !(copy > left) { 12177 goto __250 12178 } 12179 copy = left 12180 __250: 12181 ; 12182 if !(copy == uint32(0)) { 12183 goto __251 12184 } 12185 goto inf_leave 12186 __251: 12187 ; 12188 libc.Xmemcpy(tls, put, next, uint64(copy)) 12189 have = have - copy 12190 next += uintptr(copy) 12191 left = left - copy 12192 put += uintptr(copy) 12193 *(*uint32)(unsafe.Pointer(state + 92)) -= copy 12194 goto __9 12195 __248: 12196 ; 12197 12198 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 12199 goto __9 12200 __26: 12201 __252: 12202 __255: 12203 if !(bits < uint32(14)) { 12204 goto __256 12205 } 12206 __257: 12207 if !(have == uint32(0)) { 12208 goto __260 12209 } 12210 goto inf_leave 12211 __260: 12212 ; 12213 have-- 12214 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12215 bits = bits + uint32(8) 12216 goto __258 12217 __258: 12218 if 0 != 0 { 12219 goto __257 12220 } 12221 goto __259 12222 __259: 12223 ; 12224 goto __255 12225 __256: 12226 ; 12227 goto __253 12228 __253: 12229 if 0 != 0 { 12230 goto __252 12231 } 12232 goto __254 12233 __254: 12234 ; 12235 (*Inflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(257) 12236 __261: 12237 hold >>= 5 12238 bits = bits - uint32(5) 12239 goto __262 12240 __262: 12241 if 0 != 0 { 12242 goto __261 12243 } 12244 goto __263 12245 __263: 12246 ; 12247 (*Inflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(1) 12248 __264: 12249 hold >>= 5 12250 bits = bits - uint32(5) 12251 goto __265 12252 __265: 12253 if 0 != 0 { 12254 goto __264 12255 } 12256 goto __266 12257 __266: 12258 ; 12259 (*Inflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(4) 12260 __267: 12261 hold >>= 4 12262 bits = bits - uint32(4) 12263 goto __268 12264 __268: 12265 if 0 != 0 { 12266 goto __267 12267 } 12268 goto __269 12269 __269: 12270 ; 12271 if !((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30)) { 12272 goto __270 12273 } 12274 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */ 12275 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12276 goto __9 12277 __270: 12278 ; 12279 12280 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 12281 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENLENS 12282 __27: 12283 __271: 12284 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) { 12285 goto __272 12286 } 12287 __273: 12288 __276: 12289 if !(bits < uint32(3)) { 12290 goto __277 12291 } 12292 __278: 12293 if !(have == uint32(0)) { 12294 goto __281 12295 } 12296 goto inf_leave 12297 __281: 12298 ; 12299 have-- 12300 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12301 bits = bits + uint32(8) 12302 goto __279 12303 __279: 12304 if 0 != 0 { 12305 goto __278 12306 } 12307 goto __280 12308 __280: 12309 ; 12310 goto __276 12311 __277: 12312 ; 12313 goto __274 12314 __274: 12315 if 0 != 0 { 12316 goto __273 12317 } 12318 goto __275 12319 __275: 12320 ; 12321 *(*uint16)(unsafe.Pointer(state + 152 + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(uint32(hold) & (uint32(1)<<3 - uint32(1))) 12322 __282: 12323 hold >>= 3 12324 bits = bits - uint32(3) 12325 goto __283 12326 __283: 12327 if 0 != 0 { 12328 goto __282 12329 } 12330 goto __284 12331 __284: 12332 ; 12333 goto __271 12334 __272: 12335 ; 12336 __285: 12337 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) { 12338 goto __286 12339 } 12340 *(*uint16)(unsafe.Pointer(state + 152 + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0) 12341 goto __285 12342 __286: 12343 ; 12344 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 12345 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 12346 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) 12347 ret = Xinflate_table(tls, CODES, state+152, uint32(19), state+144, 12348 state+120, state+792) 12349 if !(ret != 0) { 12350 goto __287 12351 } 12352 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */ 12353 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12354 goto __9 12355 __287: 12356 ; 12357 12358 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 12359 (*Inflate_state)(unsafe.Pointer(state)).Fmode = CODELENS 12360 __28: 12361 __288: 12362 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) { 12363 goto __289 12364 } 12365 __290: 12366 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4)) 12367 if !(uint32(here.Fbits) <= bits) { 12368 goto __293 12369 } 12370 goto __292 12371 __293: 12372 ; 12373 __294: 12374 if !(have == uint32(0)) { 12375 goto __297 12376 } 12377 goto inf_leave 12378 __297: 12379 ; 12380 have-- 12381 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12382 bits = bits + uint32(8) 12383 goto __295 12384 __295: 12385 if 0 != 0 { 12386 goto __294 12387 } 12388 goto __296 12389 __296: 12390 ; 12391 goto __291 12392 __291: 12393 goto __290 12394 goto __292 12395 __292: 12396 ; 12397 if !(int32(here.Fval) < 16) { 12398 goto __298 12399 } 12400 __300: 12401 hold >>= int32(here.Fbits) 12402 bits = bits - uint32(here.Fbits) 12403 goto __301 12404 __301: 12405 if 0 != 0 { 12406 goto __300 12407 } 12408 goto __302 12409 __302: 12410 ; 12411 *(*uint16)(unsafe.Pointer(state + 152 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval 12412 goto __299 12413 __298: 12414 if !(int32(here.Fval) == 16) { 12415 goto __303 12416 } 12417 __305: 12418 __308: 12419 if !(bits < uint32(int32(here.Fbits)+2)) { 12420 goto __309 12421 } 12422 __310: 12423 if !(have == uint32(0)) { 12424 goto __313 12425 } 12426 goto inf_leave 12427 __313: 12428 ; 12429 have-- 12430 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12431 bits = bits + uint32(8) 12432 goto __311 12433 __311: 12434 if 0 != 0 { 12435 goto __310 12436 } 12437 goto __312 12438 __312: 12439 ; 12440 goto __308 12441 __309: 12442 ; 12443 goto __306 12444 __306: 12445 if 0 != 0 { 12446 goto __305 12447 } 12448 goto __307 12449 __307: 12450 ; 12451 __314: 12452 hold >>= int32(here.Fbits) 12453 bits = bits - uint32(here.Fbits) 12454 goto __315 12455 __315: 12456 if 0 != 0 { 12457 goto __314 12458 } 12459 goto __316 12460 __316: 12461 ; 12462 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) { 12463 goto __317 12464 } 12465 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 12466 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12467 goto __289 12468 __317: 12469 ; 12470 len = uint32(*(*uint16)(unsafe.Pointer(state + 152 + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2))) 12471 copy = uint32(3) + uint32(hold)&(uint32(1)<<2-uint32(1)) 12472 __318: 12473 hold >>= 2 12474 bits = bits - uint32(2) 12475 goto __319 12476 __319: 12477 if 0 != 0 { 12478 goto __318 12479 } 12480 goto __320 12481 __320: 12482 ; 12483 goto __304 12484 __303: 12485 if !(int32(here.Fval) == 17) { 12486 goto __321 12487 } 12488 __323: 12489 __326: 12490 if !(bits < uint32(int32(here.Fbits)+3)) { 12491 goto __327 12492 } 12493 __328: 12494 if !(have == uint32(0)) { 12495 goto __331 12496 } 12497 goto inf_leave 12498 __331: 12499 ; 12500 have-- 12501 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12502 bits = bits + uint32(8) 12503 goto __329 12504 __329: 12505 if 0 != 0 { 12506 goto __328 12507 } 12508 goto __330 12509 __330: 12510 ; 12511 goto __326 12512 __327: 12513 ; 12514 goto __324 12515 __324: 12516 if 0 != 0 { 12517 goto __323 12518 } 12519 goto __325 12520 __325: 12521 ; 12522 __332: 12523 hold >>= int32(here.Fbits) 12524 bits = bits - uint32(here.Fbits) 12525 goto __333 12526 __333: 12527 if 0 != 0 { 12528 goto __332 12529 } 12530 goto __334 12531 __334: 12532 ; 12533 len = uint32(0) 12534 copy = uint32(3) + uint32(hold)&(uint32(1)<<3-uint32(1)) 12535 __335: 12536 hold >>= 3 12537 bits = bits - uint32(3) 12538 goto __336 12539 __336: 12540 if 0 != 0 { 12541 goto __335 12542 } 12543 goto __337 12544 __337: 12545 ; 12546 goto __322 12547 __321: 12548 __338: 12549 __341: 12550 if !(bits < uint32(int32(here.Fbits)+7)) { 12551 goto __342 12552 } 12553 __343: 12554 if !(have == uint32(0)) { 12555 goto __346 12556 } 12557 goto inf_leave 12558 __346: 12559 ; 12560 have-- 12561 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12562 bits = bits + uint32(8) 12563 goto __344 12564 __344: 12565 if 0 != 0 { 12566 goto __343 12567 } 12568 goto __345 12569 __345: 12570 ; 12571 goto __341 12572 __342: 12573 ; 12574 goto __339 12575 __339: 12576 if 0 != 0 { 12577 goto __338 12578 } 12579 goto __340 12580 __340: 12581 ; 12582 __347: 12583 hold >>= int32(here.Fbits) 12584 bits = bits - uint32(here.Fbits) 12585 goto __348 12586 __348: 12587 if 0 != 0 { 12588 goto __347 12589 } 12590 goto __349 12591 __349: 12592 ; 12593 len = uint32(0) 12594 copy = uint32(11) + uint32(hold)&(uint32(1)<<7-uint32(1)) 12595 __350: 12596 hold >>= 7 12597 bits = bits - uint32(7) 12598 goto __351 12599 __351: 12600 if 0 != 0 { 12601 goto __350 12602 } 12603 goto __352 12604 __352: 12605 ; 12606 __322: 12607 ; 12608 __304: 12609 ; 12610 if !((*Inflate_state)(unsafe.Pointer(state)).Fhave+copy > (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) { 12611 goto __353 12612 } 12613 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */ 12614 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12615 goto __289 12616 __353: 12617 ; 12618 __354: 12619 if !(libc.PostDecUint32(©, 1) != 0) { 12620 goto __355 12621 } 12622 *(*uint16)(unsafe.Pointer(state + 152 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len) 12623 goto __354 12624 __355: 12625 ; 12626 __299: 12627 ; 12628 goto __288 12629 __289: 12630 ; 12631 12632 // handle error breaks in while 12633 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) { 12634 goto __356 12635 } 12636 goto __9 12637 __356: 12638 ; 12639 12640 // check for end-of-block code (better have one) 12641 if !(int32(*(*uint16)(unsafe.Pointer(state + 152 + 256*2))) == 0) { 12642 goto __357 12643 } 12644 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */ 12645 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12646 goto __9 12647 __357: 12648 ; 12649 12650 // build code tables -- note: do not change the lenbits or distbits 12651 // values here (9 and 6) without reading the comments in inftrees.h 12652 // concerning the ENOUGH constants, which depend on those values 12653 (*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */ 12654 (*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 12655 (*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) 12656 ret = Xinflate_table(tls, LENS, state+152, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, state+144, 12657 state+120, state+792) 12658 if !(ret != 0) { 12659 goto __358 12660 } 12661 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */ 12662 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12663 goto __9 12664 __358: 12665 ; 12666 (*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext 12667 (*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) 12668 ret = Xinflate_table(tls, DISTS, state+152+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Inflate_state)(unsafe.Pointer(state)).Fndist, 12669 state+144, state+124, state+792) 12670 if !(ret != 0) { 12671 goto __359 12672 } 12673 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */ 12674 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12675 goto __9 12676 __359: 12677 ; 12678 12679 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ 12680 if !(flush == Z_TREES) { 12681 goto __360 12682 } 12683 goto inf_leave 12684 __360: 12685 ; 12686 __29: 12687 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 12688 __30: 12689 if !(have >= uint32(6) && left >= uint32(258)) { 12690 goto __361 12691 } 12692 __362: 12693 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 12694 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 12695 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 12696 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 12697 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 12698 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 12699 goto __363 12700 __363: 12701 if 0 != 0 { 12702 goto __362 12703 } 12704 goto __364 12705 __364: 12706 ; 12707 Xinflate_fast(tls, strm, out) 12708 __365: 12709 put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out 12710 left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out 12711 next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in 12712 have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in 12713 hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold 12714 bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits 12715 goto __366 12716 __366: 12717 if 0 != 0 { 12718 goto __365 12719 } 12720 goto __367 12721 __367: 12722 ; 12723 if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) { 12724 goto __368 12725 } 12726 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 12727 __368: 12728 ; 12729 goto __9 12730 __361: 12731 ; 12732 (*Inflate_state)(unsafe.Pointer(state)).Fback = 0 12733 __369: 12734 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4)) 12735 if !(uint32(here.Fbits) <= bits) { 12736 goto __372 12737 } 12738 goto __371 12739 __372: 12740 ; 12741 __373: 12742 if !(have == uint32(0)) { 12743 goto __376 12744 } 12745 goto inf_leave 12746 __376: 12747 ; 12748 have-- 12749 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12750 bits = bits + uint32(8) 12751 goto __374 12752 __374: 12753 if 0 != 0 { 12754 goto __373 12755 } 12756 goto __375 12757 __375: 12758 ; 12759 goto __370 12760 __370: 12761 goto __369 12762 goto __371 12763 __371: 12764 ; 12765 if !(here.Fop != 0 && int32(here.Fop)&0xf0 == 0) { 12766 goto __377 12767 } 12768 last = here 12769 __378: 12770 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)) 12771 if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) { 12772 goto __381 12773 } 12774 goto __380 12775 __381: 12776 ; 12777 __382: 12778 if !(have == uint32(0)) { 12779 goto __385 12780 } 12781 goto inf_leave 12782 __385: 12783 ; 12784 have-- 12785 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12786 bits = bits + uint32(8) 12787 goto __383 12788 __383: 12789 if 0 != 0 { 12790 goto __382 12791 } 12792 goto __384 12793 __384: 12794 ; 12795 goto __379 12796 __379: 12797 goto __378 12798 goto __380 12799 __380: 12800 ; 12801 __386: 12802 hold >>= int32(last.Fbits) 12803 bits = bits - uint32(last.Fbits) 12804 goto __387 12805 __387: 12806 if 0 != 0 { 12807 goto __386 12808 } 12809 goto __388 12810 __388: 12811 ; 12812 *(*int32)(unsafe.Pointer(state + 7148)) += int32(last.Fbits) 12813 __377: 12814 ; 12815 __389: 12816 hold >>= int32(here.Fbits) 12817 bits = bits - uint32(here.Fbits) 12818 goto __390 12819 __390: 12820 if 0 != 0 { 12821 goto __389 12822 } 12823 goto __391 12824 __391: 12825 ; 12826 *(*int32)(unsafe.Pointer(state + 7148)) += int32(here.Fbits) 12827 (*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) 12828 if !(int32(here.Fop) == 0) { 12829 goto __392 12830 } 12831 12832 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LIT 12833 goto __9 12834 __392: 12835 ; 12836 if !(int32(here.Fop)&32 != 0) { 12837 goto __393 12838 } 12839 12840 (*Inflate_state)(unsafe.Pointer(state)).Fback = -1 12841 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 12842 goto __9 12843 __393: 12844 ; 12845 if !(int32(here.Fop)&64 != 0) { 12846 goto __394 12847 } 12848 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */ 12849 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 12850 goto __9 12851 __394: 12852 ; 12853 (*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) 12854 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENEXT 12855 __31: 12856 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 12857 goto __395 12858 } 12859 __396: 12860 __399: 12861 if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) { 12862 goto __400 12863 } 12864 __401: 12865 if !(have == uint32(0)) { 12866 goto __404 12867 } 12868 goto inf_leave 12869 __404: 12870 ; 12871 have-- 12872 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12873 bits = bits + uint32(8) 12874 goto __402 12875 __402: 12876 if 0 != 0 { 12877 goto __401 12878 } 12879 goto __403 12880 __403: 12881 ; 12882 goto __399 12883 __400: 12884 ; 12885 goto __397 12886 __397: 12887 if 0 != 0 { 12888 goto __396 12889 } 12890 goto __398 12891 __398: 12892 ; 12893 *(*uint32)(unsafe.Pointer(state + 92)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) 12894 __405: 12895 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 12896 bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra 12897 goto __406 12898 __406: 12899 if 0 != 0 { 12900 goto __405 12901 } 12902 goto __407 12903 __407: 12904 ; 12905 *(*int32)(unsafe.Pointer(state + 7148)) += int32((*Inflate_state)(unsafe.Pointer(state)).Fextra) 12906 __395: 12907 ; 12908 12909 (*Inflate_state)(unsafe.Pointer(state)).Fwas = (*Inflate_state)(unsafe.Pointer(state)).Flength 12910 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DIST 12911 __32: 12912 __408: 12913 here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits-uint32(1)))*4)) 12914 if !(uint32(here.Fbits) <= bits) { 12915 goto __411 12916 } 12917 goto __410 12918 __411: 12919 ; 12920 __412: 12921 if !(have == uint32(0)) { 12922 goto __415 12923 } 12924 goto inf_leave 12925 __415: 12926 ; 12927 have-- 12928 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12929 bits = bits + uint32(8) 12930 goto __413 12931 __413: 12932 if 0 != 0 { 12933 goto __412 12934 } 12935 goto __414 12936 __414: 12937 ; 12938 goto __409 12939 __409: 12940 goto __408 12941 goto __410 12942 __410: 12943 ; 12944 if !(int32(here.Fop)&0xf0 == 0) { 12945 goto __416 12946 } 12947 last = here 12948 __417: 12949 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)) 12950 if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) { 12951 goto __420 12952 } 12953 goto __419 12954 __420: 12955 ; 12956 __421: 12957 if !(have == uint32(0)) { 12958 goto __424 12959 } 12960 goto inf_leave 12961 __424: 12962 ; 12963 have-- 12964 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 12965 bits = bits + uint32(8) 12966 goto __422 12967 __422: 12968 if 0 != 0 { 12969 goto __421 12970 } 12971 goto __423 12972 __423: 12973 ; 12974 goto __418 12975 __418: 12976 goto __417 12977 goto __419 12978 __419: 12979 ; 12980 __425: 12981 hold >>= int32(last.Fbits) 12982 bits = bits - uint32(last.Fbits) 12983 goto __426 12984 __426: 12985 if 0 != 0 { 12986 goto __425 12987 } 12988 goto __427 12989 __427: 12990 ; 12991 *(*int32)(unsafe.Pointer(state + 7148)) += int32(last.Fbits) 12992 __416: 12993 ; 12994 __428: 12995 hold >>= int32(here.Fbits) 12996 bits = bits - uint32(here.Fbits) 12997 goto __429 12998 __429: 12999 if 0 != 0 { 13000 goto __428 13001 } 13002 goto __430 13003 __430: 13004 ; 13005 *(*int32)(unsafe.Pointer(state + 7148)) += int32(here.Fbits) 13006 if !(int32(here.Fop)&64 != 0) { 13007 goto __431 13008 } 13009 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */ 13010 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13011 goto __9 13012 __431: 13013 ; 13014 (*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) 13015 (*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) 13016 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DISTEXT 13017 __33: 13018 if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) { 13019 goto __432 13020 } 13021 __433: 13022 __436: 13023 if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) { 13024 goto __437 13025 } 13026 __438: 13027 if !(have == uint32(0)) { 13028 goto __441 13029 } 13030 goto inf_leave 13031 __441: 13032 ; 13033 have-- 13034 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 13035 bits = bits + uint32(8) 13036 goto __439 13037 __439: 13038 if 0 != 0 { 13039 goto __438 13040 } 13041 goto __440 13042 __440: 13043 ; 13044 goto __436 13045 __437: 13046 ; 13047 goto __434 13048 __434: 13049 if 0 != 0 { 13050 goto __433 13051 } 13052 goto __435 13053 __435: 13054 ; 13055 *(*uint32)(unsafe.Pointer(state + 96)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) 13056 __442: 13057 hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra 13058 bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra 13059 goto __443 13060 __443: 13061 if 0 != 0 { 13062 goto __442 13063 } 13064 goto __444 13065 __444: 13066 ; 13067 *(*int32)(unsafe.Pointer(state + 7148)) += int32((*Inflate_state)(unsafe.Pointer(state)).Fextra) 13068 __432: 13069 ; 13070 13071 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MATCH 13072 __34: 13073 if !(left == uint32(0)) { 13074 goto __445 13075 } 13076 goto inf_leave 13077 __445: 13078 ; 13079 copy = out - left 13080 if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > copy) { 13081 goto __446 13082 } // copy from window 13083 copy = (*Inflate_state)(unsafe.Pointer(state)).Foffset - copy 13084 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwhave) { 13085 goto __448 13086 } 13087 if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) { 13088 goto __449 13089 } 13090 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */ 13091 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13092 goto __9 13093 __449: 13094 ; 13095 __448: 13096 ; 13097 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwnext) { 13098 goto __450 13099 } 13100 copy = copy - (*Inflate_state)(unsafe.Pointer(state)).Fwnext 13101 from = (*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize-copy) 13102 goto __451 13103 __450: 13104 from = (*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext-copy) 13105 __451: 13106 ; 13107 if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) { 13108 goto __452 13109 } 13110 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 13111 __452: 13112 ; 13113 goto __447 13114 __446: // copy from output 13115 from = put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset) 13116 copy = (*Inflate_state)(unsafe.Pointer(state)).Flength 13117 __447: 13118 ; 13119 if !(copy > left) { 13120 goto __453 13121 } 13122 copy = left 13123 __453: 13124 ; 13125 left = left - copy 13126 *(*uint32)(unsafe.Pointer(state + 92)) -= copy 13127 __454: 13128 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1))) 13129 goto __455 13130 __455: 13131 if libc.PreDecUint32(©, 1) != 0 { 13132 goto __454 13133 } 13134 goto __456 13135 __456: 13136 ; 13137 if !((*Inflate_state)(unsafe.Pointer(state)).Flength == uint32(0)) { 13138 goto __457 13139 } 13140 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 13141 __457: 13142 ; 13143 goto __9 13144 __35: 13145 if !(left == uint32(0)) { 13146 goto __458 13147 } 13148 goto inf_leave 13149 __458: 13150 ; 13151 *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength) 13152 left-- 13153 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN 13154 goto __9 13155 __36: 13156 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) { 13157 goto __459 13158 } 13159 __460: 13160 __463: 13161 if !(bits < uint32(32)) { 13162 goto __464 13163 } 13164 __465: 13165 if !(have == uint32(0)) { 13166 goto __468 13167 } 13168 goto inf_leave 13169 __468: 13170 ; 13171 have-- 13172 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 13173 bits = bits + uint32(8) 13174 goto __466 13175 __466: 13176 if 0 != 0 { 13177 goto __465 13178 } 13179 goto __467 13180 __467: 13181 ; 13182 goto __463 13183 __464: 13184 ; 13185 goto __461 13186 __461: 13187 if 0 != 0 { 13188 goto __460 13189 } 13190 goto __462 13191 __462: 13192 ; 13193 out = out - left 13194 *(*ULong)(unsafe.Pointer(strm + 40)) += ULong(out) 13195 *(*uint64)(unsafe.Pointer(state + 40)) += uint64(out) 13196 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && out != 0) { 13197 goto __469 13198 } 13199 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32, func() uint64 { 13200 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 13201 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out) 13202 } 13203 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out) 13204 }()) 13205 __469: 13206 ; 13207 out = left 13208 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && func() uint64 { 13209 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 13210 return hold 13211 } 13212 return hold>>24&uint64(0xff) + hold>>8&uint64(0xff00) + hold&uint64(0xff00)<<8 + hold&uint64(0xff)<<24 13213 }() != (*Inflate_state)(unsafe.Pointer(state)).Fcheck) { 13214 goto __470 13215 } 13216 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 784 /* "incorrect data c..." */ 13217 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13218 goto __9 13219 __470: 13220 ; 13221 __471: 13222 hold = uint64(0) 13223 bits = uint32(0) 13224 goto __472 13225 __472: 13226 if 0 != 0 { 13227 goto __471 13228 } 13229 goto __473 13230 __473: 13231 ; 13232 13233 __459: 13234 ; 13235 (*Inflate_state)(unsafe.Pointer(state)).Fmode = LENGTH 13236 __37: 13237 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0) { 13238 goto __474 13239 } 13240 __475: 13241 __478: 13242 if !(bits < uint32(32)) { 13243 goto __479 13244 } 13245 __480: 13246 if !(have == uint32(0)) { 13247 goto __483 13248 } 13249 goto inf_leave 13250 __483: 13251 ; 13252 have-- 13253 hold = hold + uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits 13254 bits = bits + uint32(8) 13255 goto __481 13256 __481: 13257 if 0 != 0 { 13258 goto __480 13259 } 13260 goto __482 13261 __482: 13262 ; 13263 goto __478 13264 __479: 13265 ; 13266 goto __476 13267 __476: 13268 if 0 != 0 { 13269 goto __475 13270 } 13271 goto __477 13272 __477: 13273 ; 13274 if !(hold != (*Inflate_state)(unsafe.Pointer(state)).Ftotal&0xffffffff) { 13275 goto __484 13276 } 13277 (*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 805 /* "incorrect length..." */ 13278 (*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD 13279 goto __9 13280 __484: 13281 ; 13282 __485: 13283 hold = uint64(0) 13284 bits = uint32(0) 13285 goto __486 13286 __486: 13287 if 0 != 0 { 13288 goto __485 13289 } 13290 goto __487 13291 __487: 13292 ; 13293 13294 __474: 13295 ; 13296 (*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE 13297 __38: 13298 ret = Z_STREAM_END 13299 goto inf_leave 13300 __39: 13301 ret = -3 13302 goto inf_leave 13303 __40: 13304 return -4 13305 __41: 13306 __42: 13307 return -2 13308 __9: 13309 ; 13310 goto __7 13311 __7: 13312 goto __6 13313 goto __8 13314 __8: 13315 ; 13316 13317 // 13318 // Return from inflate(), updating the total counts and the check value. 13319 // If there was no progress during the inflate() call, return a buffer 13320 // error. Call updatewindow() to create and/or update the window state. 13321 // Note: a memory error from inflate() is non-recoverable. 13322 // 13323 inf_leave: 13324 __488: 13325 (*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put 13326 (*Z_stream)(unsafe.Pointer(strm)).Favail_out = left 13327 (*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next 13328 (*Z_stream)(unsafe.Pointer(strm)).Favail_in = have 13329 (*Inflate_state)(unsafe.Pointer(state)).Fhold = hold 13330 (*Inflate_state)(unsafe.Pointer(state)).Fbits = bits 13331 goto __489 13332 __489: 13333 if 0 != 0 { 13334 goto __488 13335 } 13336 goto __490 13337 __490: 13338 ; 13339 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)) { 13340 goto __491 13341 } 13342 if !(updatewindow(tls, strm, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, out-(*Z_stream)(unsafe.Pointer(strm)).Favail_out) != 0) { 13343 goto __492 13344 } 13345 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 13346 return -4 13347 __492: 13348 ; 13349 __491: 13350 ; 13351 in = in - (*Z_stream)(unsafe.Pointer(strm)).Favail_in 13352 out = out - (*Z_stream)(unsafe.Pointer(strm)).Favail_out 13353 *(*ULong)(unsafe.Pointer(strm + 16)) += ULong(in) 13354 *(*ULong)(unsafe.Pointer(strm + 40)) += ULong(out) 13355 *(*uint64)(unsafe.Pointer(state + 40)) += uint64(out) 13356 if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && out != 0) { 13357 goto __493 13358 } 13359 (*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32, func() uint64 { 13360 if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 { 13361 return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out-uintptr(out), out) 13362 } 13363 return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out-uintptr(out), out) 13364 }()) 13365 __493: 13366 ; 13367 (*Z_stream)(unsafe.Pointer(strm)).Fdata_type = int32((*Inflate_state)(unsafe.Pointer(state)).Fbits) + func() int32 { 13368 if (*Inflate_state)(unsafe.Pointer(state)).Flast != 0 { 13369 return 64 13370 } 13371 return 0 13372 }() + func() int32 { 13373 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE { 13374 return 128 13375 } 13376 return 0 13377 }() + func() int32 { 13378 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == LEN_ || (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY_ { 13379 return 256 13380 } 13381 return 0 13382 }() 13383 if !((in == uint32(0) && out == uint32(0) || flush == Z_FINISH) && ret == Z_OK) { 13384 goto __494 13385 } 13386 ret = -5 13387 __494: 13388 ; 13389 return ret 13390 } 13391 13392 var order1 = // permutation of code lengths 13393 [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 */ 13394 13395 func XinflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1277:13: */ 13396 var state uintptr 13397 if inflateStateCheck(tls, strm) != 0 { 13398 return -2 13399 } 13400 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13401 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 13402 (*struct { 13403 f func(*libc.TLS, Voidpf, Voidpf) 13404 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow) 13405 } 13406 (*struct { 13407 f func(*libc.TLS, Voidpf, Voidpf) 13408 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate) 13409 (*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL) 13410 13411 return Z_OK 13412 } 13413 13414 func XinflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* inflate.c:1291:13: */ 13415 var state uintptr 13416 13417 // check state 13418 if inflateStateCheck(tls, strm) != 0 { 13419 return -2 13420 } 13421 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13422 13423 // copy dictionary 13424 if (*Inflate_state)(unsafe.Pointer(state)).Fwhave != 0 && dictionary != uintptr(Z_NULL) { 13425 libc.Xmemcpy(tls, dictionary, (*Inflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext), 13426 uint64((*Inflate_state)(unsafe.Pointer(state)).Fwhave-(*Inflate_state)(unsafe.Pointer(state)).Fwnext)) 13427 libc.Xmemcpy(tls, dictionary+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwhave)-uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext), 13428 (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64((*Inflate_state)(unsafe.Pointer(state)).Fwnext)) 13429 } 13430 if dictLength != uintptr(Z_NULL) { 13431 *(*UInt)(unsafe.Pointer(dictLength)) = (*Inflate_state)(unsafe.Pointer(state)).Fwhave 13432 } 13433 return Z_OK 13434 } 13435 13436 func XinflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* inflate.c:1314:13: */ 13437 var state uintptr 13438 var dictid uint64 13439 var ret int32 13440 13441 // check state 13442 if inflateStateCheck(tls, strm) != 0 { 13443 return -2 13444 } 13445 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13446 if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fmode != DICT { 13447 return -2 13448 } 13449 13450 // check for correct dictionary identifier 13451 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == DICT { 13452 dictid = Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)) 13453 dictid = Xadler32(tls, dictid, dictionary, dictLength) 13454 if dictid != (*Inflate_state)(unsafe.Pointer(state)).Fcheck { 13455 return -3 13456 } 13457 } 13458 13459 // copy dictionary to window using updatewindow(), which will amend the 13460 // existing dictionary if appropriate 13461 ret = updatewindow(tls, strm, dictionary+uintptr(dictLength), dictLength) 13462 if ret != 0 { 13463 (*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM 13464 return -4 13465 } 13466 (*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 1 13467 13468 return Z_OK 13469 } 13470 13471 func XinflateGetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* inflate.c:1349:13: */ 13472 var state uintptr 13473 13474 // check state 13475 if inflateStateCheck(tls, strm) != 0 { 13476 return -2 13477 } 13478 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13479 if (*Inflate_state)(unsafe.Pointer(state)).Fwrap&2 == 0 { 13480 return -2 13481 } 13482 13483 // save header structure 13484 (*Inflate_state)(unsafe.Pointer(state)).Fhead = head 13485 (*Gz_header)(unsafe.Pointer(head)).Fdone = 0 13486 return Z_OK 13487 } 13488 13489 // Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found 13490 // or when out of input. When called, *have is the number of pattern bytes 13491 // found in order so far, in 0..3. On return *have is updated to the new 13492 // state. If on return *have equals four, then the pattern was found and the 13493 // return value is how many bytes were read including the last byte of the 13494 // pattern. If *have is less than four, then the pattern has not been found 13495 // yet and the return value is len. In the latter case, syncsearch() can be 13496 // called again with more data and the *have state. *have is initialized to 13497 // zero for the first call. 13498 func syncsearch(tls *libc.TLS, have uintptr, buf uintptr, len uint32) uint32 { /* inflate.c:1377:16: */ 13499 var got uint32 13500 var next uint32 13501 13502 got = *(*uint32)(unsafe.Pointer(have)) 13503 next = uint32(0) 13504 for next < len && got < uint32(4) { 13505 if int32(*(*uint8)(unsafe.Pointer(buf + uintptr(next)))) == func() int32 { 13506 if got < uint32(2) { 13507 return 0 13508 } 13509 return 0xff 13510 }() { 13511 got++ 13512 } else if *(*uint8)(unsafe.Pointer(buf + uintptr(next))) != 0 { 13513 got = uint32(0) 13514 } else { 13515 got = uint32(4) - got 13516 } 13517 next++ 13518 } 13519 *(*uint32)(unsafe.Pointer(have)) = got 13520 return next 13521 } 13522 13523 func XinflateSync(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1400:13: */ 13524 bp := tls.Alloc(4) 13525 defer tls.Free(4) 13526 13527 var len uint32 // number of bytes to look at or looked at 13528 var in uint64 13529 var out uint64 // temporary to save total_in and total_out 13530 // var buf [4]uint8 at bp, 4 13531 // to restore bit buffer to byte string 13532 var state uintptr 13533 13534 // check parameters 13535 if inflateStateCheck(tls, strm) != 0 { 13536 return -2 13537 } 13538 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13539 if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && (*Inflate_state)(unsafe.Pointer(state)).Fbits < uint32(8) { 13540 return -5 13541 } 13542 13543 // if first time, start search in bit buffer 13544 if (*Inflate_state)(unsafe.Pointer(state)).Fmode != SYNC { 13545 (*Inflate_state)(unsafe.Pointer(state)).Fmode = SYNC 13546 libc.AssignShlPtrUint64(state+80, int((*Inflate_state)(unsafe.Pointer(state)).Fbits&uint32(7))) 13547 *(*uint32)(unsafe.Pointer(state + 88)) -= (*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7) 13548 len = uint32(0) 13549 for (*Inflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) { 13550 *(*uint8)(unsafe.Pointer(bp + uintptr(libc.PostIncUint32(&len, 1)))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Fhold) 13551 libc.AssignShrPtrUint64(state+80, int(8)) 13552 *(*uint32)(unsafe.Pointer(state + 88)) -= uint32(8) 13553 } 13554 (*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) 13555 syncsearch(tls, state+140, bp, len) 13556 } 13557 13558 // search available input 13559 len = syncsearch(tls, state+140, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in) 13560 *(*UInt)(unsafe.Pointer(strm + 8)) -= len 13561 *(*uintptr)(unsafe.Pointer(strm)) += uintptr(len) 13562 *(*ULong)(unsafe.Pointer(strm + 16)) += ULong(len) 13563 13564 // return no joy or set up to restart inflate() on a new block 13565 if (*Inflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) { 13566 return -3 13567 } 13568 in = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in 13569 out = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out 13570 XinflateReset(tls, strm) 13571 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = in 13572 (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out = out 13573 (*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE 13574 return Z_OK 13575 } 13576 13577 // Returns true if inflate is currently at the end of a block generated by 13578 // Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP 13579 // implementation to provide an additional safety check. PPP uses 13580 // Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored 13581 // block. When decompressing, PPP checks that at the end of input packet, 13582 // inflate is waiting for these length bytes. 13583 func XinflateSyncPoint(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1451:13: */ 13584 var state uintptr 13585 13586 if inflateStateCheck(tls, strm) != 0 { 13587 return -2 13588 } 13589 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13590 return libc.Bool32((*Inflate_state)(unsafe.Pointer(state)).Fmode == STORED && (*Inflate_state)(unsafe.Pointer(state)).Fbits == uint32(0)) 13591 } 13592 13593 func XinflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* inflate.c:1461:13: */ 13594 var state uintptr 13595 var copy uintptr 13596 var window uintptr 13597 var wsize uint32 13598 13599 // check input 13600 if inflateStateCheck(tls, source) != 0 || dest == uintptr(Z_NULL) { 13601 return -2 13602 } 13603 state = (*Z_stream)(unsafe.Pointer(source)).Fstate 13604 13605 // allocate space 13606 copy = (*struct { 13607 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 13608 })(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{}))) 13609 if copy == uintptr(Z_NULL) { 13610 return -4 13611 } 13612 window = uintptr(Z_NULL) 13613 if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) { 13614 window = (*struct { 13615 f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf 13616 })(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)))) 13617 if window == uintptr(Z_NULL) { 13618 (*struct { 13619 f func(*libc.TLS, Voidpf, Voidpf) 13620 })(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(source)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, copy) 13621 return -4 13622 } 13623 } 13624 13625 // copy state 13626 libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{}))) 13627 libc.Xmemcpy(tls, copy, state, uint64(unsafe.Sizeof(Inflate_state{}))) 13628 (*Inflate_state)(unsafe.Pointer(copy)).Fstrm = dest 13629 if (*Inflate_state)(unsafe.Pointer(state)).Flencode >= state+1368 && (*Inflate_state)(unsafe.Pointer(state)).Flencode <= state+1368+uintptr(ENOUGH_LENS+ENOUGH_DISTS)*4-uintptr(1)*4 { 13630 (*Inflate_state)(unsafe.Pointer(copy)).Flencode = copy + 1368 + uintptr(int64(((*Inflate_state)(unsafe.Pointer(state)).Flencode-(state+1368))/4))*4 13631 (*Inflate_state)(unsafe.Pointer(copy)).Fdistcode = copy + 1368 + uintptr(int64(((*Inflate_state)(unsafe.Pointer(state)).Fdistcode-(state+1368))/4))*4 13632 } 13633 (*Inflate_state)(unsafe.Pointer(copy)).Fnext = copy + 1368 + uintptr(int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext-(state+1368))/4))*4 13634 if window != uintptr(Z_NULL) { 13635 wsize = uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits 13636 libc.Xmemcpy(tls, window, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64(wsize)) 13637 } 13638 (*Inflate_state)(unsafe.Pointer(copy)).Fwindow = window 13639 (*Z_stream)(unsafe.Pointer(dest)).Fstate = copy 13640 return Z_OK 13641 } 13642 13643 func XinflateUndermine(tls *libc.TLS, strm Z_streamp, subvert int32) int32 { /* inflate.c:1508:13: */ 13644 var state uintptr 13645 13646 if inflateStateCheck(tls, strm) != 0 { 13647 return -2 13648 } 13649 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13650 _ = subvert 13651 (*Inflate_state)(unsafe.Pointer(state)).Fsane = 1 13652 return -3 13653 } 13654 13655 func XinflateValidate(tls *libc.TLS, strm Z_streamp, check int32) int32 { /* inflate.c:1526:13: */ 13656 var state uintptr 13657 13658 if inflateStateCheck(tls, strm) != 0 { 13659 return -2 13660 } 13661 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13662 if check != 0 { 13663 *(*int32)(unsafe.Pointer(state + 16)) |= 4 13664 } else { 13665 *(*int32)(unsafe.Pointer(state + 16)) &= libc.CplInt32(4) 13666 } 13667 return Z_OK 13668 } 13669 13670 func XinflateMark(tls *libc.TLS, strm Z_streamp) int64 { /* inflate.c:1541:14: */ 13671 var state uintptr 13672 13673 if inflateStateCheck(tls, strm) != 0 { 13674 return -(int64(1) << 16) 13675 } 13676 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13677 return int64(uint64(int64((*Inflate_state)(unsafe.Pointer(state)).Fback))<<16) + func() int64 { 13678 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY { 13679 return int64((*Inflate_state)(unsafe.Pointer(state)).Flength) 13680 } 13681 return func() int64 { 13682 if (*Inflate_state)(unsafe.Pointer(state)).Fmode == MATCH { 13683 return int64((*Inflate_state)(unsafe.Pointer(state)).Fwas - (*Inflate_state)(unsafe.Pointer(state)).Flength) 13684 } 13685 return int64(0) 13686 }() 13687 }() 13688 } 13689 13690 func XinflateCodesUsed(tls *libc.TLS, strm Z_streamp) uint64 { /* inflate.c:1554:23: */ 13691 var state uintptr 13692 if inflateStateCheck(tls, strm) != 0 { 13693 return libc.Uint64(libc.Uint64FromInt32(-1)) 13694 } 13695 state = (*Z_stream)(unsafe.Pointer(strm)).Fstate 13696 return uint64(int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext - (state + 1368)) / 4)) 13697 } 13698 13699 var Xinflate_copyright = *(*[48]int8)(unsafe.Pointer(ts + 828)) /* inftrees.c:11:12 */ 13700 13701 // 13702 // If you use the zlib library in a product, an acknowledgment is welcome 13703 // in the documentation of your product. If for some reason you cannot 13704 // include such an acknowledgment, I would appreciate that you keep this 13705 // copyright string in the executable of your product. 13706 // 13707 13708 // Build a set of tables to decode the provided canonical Huffman code. 13709 // The code lengths are lens[0..codes-1]. The result starts at *table, 13710 // whose indices are 0..2^bits-1. work is a writable array of at least 13711 // lens shorts, which is used as a work area. type is the type of code 13712 // to be generated, CODES, LENS, or DISTS. On return, zero is success, 13713 // -1 is an invalid code, and +1 means that ENOUGH isn't enough. table 13714 // on return points to the next available entry's address. bits is the 13715 // requested root table index bits, and on return it is the actual root 13716 // table index bits. It will differ if the request is greater than the 13717 // longest code or if it is less than the shortest code. 13718 func Xinflate_table(tls *libc.TLS, type1 Codetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) int32 { /* inftrees.c:32:19: */ 13719 bp := tls.Alloc(64) 13720 defer tls.Free(64) 13721 13722 var len uint32 // a code's length in bits 13723 var sym uint32 // index of code symbols 13724 var min uint32 13725 var max uint32 // minimum and maximum code lengths 13726 var root uint32 // number of index bits for root table 13727 var curr uint32 // number of index bits for current table 13728 var drop uint32 // code bits to drop for sub-table 13729 var left int32 // number of prefix codes available 13730 var used uint32 // code entries in table used 13731 var huff uint32 // Huffman code 13732 var incr uint32 // for incrementing code, index 13733 var fill uint32 // index for replicating entries 13734 var low uint32 // low bits for current root entry 13735 var mask uint32 // mask for low root bits 13736 var here Code // table entry for duplication 13737 var next uintptr // next available space in table 13738 var base uintptr // base value table to use 13739 var extra uintptr // extra bits table to use 13740 var match uint32 // use base and extra for symbol >= match 13741 // var count [16]uint16 at bp, 32 13742 // number of codes of each length 13743 // var offs [16]uint16 at bp+32, 32 13744 13745 // 13746 // Process a set of code lengths to create a canonical Huffman code. The 13747 // code lengths are lens[0..codes-1]. Each length corresponds to the 13748 // symbols 0..codes-1. The Huffman code is generated by first sorting the 13749 // symbols by length from short to long, and retaining the symbol order 13750 // for codes with equal lengths. Then the code starts with all zero bits 13751 // for the first code of the shortest length, and the codes are integer 13752 // increments for the same length, and zeros are appended as the length 13753 // increases. For the deflate format, these bits are stored backwards 13754 // from their more natural integer increment ordering, and so when the 13755 // decoding tables are built in the large loop below, the integer codes 13756 // are incremented backwards. 13757 // 13758 // This routine assumes, but does not check, that all of the entries in 13759 // lens[] are in the range 0..MAXBITS. The caller must assure this. 13760 // 1..MAXBITS is interpreted as that code length. zero means that that 13761 // symbol does not occur in this code. 13762 // 13763 // The codes are sorted by computing a count of codes for each length, 13764 // creating from that a table of starting indices for each length in the 13765 // sorted table, and then entering the symbols in order in the sorted 13766 // table. The sorted table is work[], with that space being provided by 13767 // the caller. 13768 // 13769 // The length counts are used for other purposes as well, i.e. finding 13770 // the minimum and maximum length codes, determining if there are any 13771 // codes at all, checking for a valid set of lengths, and looking ahead 13772 // at length counts to determine sub-table sizes when building the 13773 // decoding tables. 13774 // 13775 13776 // accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) 13777 for len = uint32(0); len <= uint32(MAXBITS); len++ { 13778 *(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)) = uint16(0) 13779 } 13780 for sym = uint32(0); sym < codes; sym++ { 13781 *(*uint16)(unsafe.Pointer(bp + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2))++ 13782 } 13783 13784 // bound code lengths, force root to be within code lengths 13785 root = *(*uint32)(unsafe.Pointer(bits)) 13786 for max = uint32(MAXBITS); max >= uint32(1); max-- { 13787 if int32(*(*uint16)(unsafe.Pointer(bp + uintptr(max)*2))) != 0 { 13788 break 13789 } 13790 } 13791 if root > max { 13792 root = max 13793 } 13794 if max == uint32(0) { // no symbols to code at all 13795 here.Fop = uint8(64) // invalid code marker 13796 here.Fbits = uint8(1) 13797 here.Fval = uint16(0) 13798 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(table)), 4))) = here // make a table to force an error 13799 *(*Code)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(table)), 4))) = here 13800 *(*uint32)(unsafe.Pointer(bits)) = uint32(1) 13801 return 0 // no symbols, but wait for decoding to report error 13802 } 13803 for min = uint32(1); min < max; min++ { 13804 if int32(*(*uint16)(unsafe.Pointer(bp + uintptr(min)*2))) != 0 { 13805 break 13806 } 13807 } 13808 if root < min { 13809 root = min 13810 } 13811 13812 // check for an over-subscribed or incomplete set of lengths 13813 left = 1 13814 for len = uint32(1); len <= uint32(MAXBITS); len++ { 13815 left <<= 1 13816 left = left - int32(*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2))) 13817 if left < 0 { 13818 return -1 13819 } // over-subscribed 13820 } 13821 if left > 0 && (type1 == CODES || max != uint32(1)) { 13822 return -1 13823 } // incomplete set 13824 13825 // generate offsets into symbol table for each length for sorting 13826 *(*uint16)(unsafe.Pointer(bp + 32 + 1*2)) = uint16(0) 13827 for len = uint32(1); len < uint32(MAXBITS); len++ { 13828 *(*uint16)(unsafe.Pointer(bp + 32 + uintptr(len+uint32(1))*2)) = uint16(int32(*(*uint16)(unsafe.Pointer(bp + 32 + uintptr(len)*2))) + int32(*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)))) 13829 } 13830 13831 // sort symbols by length, by symbol order within each length 13832 for sym = uint32(0); sym < codes; sym++ { 13833 if int32(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 { 13834 *(*uint16)(unsafe.Pointer(work + uintptr(libc.PostIncUint16(&*(*uint16)(unsafe.Pointer(bp + 32 + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2)), 1))*2)) = uint16(sym) 13835 } 13836 } 13837 13838 // 13839 // Create and fill in decoding tables. In this loop, the table being 13840 // filled is at next and has curr index bits. The code being used is huff 13841 // with length len. That code is converted to an index by dropping drop 13842 // bits off of the bottom. For codes where len is less than drop + curr, 13843 // those top drop + curr - len bits are incremented through all values to 13844 // fill the table with replicated entries. 13845 // 13846 // root is the number of index bits for the root table. When len exceeds 13847 // root, sub-tables are created pointed to by the root entry with an index 13848 // of the low root bits of huff. This is saved in low to check for when a 13849 // new sub-table should be started. drop is zero when the root table is 13850 // being filled, and drop is root when sub-tables are being filled. 13851 // 13852 // When a new sub-table is needed, it is necessary to look ahead in the 13853 // code lengths to determine what size sub-table is needed. The length 13854 // counts are used for this, and so count[] is decremented as codes are 13855 // entered in the tables. 13856 // 13857 // used keeps track of how many table entries have been allocated from the 13858 // provided *table space. It is checked for LENS and DIST tables against 13859 // the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in 13860 // the initial root table size constants. See the comments in inftrees.h 13861 // for more information. 13862 // 13863 // sym increments through all symbols, and the loop terminates when 13864 // all codes of length max, i.e. all codes, have been processed. This 13865 // routine permits incomplete codes, so another loop after this one fills 13866 // in the rest of the decoding tables with invalid code markers. 13867 // 13868 13869 // set up for code type 13870 switch type1 { 13871 case CODES: 13872 base = libc.AssignUintptr(&extra, work) // dummy value--not used 13873 match = uint32(20) 13874 break 13875 case LENS: 13876 base = uintptr(unsafe.Pointer(&lbase)) 13877 extra = uintptr(unsafe.Pointer(&lext)) 13878 match = uint32(257) 13879 break 13880 default: // DISTS 13881 base = uintptr(unsafe.Pointer(&dbase)) 13882 extra = uintptr(unsafe.Pointer(&dext)) 13883 match = uint32(0) 13884 } 13885 13886 // initialize state for loop 13887 huff = uint32(0) // starting code 13888 sym = uint32(0) // starting code symbol 13889 len = min // starting code length 13890 next = *(*uintptr)(unsafe.Pointer(table)) // current table to fill in 13891 curr = root // current table index bits 13892 drop = uint32(0) // current bits to drop from code for index 13893 low = libc.Uint32(libc.Uint32FromInt32(-1)) // trigger new sub-table when len > root 13894 used = uint32(1) << root // use root table entries 13895 mask = used - uint32(1) // mask for comparing low 13896 13897 // check available table space 13898 if type1 == LENS && used > uint32(ENOUGH_LENS) || type1 == DISTS && used > uint32(ENOUGH_DISTS) { 13899 return 1 13900 } 13901 13902 // process all codes and make table entries 13903 for { 13904 // create table entry 13905 here.Fbits = uint8(len - drop) 13906 if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))+1 < match { 13907 here.Fop = uint8(0) 13908 here.Fval = *(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)) 13909 } else if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) >= match { 13910 here.Fop = uint8(*(*uint16)(unsafe.Pointer(extra + uintptr(uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match)*2))) 13911 here.Fval = *(*uint16)(unsafe.Pointer(base + uintptr(uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match)*2)) 13912 } else { 13913 here.Fop = uint8(32 + 64) // end of block 13914 here.Fval = uint16(0) 13915 } 13916 13917 // replicate for those indices with low len bits equal to huff 13918 incr = uint32(1) << (len - drop) 13919 fill = uint32(1) << curr 13920 min = fill // save offset to next table 13921 for __ccgo := true; __ccgo; __ccgo = fill != uint32(0) { 13922 fill = fill - incr 13923 *(*Code)(unsafe.Pointer(next + uintptr(huff>>drop+fill)*4)) = here 13924 } 13925 13926 // backwards increment the len-bit code huff 13927 incr = uint32(1) << (len - uint32(1)) 13928 for huff&incr != 0 { 13929 incr >>= 1 13930 } 13931 if incr != uint32(0) { 13932 huff = huff & (incr - uint32(1)) 13933 huff = huff + incr 13934 } else { 13935 huff = uint32(0) 13936 } 13937 13938 // go to next symbol, update count, len 13939 sym++ 13940 if int32(libc.PreDecUint16(&*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)), 1)) == 0 { 13941 if len == max { 13942 break 13943 } 13944 len = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2))) 13945 } 13946 13947 // create new sub-table if needed 13948 if len > root && huff&mask != low { 13949 // if first time, transition to sub-tables 13950 if drop == uint32(0) { 13951 drop = root 13952 } 13953 13954 // increment past last table 13955 next += 4 * uintptr(min) // here min is 1 << curr 13956 13957 // determine length of next table 13958 curr = len - drop 13959 left = int32(1) << curr 13960 for curr+drop < max { 13961 left = left - int32(*(*uint16)(unsafe.Pointer(bp + uintptr(curr+drop)*2))) 13962 if left <= 0 { 13963 break 13964 } 13965 curr++ 13966 left <<= 1 13967 } 13968 13969 // check for enough space 13970 used = used + uint32(1)<<curr 13971 if type1 == LENS && used > uint32(ENOUGH_LENS) || type1 == DISTS && used > uint32(ENOUGH_DISTS) { 13972 return 1 13973 } 13974 13975 // point entry in root table to sub-table 13976 low = huff & mask 13977 (*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fop = uint8(curr) 13978 (*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fbits = uint8(root) 13979 (*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fval = uint16((int64(next) - int64(*(*uintptr)(unsafe.Pointer(table)))) / 4) 13980 } 13981 } 13982 13983 // fill in remaining table entry if code is incomplete (guaranteed to have 13984 // at most one remaining entry, since if the code is incomplete, the 13985 // maximum code length that was allowed to get this far is one bit) 13986 if huff != uint32(0) { 13987 here.Fop = uint8(64) // invalid code marker 13988 here.Fbits = uint8(len - drop) 13989 here.Fval = uint16(0) 13990 *(*Code)(unsafe.Pointer(next + uintptr(huff)*4)) = here 13991 } 13992 13993 // set return parameters 13994 *(*uintptr)(unsafe.Pointer(table)) += uintptr(used) * 4 13995 *(*uint32)(unsafe.Pointer(bits)) = root 13996 return 0 13997 } 13998 13999 var lbase = [31]uint16{ // Length codes 257..285 base 14000 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), 14001 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 */ 14002 var lext = [31]uint16{ // Length codes 257..285 extra 14003 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), 14004 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 */ 14005 var dbase = [32]uint16{ // Distance codes 0..29 base 14006 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), 14007 uint16(257), uint16(385), uint16(513), uint16(769), uint16(1025), uint16(1537), uint16(2049), uint16(3073), uint16(4097), uint16(6145), 14008 uint16(8193), uint16(12289), uint16(16385), uint16(24577), uint16(0), uint16(0)} /* inftrees.c:66:33 */ 14009 var dext = [32]uint16{ // Distance codes 0..29 extra 14010 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), 14011 uint16(23), uint16(23), uint16(24), uint16(24), uint16(25), uint16(25), uint16(26), uint16(26), uint16(27), uint16(27), 14012 uint16(28), uint16(28), uint16(29), uint16(29), uint16(64), uint16(64)} /* inftrees.c:70:33 */ 14013 14014 type Static_tree_desc = Static_tree_desc_s /* deflate.h:84:36 */ 14015 14016 // =========================================================================== 14017 // Constants 14018 14019 // Bit length codes must not exceed MAX_BL_BITS bits 14020 14021 // end of block literal code 14022 14023 // repeat previous bit length 3-6 times (2 bits of repeat count) 14024 14025 // repeat a zero length 3-10 times (3 bits of repeat count) 14026 14027 // repeat a zero length 11-138 times (7 bits of repeat count) 14028 14029 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 */ 14030 14031 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 */ 14032 14033 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 */ 14034 14035 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 */ 14036 // The lengths of the bit length codes are sent in order of decreasing 14037 // probability, to avoid transmitting the lengths for unused bit length codes. 14038 14039 // =========================================================================== 14040 // Local data. These are initialized only once. 14041 14042 // header created automatically with -DGEN_TREES_H 14043 14044 var static_ltree = [288]Ct_data{{Ffc: func() (r struct{ Ffreq Ush }) { 14045 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 14046 return r 14047 }(), Fdl: func() (r struct{ Fdad Ush }) { 14048 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14049 return r 14050 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14051 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(140) 14052 return r 14053 }(), Fdl: func() (r struct{ Fdad Ush }) { 14054 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14055 return r 14056 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14057 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(76) 14058 return r 14059 }(), Fdl: func() (r struct{ Fdad Ush }) { 14060 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14061 return r 14062 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14063 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(204) 14064 return r 14065 }(), Fdl: func() (r struct{ Fdad Ush }) { 14066 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14067 return r 14068 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14069 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(44) 14070 return r 14071 }(), Fdl: func() (r struct{ Fdad Ush }) { 14072 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14073 return r 14074 }()}, 14075 {Ffc: func() (r struct{ Ffreq Ush }) { 14076 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(172) 14077 return r 14078 }(), Fdl: func() (r struct{ Fdad Ush }) { 14079 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14080 return r 14081 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14082 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(108) 14083 return r 14084 }(), Fdl: func() (r struct{ Fdad Ush }) { 14085 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14086 return r 14087 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14088 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(236) 14089 return r 14090 }(), Fdl: func() (r struct{ Fdad Ush }) { 14091 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14092 return r 14093 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14094 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 14095 return r 14096 }(), Fdl: func() (r struct{ Fdad Ush }) { 14097 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14098 return r 14099 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14100 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(156) 14101 return r 14102 }(), Fdl: func() (r struct{ Fdad Ush }) { 14103 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14104 return r 14105 }()}, 14106 {Ffc: func() (r struct{ Ffreq Ush }) { 14107 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(92) 14108 return r 14109 }(), Fdl: func() (r struct{ Fdad Ush }) { 14110 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14111 return r 14112 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14113 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(220) 14114 return r 14115 }(), Fdl: func() (r struct{ Fdad Ush }) { 14116 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14117 return r 14118 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14119 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(60) 14120 return r 14121 }(), Fdl: func() (r struct{ Fdad Ush }) { 14122 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14123 return r 14124 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14125 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(188) 14126 return r 14127 }(), Fdl: func() (r struct{ Fdad Ush }) { 14128 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14129 return r 14130 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14131 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(124) 14132 return r 14133 }(), Fdl: func() (r struct{ Fdad Ush }) { 14134 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14135 return r 14136 }()}, 14137 {Ffc: func() (r struct{ Ffreq Ush }) { 14138 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(252) 14139 return r 14140 }(), Fdl: func() (r struct{ Fdad Ush }) { 14141 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14142 return r 14143 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14144 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 14145 return r 14146 }(), Fdl: func() (r struct{ Fdad Ush }) { 14147 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14148 return r 14149 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14150 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(130) 14151 return r 14152 }(), Fdl: func() (r struct{ Fdad Ush }) { 14153 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14154 return r 14155 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14156 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(66) 14157 return r 14158 }(), Fdl: func() (r struct{ Fdad Ush }) { 14159 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14160 return r 14161 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14162 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(194) 14163 return r 14164 }(), Fdl: func() (r struct{ Fdad Ush }) { 14165 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14166 return r 14167 }()}, 14168 {Ffc: func() (r struct{ Ffreq Ush }) { 14169 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(34) 14170 return r 14171 }(), Fdl: func() (r struct{ Fdad Ush }) { 14172 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14173 return r 14174 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14175 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(162) 14176 return r 14177 }(), Fdl: func() (r struct{ Fdad Ush }) { 14178 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14179 return r 14180 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14181 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(98) 14182 return r 14183 }(), Fdl: func() (r struct{ Fdad Ush }) { 14184 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14185 return r 14186 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14187 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(226) 14188 return r 14189 }(), Fdl: func() (r struct{ Fdad Ush }) { 14190 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14191 return r 14192 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14193 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 14194 return r 14195 }(), Fdl: func() (r struct{ Fdad Ush }) { 14196 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14197 return r 14198 }()}, 14199 {Ffc: func() (r struct{ Ffreq Ush }) { 14200 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(146) 14201 return r 14202 }(), Fdl: func() (r struct{ Fdad Ush }) { 14203 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14204 return r 14205 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14206 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(82) 14207 return r 14208 }(), Fdl: func() (r struct{ Fdad Ush }) { 14209 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14210 return r 14211 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14212 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(210) 14213 return r 14214 }(), Fdl: func() (r struct{ Fdad Ush }) { 14215 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14216 return r 14217 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14218 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(50) 14219 return r 14220 }(), Fdl: func() (r struct{ Fdad Ush }) { 14221 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14222 return r 14223 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14224 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(178) 14225 return r 14226 }(), Fdl: func() (r struct{ Fdad Ush }) { 14227 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14228 return r 14229 }()}, 14230 {Ffc: func() (r struct{ Ffreq Ush }) { 14231 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(114) 14232 return r 14233 }(), Fdl: func() (r struct{ Fdad Ush }) { 14234 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14235 return r 14236 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14237 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(242) 14238 return r 14239 }(), Fdl: func() (r struct{ Fdad Ush }) { 14240 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14241 return r 14242 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14243 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 14244 return r 14245 }(), Fdl: func() (r struct{ Fdad Ush }) { 14246 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14247 return r 14248 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14249 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(138) 14250 return r 14251 }(), Fdl: func() (r struct{ Fdad Ush }) { 14252 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14253 return r 14254 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14255 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(74) 14256 return r 14257 }(), Fdl: func() (r struct{ Fdad Ush }) { 14258 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14259 return r 14260 }()}, 14261 {Ffc: func() (r struct{ Ffreq Ush }) { 14262 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(202) 14263 return r 14264 }(), Fdl: func() (r struct{ Fdad Ush }) { 14265 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14266 return r 14267 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14268 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(42) 14269 return r 14270 }(), Fdl: func() (r struct{ Fdad Ush }) { 14271 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14272 return r 14273 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14274 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(170) 14275 return r 14276 }(), Fdl: func() (r struct{ Fdad Ush }) { 14277 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14278 return r 14279 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14280 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(106) 14281 return r 14282 }(), Fdl: func() (r struct{ Fdad Ush }) { 14283 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14284 return r 14285 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14286 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(234) 14287 return r 14288 }(), Fdl: func() (r struct{ Fdad Ush }) { 14289 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14290 return r 14291 }()}, 14292 {Ffc: func() (r struct{ Ffreq Ush }) { 14293 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 14294 return r 14295 }(), Fdl: func() (r struct{ Fdad Ush }) { 14296 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14297 return r 14298 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14299 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(154) 14300 return r 14301 }(), Fdl: func() (r struct{ Fdad Ush }) { 14302 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14303 return r 14304 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14305 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(90) 14306 return r 14307 }(), Fdl: func() (r struct{ Fdad Ush }) { 14308 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14309 return r 14310 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14311 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(218) 14312 return r 14313 }(), Fdl: func() (r struct{ Fdad Ush }) { 14314 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14315 return r 14316 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14317 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(58) 14318 return r 14319 }(), Fdl: func() (r struct{ Fdad Ush }) { 14320 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14321 return r 14322 }()}, 14323 {Ffc: func() (r struct{ Ffreq Ush }) { 14324 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(186) 14325 return r 14326 }(), Fdl: func() (r struct{ Fdad Ush }) { 14327 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14328 return r 14329 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14330 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(122) 14331 return r 14332 }(), Fdl: func() (r struct{ Fdad Ush }) { 14333 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14334 return r 14335 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14336 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(250) 14337 return r 14338 }(), Fdl: func() (r struct{ Fdad Ush }) { 14339 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14340 return r 14341 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14342 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 14343 return r 14344 }(), Fdl: func() (r struct{ Fdad Ush }) { 14345 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14346 return r 14347 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14348 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(134) 14349 return r 14350 }(), Fdl: func() (r struct{ Fdad Ush }) { 14351 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14352 return r 14353 }()}, 14354 {Ffc: func() (r struct{ Ffreq Ush }) { 14355 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(70) 14356 return r 14357 }(), Fdl: func() (r struct{ Fdad Ush }) { 14358 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14359 return r 14360 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14361 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(198) 14362 return r 14363 }(), Fdl: func() (r struct{ Fdad Ush }) { 14364 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14365 return r 14366 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14367 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(38) 14368 return r 14369 }(), Fdl: func() (r struct{ Fdad Ush }) { 14370 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14371 return r 14372 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14373 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(166) 14374 return r 14375 }(), Fdl: func() (r struct{ Fdad Ush }) { 14376 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14377 return r 14378 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14379 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(102) 14380 return r 14381 }(), Fdl: func() (r struct{ Fdad Ush }) { 14382 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14383 return r 14384 }()}, 14385 {Ffc: func() (r struct{ Ffreq Ush }) { 14386 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(230) 14387 return r 14388 }(), Fdl: func() (r struct{ Fdad Ush }) { 14389 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14390 return r 14391 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14392 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 14393 return r 14394 }(), Fdl: func() (r struct{ Fdad Ush }) { 14395 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14396 return r 14397 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14398 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(150) 14399 return r 14400 }(), Fdl: func() (r struct{ Fdad Ush }) { 14401 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14402 return r 14403 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14404 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(86) 14405 return r 14406 }(), Fdl: func() (r struct{ Fdad Ush }) { 14407 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14408 return r 14409 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14410 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(214) 14411 return r 14412 }(), Fdl: func() (r struct{ Fdad Ush }) { 14413 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14414 return r 14415 }()}, 14416 {Ffc: func() (r struct{ Ffreq Ush }) { 14417 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(54) 14418 return r 14419 }(), Fdl: func() (r struct{ Fdad Ush }) { 14420 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14421 return r 14422 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14423 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(182) 14424 return r 14425 }(), Fdl: func() (r struct{ Fdad Ush }) { 14426 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14427 return r 14428 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14429 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(118) 14430 return r 14431 }(), Fdl: func() (r struct{ Fdad Ush }) { 14432 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14433 return r 14434 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14435 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(246) 14436 return r 14437 }(), Fdl: func() (r struct{ Fdad Ush }) { 14438 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14439 return r 14440 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14441 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 14442 return r 14443 }(), Fdl: func() (r struct{ Fdad Ush }) { 14444 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14445 return r 14446 }()}, 14447 {Ffc: func() (r struct{ Ffreq Ush }) { 14448 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(142) 14449 return r 14450 }(), Fdl: func() (r struct{ Fdad Ush }) { 14451 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14452 return r 14453 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14454 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(78) 14455 return r 14456 }(), Fdl: func() (r struct{ Fdad Ush }) { 14457 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14458 return r 14459 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14460 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(206) 14461 return r 14462 }(), Fdl: func() (r struct{ Fdad Ush }) { 14463 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14464 return r 14465 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14466 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(46) 14467 return r 14468 }(), Fdl: func() (r struct{ Fdad Ush }) { 14469 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14470 return r 14471 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14472 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(174) 14473 return r 14474 }(), Fdl: func() (r struct{ Fdad Ush }) { 14475 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14476 return r 14477 }()}, 14478 {Ffc: func() (r struct{ Ffreq Ush }) { 14479 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(110) 14480 return r 14481 }(), Fdl: func() (r struct{ Fdad Ush }) { 14482 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14483 return r 14484 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14485 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(238) 14486 return r 14487 }(), Fdl: func() (r struct{ Fdad Ush }) { 14488 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14489 return r 14490 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14491 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 14492 return r 14493 }(), Fdl: func() (r struct{ Fdad Ush }) { 14494 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14495 return r 14496 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14497 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(158) 14498 return r 14499 }(), Fdl: func() (r struct{ Fdad Ush }) { 14500 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14501 return r 14502 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14503 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(94) 14504 return r 14505 }(), Fdl: func() (r struct{ Fdad Ush }) { 14506 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14507 return r 14508 }()}, 14509 {Ffc: func() (r struct{ Ffreq Ush }) { 14510 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(222) 14511 return r 14512 }(), Fdl: func() (r struct{ Fdad Ush }) { 14513 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14514 return r 14515 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14516 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(62) 14517 return r 14518 }(), Fdl: func() (r struct{ Fdad Ush }) { 14519 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14520 return r 14521 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14522 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(190) 14523 return r 14524 }(), Fdl: func() (r struct{ Fdad Ush }) { 14525 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14526 return r 14527 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14528 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(126) 14529 return r 14530 }(), Fdl: func() (r struct{ Fdad Ush }) { 14531 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14532 return r 14533 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14534 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(254) 14535 return r 14536 }(), Fdl: func() (r struct{ Fdad Ush }) { 14537 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14538 return r 14539 }()}, 14540 {Ffc: func() (r struct{ Ffreq Ush }) { 14541 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 14542 return r 14543 }(), Fdl: func() (r struct{ Fdad Ush }) { 14544 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14545 return r 14546 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14547 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(129) 14548 return r 14549 }(), Fdl: func() (r struct{ Fdad Ush }) { 14550 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14551 return r 14552 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14553 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(65) 14554 return r 14555 }(), Fdl: func() (r struct{ Fdad Ush }) { 14556 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14557 return r 14558 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14559 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(193) 14560 return r 14561 }(), Fdl: func() (r struct{ Fdad Ush }) { 14562 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14563 return r 14564 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14565 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(33) 14566 return r 14567 }(), Fdl: func() (r struct{ Fdad Ush }) { 14568 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14569 return r 14570 }()}, 14571 {Ffc: func() (r struct{ Ffreq Ush }) { 14572 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(161) 14573 return r 14574 }(), Fdl: func() (r struct{ Fdad Ush }) { 14575 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14576 return r 14577 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14578 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(97) 14579 return r 14580 }(), Fdl: func() (r struct{ Fdad Ush }) { 14581 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14582 return r 14583 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14584 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(225) 14585 return r 14586 }(), Fdl: func() (r struct{ Fdad Ush }) { 14587 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14588 return r 14589 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14590 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 14591 return r 14592 }(), Fdl: func() (r struct{ Fdad Ush }) { 14593 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14594 return r 14595 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14596 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(145) 14597 return r 14598 }(), Fdl: func() (r struct{ Fdad Ush }) { 14599 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14600 return r 14601 }()}, 14602 {Ffc: func() (r struct{ Ffreq Ush }) { 14603 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(81) 14604 return r 14605 }(), Fdl: func() (r struct{ Fdad Ush }) { 14606 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14607 return r 14608 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14609 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(209) 14610 return r 14611 }(), Fdl: func() (r struct{ Fdad Ush }) { 14612 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14613 return r 14614 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14615 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(49) 14616 return r 14617 }(), Fdl: func() (r struct{ Fdad Ush }) { 14618 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14619 return r 14620 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14621 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(177) 14622 return r 14623 }(), Fdl: func() (r struct{ Fdad Ush }) { 14624 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14625 return r 14626 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14627 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(113) 14628 return r 14629 }(), Fdl: func() (r struct{ Fdad Ush }) { 14630 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14631 return r 14632 }()}, 14633 {Ffc: func() (r struct{ Ffreq Ush }) { 14634 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(241) 14635 return r 14636 }(), Fdl: func() (r struct{ Fdad Ush }) { 14637 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14638 return r 14639 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14640 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14641 return r 14642 }(), Fdl: func() (r struct{ Fdad Ush }) { 14643 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14644 return r 14645 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14646 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(137) 14647 return r 14648 }(), Fdl: func() (r struct{ Fdad Ush }) { 14649 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14650 return r 14651 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14652 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(73) 14653 return r 14654 }(), Fdl: func() (r struct{ Fdad Ush }) { 14655 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14656 return r 14657 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14658 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(201) 14659 return r 14660 }(), Fdl: func() (r struct{ Fdad Ush }) { 14661 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14662 return r 14663 }()}, 14664 {Ffc: func() (r struct{ Ffreq Ush }) { 14665 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(41) 14666 return r 14667 }(), Fdl: func() (r struct{ Fdad Ush }) { 14668 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14669 return r 14670 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14671 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(169) 14672 return r 14673 }(), Fdl: func() (r struct{ Fdad Ush }) { 14674 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14675 return r 14676 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14677 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(105) 14678 return r 14679 }(), Fdl: func() (r struct{ Fdad Ush }) { 14680 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14681 return r 14682 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14683 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(233) 14684 return r 14685 }(), Fdl: func() (r struct{ Fdad Ush }) { 14686 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14687 return r 14688 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14689 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 14690 return r 14691 }(), Fdl: func() (r struct{ Fdad Ush }) { 14692 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14693 return r 14694 }()}, 14695 {Ffc: func() (r struct{ Ffreq Ush }) { 14696 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(153) 14697 return r 14698 }(), Fdl: func() (r struct{ Fdad Ush }) { 14699 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14700 return r 14701 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14702 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(89) 14703 return r 14704 }(), Fdl: func() (r struct{ Fdad Ush }) { 14705 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14706 return r 14707 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14708 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(217) 14709 return r 14710 }(), Fdl: func() (r struct{ Fdad Ush }) { 14711 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14712 return r 14713 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14714 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(57) 14715 return r 14716 }(), Fdl: func() (r struct{ Fdad Ush }) { 14717 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14718 return r 14719 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14720 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(185) 14721 return r 14722 }(), Fdl: func() (r struct{ Fdad Ush }) { 14723 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14724 return r 14725 }()}, 14726 {Ffc: func() (r struct{ Ffreq Ush }) { 14727 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(121) 14728 return r 14729 }(), Fdl: func() (r struct{ Fdad Ush }) { 14730 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14731 return r 14732 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14733 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(249) 14734 return r 14735 }(), Fdl: func() (r struct{ Fdad Ush }) { 14736 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14737 return r 14738 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14739 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 14740 return r 14741 }(), Fdl: func() (r struct{ Fdad Ush }) { 14742 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14743 return r 14744 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14745 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(133) 14746 return r 14747 }(), Fdl: func() (r struct{ Fdad Ush }) { 14748 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14749 return r 14750 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14751 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(69) 14752 return r 14753 }(), Fdl: func() (r struct{ Fdad Ush }) { 14754 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14755 return r 14756 }()}, 14757 {Ffc: func() (r struct{ Ffreq Ush }) { 14758 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(197) 14759 return r 14760 }(), Fdl: func() (r struct{ Fdad Ush }) { 14761 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14762 return r 14763 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14764 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(37) 14765 return r 14766 }(), Fdl: func() (r struct{ Fdad Ush }) { 14767 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14768 return r 14769 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14770 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(165) 14771 return r 14772 }(), Fdl: func() (r struct{ Fdad Ush }) { 14773 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14774 return r 14775 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14776 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(101) 14777 return r 14778 }(), Fdl: func() (r struct{ Fdad Ush }) { 14779 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14780 return r 14781 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14782 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(229) 14783 return r 14784 }(), Fdl: func() (r struct{ Fdad Ush }) { 14785 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14786 return r 14787 }()}, 14788 {Ffc: func() (r struct{ Ffreq Ush }) { 14789 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 14790 return r 14791 }(), Fdl: func() (r struct{ Fdad Ush }) { 14792 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14793 return r 14794 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14795 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(149) 14796 return r 14797 }(), Fdl: func() (r struct{ Fdad Ush }) { 14798 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14799 return r 14800 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14801 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(85) 14802 return r 14803 }(), Fdl: func() (r struct{ Fdad Ush }) { 14804 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14805 return r 14806 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14807 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(213) 14808 return r 14809 }(), Fdl: func() (r struct{ Fdad Ush }) { 14810 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14811 return r 14812 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14813 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(53) 14814 return r 14815 }(), Fdl: func() (r struct{ Fdad Ush }) { 14816 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14817 return r 14818 }()}, 14819 {Ffc: func() (r struct{ Ffreq Ush }) { 14820 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(181) 14821 return r 14822 }(), Fdl: func() (r struct{ Fdad Ush }) { 14823 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14824 return r 14825 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14826 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(117) 14827 return r 14828 }(), Fdl: func() (r struct{ Fdad Ush }) { 14829 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14830 return r 14831 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14832 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(245) 14833 return r 14834 }(), Fdl: func() (r struct{ Fdad Ush }) { 14835 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14836 return r 14837 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14838 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 14839 return r 14840 }(), Fdl: func() (r struct{ Fdad Ush }) { 14841 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14842 return r 14843 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14844 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(141) 14845 return r 14846 }(), Fdl: func() (r struct{ Fdad Ush }) { 14847 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14848 return r 14849 }()}, 14850 {Ffc: func() (r struct{ Ffreq Ush }) { 14851 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(77) 14852 return r 14853 }(), Fdl: func() (r struct{ Fdad Ush }) { 14854 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14855 return r 14856 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14857 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(205) 14858 return r 14859 }(), Fdl: func() (r struct{ Fdad Ush }) { 14860 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14861 return r 14862 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14863 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(45) 14864 return r 14865 }(), Fdl: func() (r struct{ Fdad Ush }) { 14866 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14867 return r 14868 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14869 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(173) 14870 return r 14871 }(), Fdl: func() (r struct{ Fdad Ush }) { 14872 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14873 return r 14874 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14875 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(109) 14876 return r 14877 }(), Fdl: func() (r struct{ Fdad Ush }) { 14878 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14879 return r 14880 }()}, 14881 {Ffc: func() (r struct{ Ffreq Ush }) { 14882 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(237) 14883 return r 14884 }(), Fdl: func() (r struct{ Fdad Ush }) { 14885 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14886 return r 14887 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14888 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 14889 return r 14890 }(), Fdl: func() (r struct{ Fdad Ush }) { 14891 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14892 return r 14893 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14894 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(157) 14895 return r 14896 }(), Fdl: func() (r struct{ Fdad Ush }) { 14897 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14898 return r 14899 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14900 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(93) 14901 return r 14902 }(), Fdl: func() (r struct{ Fdad Ush }) { 14903 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14904 return r 14905 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14906 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(221) 14907 return r 14908 }(), Fdl: func() (r struct{ Fdad Ush }) { 14909 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14910 return r 14911 }()}, 14912 {Ffc: func() (r struct{ Ffreq Ush }) { 14913 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(61) 14914 return r 14915 }(), Fdl: func() (r struct{ Fdad Ush }) { 14916 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14917 return r 14918 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14919 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(189) 14920 return r 14921 }(), Fdl: func() (r struct{ Fdad Ush }) { 14922 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14923 return r 14924 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14925 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(125) 14926 return r 14927 }(), Fdl: func() (r struct{ Fdad Ush }) { 14928 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14929 return r 14930 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14931 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(253) 14932 return r 14933 }(), Fdl: func() (r struct{ Fdad Ush }) { 14934 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 14935 return r 14936 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14937 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 14938 return r 14939 }(), Fdl: func() (r struct{ Fdad Ush }) { 14940 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14941 return r 14942 }()}, 14943 {Ffc: func() (r struct{ Ffreq Ush }) { 14944 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(275) 14945 return r 14946 }(), Fdl: func() (r struct{ Fdad Ush }) { 14947 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14948 return r 14949 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14950 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(147) 14951 return r 14952 }(), Fdl: func() (r struct{ Fdad Ush }) { 14953 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14954 return r 14955 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14956 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(403) 14957 return r 14958 }(), Fdl: func() (r struct{ Fdad Ush }) { 14959 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14960 return r 14961 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14962 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(83) 14963 return r 14964 }(), Fdl: func() (r struct{ Fdad Ush }) { 14965 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14966 return r 14967 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14968 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(339) 14969 return r 14970 }(), Fdl: func() (r struct{ Fdad Ush }) { 14971 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14972 return r 14973 }()}, 14974 {Ffc: func() (r struct{ Ffreq Ush }) { 14975 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(211) 14976 return r 14977 }(), Fdl: func() (r struct{ Fdad Ush }) { 14978 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14979 return r 14980 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14981 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(467) 14982 return r 14983 }(), Fdl: func() (r struct{ Fdad Ush }) { 14984 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14985 return r 14986 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14987 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(51) 14988 return r 14989 }(), Fdl: func() (r struct{ Fdad Ush }) { 14990 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14991 return r 14992 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14993 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(307) 14994 return r 14995 }(), Fdl: func() (r struct{ Fdad Ush }) { 14996 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 14997 return r 14998 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 14999 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(179) 15000 return r 15001 }(), Fdl: func() (r struct{ Fdad Ush }) { 15002 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15003 return r 15004 }()}, 15005 {Ffc: func() (r struct{ Ffreq Ush }) { 15006 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(435) 15007 return r 15008 }(), Fdl: func() (r struct{ Fdad Ush }) { 15009 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15010 return r 15011 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15012 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(115) 15013 return r 15014 }(), Fdl: func() (r struct{ Fdad Ush }) { 15015 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15016 return r 15017 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15018 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(371) 15019 return r 15020 }(), Fdl: func() (r struct{ Fdad Ush }) { 15021 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15022 return r 15023 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15024 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(243) 15025 return r 15026 }(), Fdl: func() (r struct{ Fdad Ush }) { 15027 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15028 return r 15029 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15030 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(499) 15031 return r 15032 }(), Fdl: func() (r struct{ Fdad Ush }) { 15033 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15034 return r 15035 }()}, 15036 {Ffc: func() (r struct{ Ffreq Ush }) { 15037 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 15038 return r 15039 }(), Fdl: func() (r struct{ Fdad Ush }) { 15040 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15041 return r 15042 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15043 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(267) 15044 return r 15045 }(), Fdl: func() (r struct{ Fdad Ush }) { 15046 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15047 return r 15048 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15049 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(139) 15050 return r 15051 }(), Fdl: func() (r struct{ Fdad Ush }) { 15052 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15053 return r 15054 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15055 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(395) 15056 return r 15057 }(), Fdl: func() (r struct{ Fdad Ush }) { 15058 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15059 return r 15060 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15061 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(75) 15062 return r 15063 }(), Fdl: func() (r struct{ Fdad Ush }) { 15064 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15065 return r 15066 }()}, 15067 {Ffc: func() (r struct{ Ffreq Ush }) { 15068 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(331) 15069 return r 15070 }(), Fdl: func() (r struct{ Fdad Ush }) { 15071 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15072 return r 15073 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15074 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(203) 15075 return r 15076 }(), Fdl: func() (r struct{ Fdad Ush }) { 15077 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15078 return r 15079 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15080 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(459) 15081 return r 15082 }(), Fdl: func() (r struct{ Fdad Ush }) { 15083 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15084 return r 15085 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15086 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(43) 15087 return r 15088 }(), Fdl: func() (r struct{ Fdad Ush }) { 15089 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15090 return r 15091 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15092 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(299) 15093 return r 15094 }(), Fdl: func() (r struct{ Fdad Ush }) { 15095 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15096 return r 15097 }()}, 15098 {Ffc: func() (r struct{ Ffreq Ush }) { 15099 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(171) 15100 return r 15101 }(), Fdl: func() (r struct{ Fdad Ush }) { 15102 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15103 return r 15104 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15105 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(427) 15106 return r 15107 }(), Fdl: func() (r struct{ Fdad Ush }) { 15108 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15109 return r 15110 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15111 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(107) 15112 return r 15113 }(), Fdl: func() (r struct{ Fdad Ush }) { 15114 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15115 return r 15116 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15117 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(363) 15118 return r 15119 }(), Fdl: func() (r struct{ Fdad Ush }) { 15120 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15121 return r 15122 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15123 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(235) 15124 return r 15125 }(), Fdl: func() (r struct{ Fdad Ush }) { 15126 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15127 return r 15128 }()}, 15129 {Ffc: func() (r struct{ Ffreq Ush }) { 15130 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(491) 15131 return r 15132 }(), Fdl: func() (r struct{ Fdad Ush }) { 15133 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15134 return r 15135 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15136 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 15137 return r 15138 }(), Fdl: func() (r struct{ Fdad Ush }) { 15139 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15140 return r 15141 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15142 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(283) 15143 return r 15144 }(), Fdl: func() (r struct{ Fdad Ush }) { 15145 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15146 return r 15147 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15148 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(155) 15149 return r 15150 }(), Fdl: func() (r struct{ Fdad Ush }) { 15151 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15152 return r 15153 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15154 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(411) 15155 return r 15156 }(), Fdl: func() (r struct{ Fdad Ush }) { 15157 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15158 return r 15159 }()}, 15160 {Ffc: func() (r struct{ Ffreq Ush }) { 15161 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(91) 15162 return r 15163 }(), Fdl: func() (r struct{ Fdad Ush }) { 15164 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15165 return r 15166 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15167 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(347) 15168 return r 15169 }(), Fdl: func() (r struct{ Fdad Ush }) { 15170 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15171 return r 15172 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15173 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(219) 15174 return r 15175 }(), Fdl: func() (r struct{ Fdad Ush }) { 15176 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15177 return r 15178 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15179 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(475) 15180 return r 15181 }(), Fdl: func() (r struct{ Fdad Ush }) { 15182 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15183 return r 15184 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15185 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(59) 15186 return r 15187 }(), Fdl: func() (r struct{ Fdad Ush }) { 15188 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15189 return r 15190 }()}, 15191 {Ffc: func() (r struct{ Ffreq Ush }) { 15192 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(315) 15193 return r 15194 }(), Fdl: func() (r struct{ Fdad Ush }) { 15195 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15196 return r 15197 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15198 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(187) 15199 return r 15200 }(), Fdl: func() (r struct{ Fdad Ush }) { 15201 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15202 return r 15203 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15204 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(443) 15205 return r 15206 }(), Fdl: func() (r struct{ Fdad Ush }) { 15207 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15208 return r 15209 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15210 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(123) 15211 return r 15212 }(), Fdl: func() (r struct{ Fdad Ush }) { 15213 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15214 return r 15215 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15216 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(379) 15217 return r 15218 }(), Fdl: func() (r struct{ Fdad Ush }) { 15219 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15220 return r 15221 }()}, 15222 {Ffc: func() (r struct{ Ffreq Ush }) { 15223 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(251) 15224 return r 15225 }(), Fdl: func() (r struct{ Fdad Ush }) { 15226 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15227 return r 15228 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15229 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(507) 15230 return r 15231 }(), Fdl: func() (r struct{ Fdad Ush }) { 15232 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15233 return r 15234 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15235 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15236 return r 15237 }(), Fdl: func() (r struct{ Fdad Ush }) { 15238 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15239 return r 15240 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15241 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(263) 15242 return r 15243 }(), Fdl: func() (r struct{ Fdad Ush }) { 15244 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15245 return r 15246 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15247 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(135) 15248 return r 15249 }(), Fdl: func() (r struct{ Fdad Ush }) { 15250 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15251 return r 15252 }()}, 15253 {Ffc: func() (r struct{ Ffreq Ush }) { 15254 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(391) 15255 return r 15256 }(), Fdl: func() (r struct{ Fdad Ush }) { 15257 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15258 return r 15259 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15260 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(71) 15261 return r 15262 }(), Fdl: func() (r struct{ Fdad Ush }) { 15263 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15264 return r 15265 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15266 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(327) 15267 return r 15268 }(), Fdl: func() (r struct{ Fdad Ush }) { 15269 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15270 return r 15271 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15272 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(199) 15273 return r 15274 }(), Fdl: func() (r struct{ Fdad Ush }) { 15275 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15276 return r 15277 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15278 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(455) 15279 return r 15280 }(), Fdl: func() (r struct{ Fdad Ush }) { 15281 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15282 return r 15283 }()}, 15284 {Ffc: func() (r struct{ Ffreq Ush }) { 15285 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(39) 15286 return r 15287 }(), Fdl: func() (r struct{ Fdad Ush }) { 15288 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15289 return r 15290 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15291 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(295) 15292 return r 15293 }(), Fdl: func() (r struct{ Fdad Ush }) { 15294 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15295 return r 15296 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15297 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(167) 15298 return r 15299 }(), Fdl: func() (r struct{ Fdad Ush }) { 15300 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15301 return r 15302 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15303 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(423) 15304 return r 15305 }(), Fdl: func() (r struct{ Fdad Ush }) { 15306 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15307 return r 15308 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15309 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(103) 15310 return r 15311 }(), Fdl: func() (r struct{ Fdad Ush }) { 15312 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15313 return r 15314 }()}, 15315 {Ffc: func() (r struct{ Ffreq Ush }) { 15316 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(359) 15317 return r 15318 }(), Fdl: func() (r struct{ Fdad Ush }) { 15319 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15320 return r 15321 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15322 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(231) 15323 return r 15324 }(), Fdl: func() (r struct{ Fdad Ush }) { 15325 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15326 return r 15327 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15328 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(487) 15329 return r 15330 }(), Fdl: func() (r struct{ Fdad Ush }) { 15331 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15332 return r 15333 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15334 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 15335 return r 15336 }(), Fdl: func() (r struct{ Fdad Ush }) { 15337 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15338 return r 15339 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15340 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(279) 15341 return r 15342 }(), Fdl: func() (r struct{ Fdad Ush }) { 15343 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15344 return r 15345 }()}, 15346 {Ffc: func() (r struct{ Ffreq Ush }) { 15347 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(151) 15348 return r 15349 }(), Fdl: func() (r struct{ Fdad Ush }) { 15350 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15351 return r 15352 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15353 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(407) 15354 return r 15355 }(), Fdl: func() (r struct{ Fdad Ush }) { 15356 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15357 return r 15358 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15359 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(87) 15360 return r 15361 }(), Fdl: func() (r struct{ Fdad Ush }) { 15362 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15363 return r 15364 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15365 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(343) 15366 return r 15367 }(), Fdl: func() (r struct{ Fdad Ush }) { 15368 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15369 return r 15370 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15371 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(215) 15372 return r 15373 }(), Fdl: func() (r struct{ Fdad Ush }) { 15374 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15375 return r 15376 }()}, 15377 {Ffc: func() (r struct{ Ffreq Ush }) { 15378 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(471) 15379 return r 15380 }(), Fdl: func() (r struct{ Fdad Ush }) { 15381 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15382 return r 15383 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15384 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(55) 15385 return r 15386 }(), Fdl: func() (r struct{ Fdad Ush }) { 15387 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15388 return r 15389 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15390 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(311) 15391 return r 15392 }(), Fdl: func() (r struct{ Fdad Ush }) { 15393 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15394 return r 15395 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15396 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(183) 15397 return r 15398 }(), Fdl: func() (r struct{ Fdad Ush }) { 15399 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15400 return r 15401 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15402 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(439) 15403 return r 15404 }(), Fdl: func() (r struct{ Fdad Ush }) { 15405 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15406 return r 15407 }()}, 15408 {Ffc: func() (r struct{ Ffreq Ush }) { 15409 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(119) 15410 return r 15411 }(), Fdl: func() (r struct{ Fdad Ush }) { 15412 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15413 return r 15414 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15415 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(375) 15416 return r 15417 }(), Fdl: func() (r struct{ Fdad Ush }) { 15418 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15419 return r 15420 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15421 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(247) 15422 return r 15423 }(), Fdl: func() (r struct{ Fdad Ush }) { 15424 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15425 return r 15426 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15427 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(503) 15428 return r 15429 }(), Fdl: func() (r struct{ Fdad Ush }) { 15430 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15431 return r 15432 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15433 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(15) 15434 return r 15435 }(), Fdl: func() (r struct{ Fdad Ush }) { 15436 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15437 return r 15438 }()}, 15439 {Ffc: func() (r struct{ Ffreq Ush }) { 15440 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(271) 15441 return r 15442 }(), Fdl: func() (r struct{ Fdad Ush }) { 15443 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15444 return r 15445 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15446 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(143) 15447 return r 15448 }(), Fdl: func() (r struct{ Fdad Ush }) { 15449 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15450 return r 15451 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15452 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(399) 15453 return r 15454 }(), Fdl: func() (r struct{ Fdad Ush }) { 15455 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15456 return r 15457 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15458 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(79) 15459 return r 15460 }(), Fdl: func() (r struct{ Fdad Ush }) { 15461 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15462 return r 15463 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15464 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(335) 15465 return r 15466 }(), Fdl: func() (r struct{ Fdad Ush }) { 15467 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15468 return r 15469 }()}, 15470 {Ffc: func() (r struct{ Ffreq Ush }) { 15471 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(207) 15472 return r 15473 }(), Fdl: func() (r struct{ Fdad Ush }) { 15474 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15475 return r 15476 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15477 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(463) 15478 return r 15479 }(), Fdl: func() (r struct{ Fdad Ush }) { 15480 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15481 return r 15482 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15483 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(47) 15484 return r 15485 }(), Fdl: func() (r struct{ Fdad Ush }) { 15486 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15487 return r 15488 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15489 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(303) 15490 return r 15491 }(), Fdl: func() (r struct{ Fdad Ush }) { 15492 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15493 return r 15494 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15495 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(175) 15496 return r 15497 }(), Fdl: func() (r struct{ Fdad Ush }) { 15498 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15499 return r 15500 }()}, 15501 {Ffc: func() (r struct{ Ffreq Ush }) { 15502 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(431) 15503 return r 15504 }(), Fdl: func() (r struct{ Fdad Ush }) { 15505 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15506 return r 15507 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15508 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(111) 15509 return r 15510 }(), Fdl: func() (r struct{ Fdad Ush }) { 15511 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15512 return r 15513 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15514 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(367) 15515 return r 15516 }(), Fdl: func() (r struct{ Fdad Ush }) { 15517 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15518 return r 15519 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15520 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(239) 15521 return r 15522 }(), Fdl: func() (r struct{ Fdad Ush }) { 15523 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15524 return r 15525 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15526 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(495) 15527 return r 15528 }(), Fdl: func() (r struct{ Fdad Ush }) { 15529 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15530 return r 15531 }()}, 15532 {Ffc: func() (r struct{ Ffreq Ush }) { 15533 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(31) 15534 return r 15535 }(), Fdl: func() (r struct{ Fdad Ush }) { 15536 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15537 return r 15538 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15539 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(287) 15540 return r 15541 }(), Fdl: func() (r struct{ Fdad Ush }) { 15542 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15543 return r 15544 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15545 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(159) 15546 return r 15547 }(), Fdl: func() (r struct{ Fdad Ush }) { 15548 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15549 return r 15550 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15551 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(415) 15552 return r 15553 }(), Fdl: func() (r struct{ Fdad Ush }) { 15554 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15555 return r 15556 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15557 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(95) 15558 return r 15559 }(), Fdl: func() (r struct{ Fdad Ush }) { 15560 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15561 return r 15562 }()}, 15563 {Ffc: func() (r struct{ Ffreq Ush }) { 15564 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(351) 15565 return r 15566 }(), Fdl: func() (r struct{ Fdad Ush }) { 15567 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15568 return r 15569 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15570 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(223) 15571 return r 15572 }(), Fdl: func() (r struct{ Fdad Ush }) { 15573 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15574 return r 15575 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15576 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(479) 15577 return r 15578 }(), Fdl: func() (r struct{ Fdad Ush }) { 15579 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15580 return r 15581 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15582 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(63) 15583 return r 15584 }(), Fdl: func() (r struct{ Fdad Ush }) { 15585 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15586 return r 15587 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15588 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(319) 15589 return r 15590 }(), Fdl: func() (r struct{ Fdad Ush }) { 15591 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15592 return r 15593 }()}, 15594 {Ffc: func() (r struct{ Ffreq Ush }) { 15595 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(191) 15596 return r 15597 }(), Fdl: func() (r struct{ Fdad Ush }) { 15598 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15599 return r 15600 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15601 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(447) 15602 return r 15603 }(), Fdl: func() (r struct{ Fdad Ush }) { 15604 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15605 return r 15606 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15607 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(127) 15608 return r 15609 }(), Fdl: func() (r struct{ Fdad Ush }) { 15610 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15611 return r 15612 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15613 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(383) 15614 return r 15615 }(), Fdl: func() (r struct{ Fdad Ush }) { 15616 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15617 return r 15618 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15619 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(255) 15620 return r 15621 }(), Fdl: func() (r struct{ Fdad Ush }) { 15622 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15623 return r 15624 }()}, 15625 {Ffc: func() (r struct{ Ffreq Ush }) { 15626 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(511) 15627 return r 15628 }(), Fdl: func() (r struct{ Fdad Ush }) { 15629 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15630 return r 15631 }()}, {Fdl: func() (r struct{ Fdad Ush }) { 15632 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15633 return r 15634 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15635 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(64) 15636 return r 15637 }(), Fdl: func() (r struct{ Fdad Ush }) { 15638 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15639 return r 15640 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15641 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(32) 15642 return r 15643 }(), Fdl: func() (r struct{ Fdad Ush }) { 15644 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15645 return r 15646 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15647 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(96) 15648 return r 15649 }(), Fdl: func() (r struct{ Fdad Ush }) { 15650 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15651 return r 15652 }()}, 15653 {Ffc: func() (r struct{ Ffreq Ush }) { 15654 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 15655 return r 15656 }(), Fdl: func() (r struct{ Fdad Ush }) { 15657 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15658 return r 15659 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15660 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(80) 15661 return r 15662 }(), Fdl: func() (r struct{ Fdad Ush }) { 15663 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15664 return r 15665 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15666 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(48) 15667 return r 15668 }(), Fdl: func() (r struct{ Fdad Ush }) { 15669 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15670 return r 15671 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15672 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(112) 15673 return r 15674 }(), Fdl: func() (r struct{ Fdad Ush }) { 15675 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15676 return r 15677 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15678 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15679 return r 15680 }(), Fdl: func() (r struct{ Fdad Ush }) { 15681 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15682 return r 15683 }()}, 15684 {Ffc: func() (r struct{ Ffreq Ush }) { 15685 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(72) 15686 return r 15687 }(), Fdl: func() (r struct{ Fdad Ush }) { 15688 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15689 return r 15690 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15691 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(40) 15692 return r 15693 }(), Fdl: func() (r struct{ Fdad Ush }) { 15694 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15695 return r 15696 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15697 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(104) 15698 return r 15699 }(), Fdl: func() (r struct{ Fdad Ush }) { 15700 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15701 return r 15702 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15703 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 15704 return r 15705 }(), Fdl: func() (r struct{ Fdad Ush }) { 15706 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15707 return r 15708 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15709 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(88) 15710 return r 15711 }(), Fdl: func() (r struct{ Fdad Ush }) { 15712 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15713 return r 15714 }()}, 15715 {Ffc: func() (r struct{ Ffreq Ush }) { 15716 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(56) 15717 return r 15718 }(), Fdl: func() (r struct{ Fdad Ush }) { 15719 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15720 return r 15721 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15722 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(120) 15723 return r 15724 }(), Fdl: func() (r struct{ Fdad Ush }) { 15725 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15726 return r 15727 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15728 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 15729 return r 15730 }(), Fdl: func() (r struct{ Fdad Ush }) { 15731 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15732 return r 15733 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15734 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(68) 15735 return r 15736 }(), Fdl: func() (r struct{ Fdad Ush }) { 15737 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15738 return r 15739 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15740 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(36) 15741 return r 15742 }(), Fdl: func() (r struct{ Fdad Ush }) { 15743 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15744 return r 15745 }()}, 15746 {Ffc: func() (r struct{ Ffreq Ush }) { 15747 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(100) 15748 return r 15749 }(), Fdl: func() (r struct{ Fdad Ush }) { 15750 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15751 return r 15752 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15753 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 15754 return r 15755 }(), Fdl: func() (r struct{ Fdad Ush }) { 15756 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15757 return r 15758 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15759 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(84) 15760 return r 15761 }(), Fdl: func() (r struct{ Fdad Ush }) { 15762 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15763 return r 15764 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15765 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(52) 15766 return r 15767 }(), Fdl: func() (r struct{ Fdad Ush }) { 15768 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15769 return r 15770 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15771 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(116) 15772 return r 15773 }(), Fdl: func() (r struct{ Fdad Ush }) { 15774 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 15775 return r 15776 }()}, 15777 {Ffc: func() (r struct{ Ffreq Ush }) { 15778 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 15779 return r 15780 }(), Fdl: func() (r struct{ Fdad Ush }) { 15781 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15782 return r 15783 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15784 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(131) 15785 return r 15786 }(), Fdl: func() (r struct{ Fdad Ush }) { 15787 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15788 return r 15789 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15790 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(67) 15791 return r 15792 }(), Fdl: func() (r struct{ Fdad Ush }) { 15793 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15794 return r 15795 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15796 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(195) 15797 return r 15798 }(), Fdl: func() (r struct{ Fdad Ush }) { 15799 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15800 return r 15801 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15802 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(35) 15803 return r 15804 }(), Fdl: func() (r struct{ Fdad Ush }) { 15805 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15806 return r 15807 }()}, 15808 {Ffc: func() (r struct{ Ffreq Ush }) { 15809 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(163) 15810 return r 15811 }(), Fdl: func() (r struct{ Fdad Ush }) { 15812 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15813 return r 15814 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15815 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(99) 15816 return r 15817 }(), Fdl: func() (r struct{ Fdad Ush }) { 15818 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15819 return r 15820 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15821 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(227) 15822 return r 15823 }(), Fdl: func() (r struct{ Fdad Ush }) { 15824 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15825 return r 15826 }()}} /* trees.h:3:21 */ 15827 15828 var static_dtree = [30]Ct_data{{Fdl: func() (r struct{ Fdad Ush }) { 15829 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15830 return r 15831 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15832 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16) 15833 return r 15834 }(), Fdl: func() (r struct{ Fdad Ush }) { 15835 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15836 return r 15837 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15838 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8) 15839 return r 15840 }(), Fdl: func() (r struct{ Fdad Ush }) { 15841 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15842 return r 15843 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15844 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24) 15845 return r 15846 }(), Fdl: func() (r struct{ Fdad Ush }) { 15847 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15848 return r 15849 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15850 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4) 15851 return r 15852 }(), Fdl: func() (r struct{ Fdad Ush }) { 15853 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15854 return r 15855 }()}, 15856 {Ffc: func() (r struct{ Ffreq Ush }) { 15857 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20) 15858 return r 15859 }(), Fdl: func() (r struct{ Fdad Ush }) { 15860 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15861 return r 15862 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15863 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12) 15864 return r 15865 }(), Fdl: func() (r struct{ Fdad Ush }) { 15866 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15867 return r 15868 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15869 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28) 15870 return r 15871 }(), Fdl: func() (r struct{ Fdad Ush }) { 15872 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15873 return r 15874 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15875 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2) 15876 return r 15877 }(), Fdl: func() (r struct{ Fdad Ush }) { 15878 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15879 return r 15880 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15881 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18) 15882 return r 15883 }(), Fdl: func() (r struct{ Fdad Ush }) { 15884 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15885 return r 15886 }()}, 15887 {Ffc: func() (r struct{ Ffreq Ush }) { 15888 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10) 15889 return r 15890 }(), Fdl: func() (r struct{ Fdad Ush }) { 15891 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15892 return r 15893 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15894 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26) 15895 return r 15896 }(), Fdl: func() (r struct{ Fdad Ush }) { 15897 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15898 return r 15899 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15900 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6) 15901 return r 15902 }(), Fdl: func() (r struct{ Fdad Ush }) { 15903 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15904 return r 15905 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15906 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22) 15907 return r 15908 }(), Fdl: func() (r struct{ Fdad Ush }) { 15909 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15910 return r 15911 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15912 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14) 15913 return r 15914 }(), Fdl: func() (r struct{ Fdad Ush }) { 15915 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15916 return r 15917 }()}, 15918 {Ffc: func() (r struct{ Ffreq Ush }) { 15919 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30) 15920 return r 15921 }(), Fdl: func() (r struct{ Fdad Ush }) { 15922 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15923 return r 15924 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15925 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1) 15926 return r 15927 }(), Fdl: func() (r struct{ Fdad Ush }) { 15928 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15929 return r 15930 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15931 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17) 15932 return r 15933 }(), Fdl: func() (r struct{ Fdad Ush }) { 15934 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15935 return r 15936 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15937 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9) 15938 return r 15939 }(), Fdl: func() (r struct{ Fdad Ush }) { 15940 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15941 return r 15942 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15943 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25) 15944 return r 15945 }(), Fdl: func() (r struct{ Fdad Ush }) { 15946 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15947 return r 15948 }()}, 15949 {Ffc: func() (r struct{ Ffreq Ush }) { 15950 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15951 return r 15952 }(), Fdl: func() (r struct{ Fdad Ush }) { 15953 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15954 return r 15955 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15956 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21) 15957 return r 15958 }(), Fdl: func() (r struct{ Fdad Ush }) { 15959 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15960 return r 15961 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15962 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13) 15963 return r 15964 }(), Fdl: func() (r struct{ Fdad Ush }) { 15965 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15966 return r 15967 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15968 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29) 15969 return r 15970 }(), Fdl: func() (r struct{ Fdad Ush }) { 15971 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15972 return r 15973 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15974 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3) 15975 return r 15976 }(), Fdl: func() (r struct{ Fdad Ush }) { 15977 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15978 return r 15979 }()}, 15980 {Ffc: func() (r struct{ Ffreq Ush }) { 15981 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19) 15982 return r 15983 }(), Fdl: func() (r struct{ Fdad Ush }) { 15984 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15985 return r 15986 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15987 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11) 15988 return r 15989 }(), Fdl: func() (r struct{ Fdad Ush }) { 15990 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15991 return r 15992 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15993 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27) 15994 return r 15995 }(), Fdl: func() (r struct{ Fdad Ush }) { 15996 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 15997 return r 15998 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 15999 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7) 16000 return r 16001 }(), Fdl: func() (r struct{ Fdad Ush }) { 16002 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16003 return r 16004 }()}, {Ffc: func() (r struct{ Ffreq Ush }) { 16005 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23) 16006 return r 16007 }(), Fdl: func() (r struct{ Fdad Ush }) { 16008 *(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5) 16009 return r 16010 }()}} /* trees.h:64:21 */ 16011 16012 var X_dist_code = [512]Uch{ 16013 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), 16014 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), 16015 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), 16016 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), 16017 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), 16018 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), 16019 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), 16020 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), 16021 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), 16022 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), 16023 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), 16024 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), 16025 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), 16026 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), 16027 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), 16028 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), 16029 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), 16030 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), 16031 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), 16032 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), 16033 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), 16034 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), 16035 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), 16036 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), 16037 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), 16038 Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), 16039 } /* trees.h:73:25 */ 16040 16041 var X_length_code = [256]Uch{ 16042 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), 16043 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), 16044 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), 16045 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), 16046 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), 16047 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), 16048 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), 16049 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), 16050 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), 16051 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), 16052 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), 16053 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), 16054 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), 16055 } /* trees.h:102:25 */ 16056 16057 var base_length = [29]int32{ 16058 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 16059 64, 80, 96, 112, 128, 160, 192, 224, 0, 16060 } /* trees.h:118:17 */ 16061 16062 var base_dist = [30]int32{ 16063 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 16064 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 16065 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 16066 } /* trees.h:123:17 */ 16067 16068 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 */ 16069 16070 var static_d_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Felems: D_CODES, Fmax_length: MAX_BITS} /* trees.c:128:31 */ 16071 16072 var static_bl_desc = Static_tree_desc{Fextra_bits: 0, Felems: BL_CODES, Fmax_length: MAX_BL_BITS} /* trees.c:131:31 */ 16073 16074 // Send a code of the given tree. c and tree must not have side effects 16075 16076 // =========================================================================== 16077 // Output a short LSB first on the stream. 16078 // IN assertion: there is enough room in pendingBuf. 16079 16080 // =========================================================================== 16081 // Send a value on a given number of bits. 16082 // IN assertion: length <= 16 and value fits in length bits. 16083 16084 // the arguments must not have side effects 16085 16086 // =========================================================================== 16087 // Initialize the various 'constant' tables. 16088 func tr_static_init(tls *libc.TLS) { /* trees.c:232:12: */ 16089 } 16090 16091 // =========================================================================== 16092 // Genererate the file trees.h describing the static trees. 16093 16094 // =========================================================================== 16095 // Initialize the tree data structures for a new zlib stream. 16096 func X_tr_init(tls *libc.TLS, s uintptr) { /* trees.c:379:20: */ 16097 tr_static_init(tls) 16098 16099 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 212 /* &.dyn_ltree */ 16100 (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_l_desc)) 16101 16102 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2504 /* &.dyn_dtree */ 16103 (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_d_desc)) 16104 16105 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2748 /* &.bl_tree */ 16106 (*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_bl_desc)) 16107 16108 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 16109 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 16110 16111 // Initialize the first block of the first file: 16112 init_block(tls, s) 16113 } 16114 16115 // =========================================================================== 16116 // Initialize a new block. 16117 func init_block(tls *libc.TLS, s uintptr) { /* trees.c:407:12: */ 16118 var n int32 // iterates over tree elements 16119 16120 // Initialize the trees. 16121 for n = 0; n < LITERALS+1+LENGTH_CODES; n++ { 16122 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(n)*4)) = Ush(0) 16123 } 16124 for n = 0; n < D_CODES; n++ { 16125 *(*Ush)(unsafe.Pointer(s + 2504 + uintptr(n)*4)) = Ush(0) 16126 } 16127 for n = 0; n < BL_CODES; n++ { 16128 *(*Ush)(unsafe.Pointer(s + 2748 + uintptr(n)*4)) = Ush(0) 16129 } 16130 16131 *(*Ush)(unsafe.Pointer(s + 212 + 256*4)) = Ush(1) 16132 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len = libc.AssignPtrUint64(s+5920, uint64(0)) 16133 (*Deflate_state)(unsafe.Pointer(s)).Flast_lit = libc.AssignPtrUint32(s+5928, UInt(0)) 16134 } 16135 16136 // Index within the heap array of least frequent node in the Huffman tree 16137 16138 // =========================================================================== 16139 // Remove the smallest element from the heap and recreate the heap with 16140 // one less element. Updates heap and heap_len. 16141 16142 // =========================================================================== 16143 // Compares to subtrees, using the tree depth as tie breaker when 16144 // the subtrees have equal frequency. This minimizes the worst case length. 16145 16146 // =========================================================================== 16147 // Restore the heap property by moving down the tree starting at node k, 16148 // exchanging a node with the smallest of its two sons if necessary, stopping 16149 // when the heap property is re-established (each father smaller than its 16150 // two sons). 16151 func pqdownheap(tls *libc.TLS, s uintptr, tree uintptr, k int32) { /* trees.c:451:12: */ 16152 var v int32 = *(*int32)(unsafe.Pointer(s + 3008 + uintptr(k)*4)) 16153 var j int32 = k << 1 // left son of k 16154 for j <= (*Deflate_state)(unsafe.Pointer(s)).Fheap_len { 16155 // Set j to the smallest of the two sons: 16156 if j < (*Deflate_state)(unsafe.Pointer(s)).Fheap_len && (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j+1)*4)))*4))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)))*4))) || int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j+1)*4)))*4))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)))*4))) && int32(*(*Uch)(unsafe.Pointer(s + 5308 + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j+1)*4)))))) <= int32(*(*Uch)(unsafe.Pointer(s + 5308 + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4))))))) { 16157 j++ 16158 } 16159 // Exit if v is smaller than both sons 16160 if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)))*4))) || int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)))*4))) && int32(*(*Uch)(unsafe.Pointer(s + 5308 + uintptr(v)))) <= int32(*(*Uch)(unsafe.Pointer(s + 5308 + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)))))) { 16161 break 16162 } 16163 16164 // Exchange v with the smallest son 16165 *(*int32)(unsafe.Pointer(s + 3008 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)) 16166 k = j 16167 16168 // And continue down the tree, setting j to the left son of k 16169 j <<= 1 16170 } 16171 *(*int32)(unsafe.Pointer(s + 3008 + uintptr(k)*4)) = v 16172 } 16173 16174 // =========================================================================== 16175 // Compute the optimal bit lengths for a tree and update the total bit length 16176 // for the current block. 16177 // IN assertion: the fields freq and dad are set, heap[heap_max] and 16178 // 16179 // above are the tree nodes sorted by increasing frequency. 16180 // 16181 // OUT assertions: the field len is set to the optimal bit length, the 16182 // 16183 // array bl_count contains the frequencies for each bit length. 16184 // The length opt_len is updated; static_len is also updated if stree is 16185 // not null. 16186 func gen_bitlen(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:486:12: */ 16187 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 16188 var max_code int32 = (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code 16189 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 16190 var extra uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits 16191 var base int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base 16192 var max_length int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length 16193 var h int32 // heap index 16194 var n int32 16195 var m int32 // iterate over the tree elements 16196 var bits int32 // bit length 16197 var xbits int32 // extra bits 16198 var f Ush // frequency 16199 var overflow int32 = 0 // number of elements with bit length too large 16200 16201 for bits = 0; bits <= MAX_BITS; bits++ { 16202 *(*Ush)(unsafe.Pointer(s + 2976 + uintptr(bits)*2)) = Ush(0) 16203 } 16204 16205 // In a first pass, compute the optimal bit lengths (which may 16206 // overflow in the case of the bit length tree). 16207 *(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fheap_max)*4)))*4 + 2)) = Ush(0) // root of the heap 16208 16209 for h = (*Deflate_state)(unsafe.Pointer(s)).Fheap_max + 1; h < 2*(LITERALS+1+LENGTH_CODES)+1; h++ { 16210 n = *(*int32)(unsafe.Pointer(s + 3008 + uintptr(h)*4)) 16211 bits = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)))*4 + 2))) + 1 16212 if bits > max_length { 16213 bits = max_length 16214 overflow++ 16215 } 16216 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = Ush(bits) 16217 // We overwrite tree[n].Dad which is no longer needed 16218 16219 if n > max_code { 16220 continue 16221 } // not a leaf node 16222 16223 *(*Ush)(unsafe.Pointer(s + 2976 + uintptr(bits)*2))++ 16224 xbits = 0 16225 if n >= base { 16226 xbits = *(*Intf)(unsafe.Pointer(extra + uintptr(n-base)*4)) 16227 } 16228 f = *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4)) 16229 *(*Ulg)(unsafe.Pointer(s + 5912)) += Ulg(f) * Ulg(uint32(bits+xbits)) 16230 if stree != 0 { 16231 *(*Ulg)(unsafe.Pointer(s + 5920)) += Ulg(f) * Ulg(uint32(int32(*(*Ush)(unsafe.Pointer(stree + uintptr(n)*4 + 2)))+xbits)) 16232 } 16233 } 16234 if overflow == 0 { 16235 return 16236 } 16237 16238 // This happens for example on obj2 and pic of the Calgary corpus 16239 16240 // Find the first bit length which could increase: 16241 for __ccgo := true; __ccgo; __ccgo = overflow > 0 { 16242 bits = max_length - 1 16243 for int32(*(*Ush)(unsafe.Pointer(s + 2976 + uintptr(bits)*2))) == 0 { 16244 bits-- 16245 } 16246 *(*Ush)(unsafe.Pointer(s + 2976 + uintptr(bits)*2))-- // move one leaf down the tree 16247 *(*Ush)(unsafe.Pointer(s + 2976 + uintptr(bits+1)*2)) += Ush(2) // move one overflow item as its brother 16248 *(*Ush)(unsafe.Pointer(s + 2976 + uintptr(max_length)*2))-- 16249 // The brother of the overflow item also moves one step up, 16250 // but this does not affect bl_count[max_length] 16251 overflow = overflow - 2 16252 } 16253 16254 // Now recompute all bit lengths, scanning in increasing frequency. 16255 // h is still equal to HEAP_SIZE. (It is simpler to reconstruct all 16256 // lengths instead of fixing only the wrong ones. This idea is taken 16257 // from 'ar' written by Haruhiko Okumura.) 16258 for bits = max_length; bits != 0; bits-- { 16259 n = int32(*(*Ush)(unsafe.Pointer(s + 2976 + uintptr(bits)*2))) 16260 for n != 0 { 16261 m = *(*int32)(unsafe.Pointer(s + 3008 + uintptr(libc.PreDecInt32(&h, 1))*4)) 16262 if m > max_code { 16263 continue 16264 } 16265 if uint32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2))) != uint32(bits) { 16266 16267 *(*Ulg)(unsafe.Pointer(s + 5912)) += (Ulg(bits) - Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)))) * Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4))) 16268 *(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)) = Ush(bits) 16269 } 16270 n-- 16271 } 16272 } 16273 } 16274 16275 // =========================================================================== 16276 // Generate the codes for a given tree and bit counts (which need not be 16277 // optimal). 16278 // IN assertion: the array bl_count contains the bit length statistics for 16279 // the given tree and the field len is set for all tree elements. 16280 // OUT assertion: the field code is set for all tree elements of non 16281 // 16282 // zero code length. 16283 func gen_codes(tls *libc.TLS, tree uintptr, max_code int32, bl_count uintptr) { /* trees.c:572:12: */ 16284 bp := tls.Alloc(32) 16285 defer tls.Free(32) 16286 16287 // var next_code [16]Ush at bp, 32 16288 // next code value for each bit length 16289 var code uint32 = uint32(0) // running code value 16290 var bits int32 // bit index 16291 var n int32 // code index 16292 16293 // The distribution counts are first used to generate the code values 16294 // without bit reversal. 16295 for bits = 1; bits <= MAX_BITS; bits++ { 16296 code = (code + uint32(*(*Ushf)(unsafe.Pointer(bl_count + uintptr(bits-1)*2)))) << 1 16297 *(*Ush)(unsafe.Pointer(bp + uintptr(bits)*2)) = Ush(code) 16298 } 16299 // Check that the bit counts in bl_count are consistent. The last code 16300 // must be all ones. 16301 16302 for n = 0; n <= max_code; n++ { 16303 var len int32 = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2))) 16304 if len == 0 { 16305 continue 16306 } 16307 // Now reverse the bits 16308 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4)) = Ush(bi_reverse(tls, uint32(libc.PostIncUint16(&*(*Ush)(unsafe.Pointer(bp + uintptr(len)*2)), 1)), len)) 16309 16310 } 16311 } 16312 16313 // =========================================================================== 16314 // Construct one Huffman tree and assigns the code bit strings and lengths. 16315 // Update the total bit length for the current block. 16316 // IN assertion: the field freq is set for all tree elements. 16317 // OUT assertions: the fields len and code are set to the optimal bit length 16318 // 16319 // and corresponding code. The length opt_len is updated; static_len is 16320 // also updated if stree is not null. The field max_code is set. 16321 func build_tree(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:615:12: */ 16322 var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree 16323 var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree 16324 var elems int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems 16325 var n int32 16326 var m int32 // iterate over heap elements 16327 var max_code int32 = -1 // largest code with non zero frequency 16328 var node int32 // new node being created 16329 16330 // Construct the initial heap, with least frequent element in 16331 // heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. 16332 // heap[0] is not used. 16333 (*Deflate_state)(unsafe.Pointer(s)).Fheap_len = 0 16334 (*Deflate_state)(unsafe.Pointer(s)).Fheap_max = 2*(LITERALS+1+LENGTH_CODES) + 1 16335 16336 for n = 0; n < elems; n++ { 16337 if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))) != 0 { 16338 *(*int32)(unsafe.Pointer(s + 3008 + uintptr(libc.PreIncInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4)) = libc.AssignInt32(&max_code, n) 16339 *(*Uch)(unsafe.Pointer(s + 5308 + uintptr(n))) = Uch(0) 16340 } else { 16341 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = Ush(0) 16342 } 16343 } 16344 16345 // The pkzip format requires that at least one distance code exists, 16346 // and that at least one bit should be sent even if there is only one 16347 // possible code. So to avoid special checks later on we force at least 16348 // two codes of non zero frequency. 16349 for (*Deflate_state)(unsafe.Pointer(s)).Fheap_len < 2 { 16350 node = libc.AssignPtrInt32(s+3008+uintptr(libc.PreIncInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4, func() int32 { 16351 if max_code < 2 { 16352 return libc.PreIncInt32(&max_code, 1) 16353 } 16354 return 0 16355 }()) 16356 *(*Ush)(unsafe.Pointer(tree + uintptr(node)*4)) = Ush(1) 16357 *(*Uch)(unsafe.Pointer(s + 5308 + uintptr(node))) = Uch(0) 16358 (*Deflate_state)(unsafe.Pointer(s)).Fopt_len-- 16359 if stree != 0 { 16360 *(*Ulg)(unsafe.Pointer(s + 5920)) -= Ulg(*(*Ush)(unsafe.Pointer(stree + uintptr(node)*4 + 2))) 16361 } 16362 // node is 0 or 1 so it does not have extra bits 16363 } 16364 (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code = max_code 16365 16366 // The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, 16367 // establish sub-heaps of increasing lengths: 16368 for n = (*Deflate_state)(unsafe.Pointer(s)).Fheap_len / 2; n >= 1; n-- { 16369 pqdownheap(tls, s, tree, n) 16370 } 16371 16372 // Construct the Huffman tree by repeatedly combining the least two 16373 // frequent nodes. 16374 node = elems // next internal node of the tree 16375 for __ccgo := true; __ccgo; __ccgo = (*Deflate_state)(unsafe.Pointer(s)).Fheap_len >= 2 { 16376 { 16377 n = *(*int32)(unsafe.Pointer(s + 3008 + 1*4)) 16378 *(*int32)(unsafe.Pointer(s + 3008 + 1*4)) = *(*int32)(unsafe.Pointer(s + 3008 + uintptr(libc.PostDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4)) 16379 pqdownheap(tls, s, tree, SMALLEST) 16380 } 16381 // n = node of least frequency 16382 m = *(*int32)(unsafe.Pointer(s + 3008 + 1*4)) // m = node of next least frequency 16383 16384 *(*int32)(unsafe.Pointer(s + 3008 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = n // keep the nodes sorted by frequency 16385 *(*int32)(unsafe.Pointer(s + 3008 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = m 16386 16387 // Create a new node father of n and m 16388 *(*Ush)(unsafe.Pointer(tree + uintptr(node)*4)) = Ush(int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))) + int32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4)))) 16389 *(*Uch)(unsafe.Pointer(s + 5308 + uintptr(node))) = Uch(func() int32 { 16390 if int32(*(*Uch)(unsafe.Pointer(s + 5308 + uintptr(n)))) >= int32(*(*Uch)(unsafe.Pointer(s + 5308 + uintptr(m)))) { 16391 return int32(*(*Uch)(unsafe.Pointer(s + 5308 + uintptr(n)))) 16392 } 16393 return int32(*(*Uch)(unsafe.Pointer(s + 5308 + uintptr(m)))) 16394 }() + 1) 16395 *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = libc.AssignPtrUint16(tree+uintptr(m)*4+2, Ush(node)) 16396 // and insert the new node in the heap 16397 *(*int32)(unsafe.Pointer(s + 3008 + 1*4)) = libc.PostIncInt32(&node, 1) 16398 pqdownheap(tls, s, tree, SMALLEST) 16399 16400 } 16401 16402 *(*int32)(unsafe.Pointer(s + 3008 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = *(*int32)(unsafe.Pointer(s + 3008 + 1*4)) 16403 16404 // At this point, the fields freq and dad are set. We can now 16405 // generate the bit lengths. 16406 gen_bitlen(tls, s, desc) 16407 16408 // The field len is now set, we can generate the bit codes 16409 gen_codes(tls, tree, max_code, s+2976) 16410 } 16411 16412 // =========================================================================== 16413 // Scan a literal or distance tree to determine the frequencies of the codes 16414 // in the bit length tree. 16415 func scan_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:703:12: */ 16416 var n int32 // iterates over all tree elements 16417 var prevlen int32 = -1 // last emitted length 16418 var curlen int32 // length of current code 16419 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2))) // length of next code 16420 var count int32 = 0 // repeat count of the current code 16421 var max_count int32 = 7 // max repeat count 16422 var min_count int32 = 4 // min repeat count 16423 16424 if nextlen == 0 { 16425 max_count = 138 16426 min_count = 3 16427 } 16428 *(*Ush)(unsafe.Pointer(tree + uintptr(max_code+1)*4 + 2)) = Ush(0xffff) // guard 16429 16430 for n = 0; n <= max_code; n++ { 16431 curlen = nextlen 16432 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n+1)*4 + 2))) 16433 if libc.PreIncInt32(&count, 1) < max_count && curlen == nextlen { 16434 continue 16435 } else if count < min_count { 16436 *(*Ush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4)) += Ush(count) 16437 } else if curlen != 0 { 16438 if curlen != prevlen { 16439 *(*Ush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4))++ 16440 } 16441 *(*Ush)(unsafe.Pointer(s + 2748 + 16*4))++ 16442 } else if count <= 10 { 16443 *(*Ush)(unsafe.Pointer(s + 2748 + 17*4))++ 16444 } else { 16445 *(*Ush)(unsafe.Pointer(s + 2748 + 18*4))++ 16446 } 16447 count = 0 16448 prevlen = curlen 16449 if nextlen == 0 { 16450 max_count = 138 16451 min_count = 3 16452 } else if curlen == nextlen { 16453 max_count = 6 16454 min_count = 3 16455 } else { 16456 max_count = 7 16457 min_count = 4 16458 } 16459 } 16460 } 16461 16462 // =========================================================================== 16463 // Send a literal or distance tree in compressed form, using the codes in 16464 // bl_tree. 16465 func send_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:748:12: */ 16466 var n int32 // iterates over all tree elements 16467 var prevlen int32 = -1 // last emitted length 16468 var curlen int32 // length of current code 16469 var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2))) // length of next code 16470 var count int32 = 0 // repeat count of the current code 16471 var max_count int32 = 7 // max repeat count 16472 var min_count int32 = 4 // min repeat count 16473 16474 /* tree[max_code+1].Len = -1; */ // guard already set 16475 if nextlen == 0 { 16476 max_count = 138 16477 min_count = 3 16478 } 16479 16480 for n = 0; n <= max_code; n++ { 16481 curlen = nextlen 16482 nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n+1)*4 + 2))) 16483 if libc.PreIncInt32(&count, 1) < max_count && curlen == nextlen { 16484 continue 16485 } else if count < min_count { 16486 for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&count, 1) != 0 { 16487 { 16488 var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4 + 2))) 16489 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16490 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4))) 16491 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16492 { 16493 { 16494 *(*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) 16495 } 16496 { 16497 *(*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) 16498 } 16499 16500 } 16501 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16502 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16503 } else { 16504 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16505 *(*int32)(unsafe.Pointer(s + 5940)) += len 16506 } 16507 } 16508 } 16509 16510 } else if curlen != 0 { 16511 if curlen != prevlen { 16512 { 16513 var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4 + 2))) 16514 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16515 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4))) 16516 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16517 { 16518 { 16519 *(*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) 16520 } 16521 { 16522 *(*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) 16523 } 16524 16525 } 16526 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16527 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16528 } else { 16529 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16530 *(*int32)(unsafe.Pointer(s + 5940)) += len 16531 } 16532 } 16533 count-- 16534 } 16535 16536 { 16537 var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + 16*4 + 2))) 16538 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16539 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + 16*4))) 16540 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16541 { 16542 { 16543 *(*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) 16544 } 16545 { 16546 *(*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) 16547 } 16548 16549 } 16550 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16551 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16552 } else { 16553 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2748 + 16*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16554 *(*int32)(unsafe.Pointer(s + 5940)) += len 16555 } 16556 } 16557 { 16558 var len int32 = 2 16559 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16560 var val int32 = count - 3 16561 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16562 { 16563 { 16564 *(*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) 16565 } 16566 { 16567 *(*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) 16568 } 16569 16570 } 16571 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16572 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16573 } else { 16574 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(count-3)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16575 *(*int32)(unsafe.Pointer(s + 5940)) += len 16576 } 16577 } 16578 16579 } else if count <= 10 { 16580 { 16581 var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + 17*4 + 2))) 16582 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16583 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + 17*4))) 16584 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16585 { 16586 { 16587 *(*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) 16588 } 16589 { 16590 *(*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) 16591 } 16592 16593 } 16594 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16595 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16596 } else { 16597 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2748 + 17*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16598 *(*int32)(unsafe.Pointer(s + 5940)) += len 16599 } 16600 } 16601 { 16602 var len int32 = 3 16603 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16604 var val int32 = count - 3 16605 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16606 { 16607 { 16608 *(*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) 16609 } 16610 { 16611 *(*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) 16612 } 16613 16614 } 16615 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16616 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16617 } else { 16618 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(count-3)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16619 *(*int32)(unsafe.Pointer(s + 5940)) += len 16620 } 16621 } 16622 16623 } else { 16624 { 16625 var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + 18*4 + 2))) 16626 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16627 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + 18*4))) 16628 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16629 { 16630 { 16631 *(*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) 16632 } 16633 { 16634 *(*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) 16635 } 16636 16637 } 16638 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16639 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16640 } else { 16641 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2748 + 18*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16642 *(*int32)(unsafe.Pointer(s + 5940)) += len 16643 } 16644 } 16645 { 16646 var len int32 = 7 16647 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16648 var val int32 = count - 11 16649 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16650 { 16651 { 16652 *(*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) 16653 } 16654 { 16655 *(*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) 16656 } 16657 16658 } 16659 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16660 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16661 } else { 16662 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(count-11)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16663 *(*int32)(unsafe.Pointer(s + 5940)) += len 16664 } 16665 } 16666 16667 } 16668 count = 0 16669 prevlen = curlen 16670 if nextlen == 0 { 16671 max_count = 138 16672 min_count = 3 16673 } else if curlen == nextlen { 16674 max_count = 6 16675 min_count = 3 16676 } else { 16677 max_count = 7 16678 min_count = 4 16679 } 16680 } 16681 } 16682 16683 // =========================================================================== 16684 // Construct the Huffman tree for the bit lengths and return the index in 16685 // bl_order of the last bit length code to send. 16686 func build_bl_tree(tls *libc.TLS, s uintptr) int32 { /* trees.c:799:11: */ 16687 var max_blindex int32 // index of last bit length code of non zero freq 16688 16689 // Determine the bit length frequencies for literal and distance trees 16690 scan_tree(tls, s, s+212 /* &.dyn_ltree */, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code) 16691 scan_tree(tls, s, s+2504 /* &.dyn_dtree */, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code) 16692 16693 // Build the bit length tree: 16694 build_tree(tls, s, s+2952) 16695 // opt_len now includes the length of the tree representations, except 16696 // the lengths of the bit lengths codes and the 5+5+4 bits for the counts. 16697 16698 // Determine the number of bit length codes to send. The pkzip format 16699 // requires that at least 4 bit length codes be sent. (appnote.txt says 16700 // 3 but the actual value used is 4.) 16701 for max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex-- { 16702 if int32(*(*Ush)(unsafe.Pointer(s + 2748 + uintptr(bl_order[max_blindex])*4 + 2))) != 0 { 16703 break 16704 } 16705 } 16706 // Update opt_len to include the bit length tree and counts 16707 *(*Ulg)(unsafe.Pointer(s + 5912)) += uint64(3)*(Ulg(max_blindex)+uint64(1)) + uint64(5) + uint64(5) + uint64(4) 16708 16709 return max_blindex 16710 } 16711 16712 // =========================================================================== 16713 // Send the header for a block using dynamic Huffman trees: the counts, the 16714 // lengths of the bit length codes, the literal tree and the distance tree. 16715 // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. 16716 func send_all_trees(tls *libc.TLS, s uintptr, lcodes int32, dcodes int32, blcodes int32) { /* trees.c:834:12: */ 16717 var rank int32 // index in bl_order 16718 16719 { 16720 var len int32 = 5 16721 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16722 var val int32 = lcodes - 257 16723 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16724 { 16725 { 16726 *(*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) 16727 } 16728 { 16729 *(*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) 16730 } 16731 16732 } 16733 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16734 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16735 } else { 16736 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(lcodes-257)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16737 *(*int32)(unsafe.Pointer(s + 5940)) += len 16738 } 16739 } 16740 /* not +255 as stated in appnote.txt */ 16741 { 16742 var len int32 = 5 16743 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16744 var val int32 = dcodes - 1 16745 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16746 { 16747 { 16748 *(*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) 16749 } 16750 { 16751 *(*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) 16752 } 16753 16754 } 16755 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16756 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16757 } else { 16758 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(dcodes-1)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16759 *(*int32)(unsafe.Pointer(s + 5940)) += len 16760 } 16761 } 16762 16763 { 16764 var len int32 = 4 16765 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16766 var val int32 = blcodes - 4 16767 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16768 { 16769 { 16770 *(*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) 16771 } 16772 { 16773 *(*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) 16774 } 16775 16776 } 16777 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16778 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16779 } else { 16780 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(blcodes-4)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16781 *(*int32)(unsafe.Pointer(s + 5940)) += len 16782 } 16783 } 16784 // not -3 as stated in appnote.txt 16785 for rank = 0; rank < blcodes; rank++ { 16786 16787 { 16788 var len int32 = 3 16789 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16790 var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2748 + uintptr(bl_order[rank])*4 + 2))) 16791 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16792 { 16793 { 16794 *(*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) 16795 } 16796 { 16797 *(*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) 16798 } 16799 16800 } 16801 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16802 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16803 } else { 16804 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2748 + uintptr(bl_order[rank])*4 + 2))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16805 *(*int32)(unsafe.Pointer(s + 5940)) += len 16806 } 16807 } 16808 16809 } 16810 16811 send_tree(tls, s, s+212 /* &.dyn_ltree */, lcodes-1) // literal tree 16812 16813 send_tree(tls, s, s+2504 /* &.dyn_dtree */, dcodes-1) // distance tree 16814 16815 } 16816 16817 // =========================================================================== 16818 // Send a stored block 16819 func X_tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:863:20: */ 16820 { 16821 var len int32 = 3 16822 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16823 var val int32 = int32(STORED_BLOCK)<<1 + last 16824 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16825 { 16826 { 16827 *(*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) 16828 } 16829 { 16830 *(*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) 16831 } 16832 16833 } 16834 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16835 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16836 } else { 16837 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(int32(STORED_BLOCK)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16838 *(*int32)(unsafe.Pointer(s + 5940)) += len 16839 } 16840 } 16841 // send block type 16842 bi_windup(tls, s) /* align on byte boundary */ 16843 { 16844 { 16845 *(*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) 16846 } 16847 { 16848 *(*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) 16849 } 16850 16851 } 16852 16853 { 16854 { 16855 *(*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) 16856 } 16857 { 16858 *(*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) 16859 } 16860 16861 } 16862 16863 libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending), buf, stored_len) 16864 *(*Ulg)(unsafe.Pointer(s + 40)) += stored_len 16865 } 16866 16867 // =========================================================================== 16868 // Flush the bits in the bit buffer to pending output (leaves at most 7 bits) 16869 func X_tr_flush_bits(tls *libc.TLS, s uintptr) { /* trees.c:886:20: */ 16870 bi_flush(tls, s) 16871 } 16872 16873 // =========================================================================== 16874 // Send one empty static block to give enough lookahead for inflate. 16875 // This takes 10 bits, of which 7 may remain in the bit buffer. 16876 func X_tr_align(tls *libc.TLS, s uintptr) { /* trees.c:896:20: */ 16877 { 16878 var len int32 = 3 16879 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16880 var val int32 = int32(STATIC_TREES) << 1 16881 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16882 { 16883 { 16884 *(*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) 16885 } 16886 { 16887 *(*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) 16888 } 16889 16890 } 16891 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16892 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16893 } else { 16894 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(int32(Ush(int32(STATIC_TREES)<<1))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16895 *(*int32)(unsafe.Pointer(s + 5940)) += len 16896 } 16897 } 16898 16899 { 16900 var len int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 + 2))) 16901 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16902 var val int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4))) 16903 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16904 { 16905 { 16906 *(*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) 16907 } 16908 { 16909 *(*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) 16910 } 16911 16912 } 16913 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16914 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16915 } else { 16916 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16917 *(*int32)(unsafe.Pointer(s + 5940)) += len 16918 } 16919 } 16920 16921 bi_flush(tls, s) 16922 } 16923 16924 // =========================================================================== 16925 // Determine the best encoding for the current block: dynamic trees, static 16926 // trees or store, and write out the encoded block. 16927 func X_tr_flush_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:911:20: */ 16928 var opt_lenb Ulg 16929 var static_lenb Ulg // opt_len and static_len in bytes 16930 var max_blindex int32 = 0 // index of last bit length code of non zero freq 16931 16932 // Build the Huffman trees unless a stored block is forced 16933 if (*Deflate_state)(unsafe.Pointer(s)).Flevel > 0 { 16934 16935 // Check if the file is binary or text 16936 if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == Z_UNKNOWN { 16937 (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = detect_data_type(tls, s) 16938 } 16939 16940 // Construct the literal and distance trees 16941 build_tree(tls, s, s+2904) 16942 16943 build_tree(tls, s, s+2928) 16944 16945 // At this point, opt_len and static_len are the total bit lengths of 16946 // the compressed block data, excluding the tree representations. 16947 16948 // Build the bit length tree for the above two trees, and get the index 16949 // in bl_order of the last bit length code to send. 16950 max_blindex = build_bl_tree(tls, s) 16951 16952 // Determine the best encoding. Compute the block lengths in bytes. 16953 opt_lenb = ((*Deflate_state)(unsafe.Pointer(s)).Fopt_len + uint64(3) + uint64(7)) >> 3 16954 static_lenb = ((*Deflate_state)(unsafe.Pointer(s)).Fstatic_len + uint64(3) + uint64(7)) >> 3 16955 16956 if static_lenb <= opt_lenb { 16957 opt_lenb = static_lenb 16958 } 16959 16960 } else { 16961 16962 opt_lenb = libc.AssignUint64(&static_lenb, stored_len+uint64(5)) // force a stored block 16963 } 16964 16965 if stored_len+uint64(4) <= opt_lenb && buf != uintptr(0) { 16966 // 4: two words for the lengths 16967 // The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. 16968 // Otherwise we can't have processed more than WSIZE input bytes since 16969 // the last block flush, because compression would have been 16970 // successful. If LIT_BUFSIZE <= WSIZE, it is never too late to 16971 // transform a block into a stored block. 16972 X_tr_stored_block(tls, s, buf, stored_len, last) 16973 16974 } else if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FIXED || static_lenb == opt_lenb { 16975 { 16976 var len int32 = 3 16977 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 16978 var val int32 = int32(STATIC_TREES)<<1 + last 16979 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16980 { 16981 { 16982 *(*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) 16983 } 16984 { 16985 *(*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) 16986 } 16987 16988 } 16989 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 16990 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 16991 } else { 16992 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(int32(STATIC_TREES)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 16993 *(*int32)(unsafe.Pointer(s + 5940)) += len 16994 } 16995 } 16996 16997 compress_block(tls, s, uintptr(uintptr(unsafe.Pointer(&static_ltree))), 16998 uintptr(uintptr(unsafe.Pointer(&static_dtree)))) 16999 } else { 17000 { 17001 var len int32 = 3 17002 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 17003 var val int32 = int32(DYN_TREES)<<1 + last 17004 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17005 { 17006 { 17007 *(*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) 17008 } 17009 { 17010 *(*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) 17011 } 17012 17013 } 17014 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17015 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 17016 } else { 17017 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(int32(DYN_TREES)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17018 *(*int32)(unsafe.Pointer(s + 5940)) += len 17019 } 17020 } 17021 17022 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, 17023 max_blindex+1) 17024 compress_block(tls, s, s+212, /* &.dyn_ltree */ 17025 s+2504 /* &.dyn_dtree */) 17026 } 17027 17028 // The above check is made mod 2^32, for files larger than 512 MB 17029 // and uLong implemented on 32 bits. 17030 init_block(tls, s) 17031 17032 if last != 0 { 17033 bi_windup(tls, s) 17034 } 17035 17036 } 17037 17038 // =========================================================================== 17039 // Save the match info and tally the frequency counts. Return true if 17040 // the current block must be flushed. 17041 func X_tr_tally(tls *libc.TLS, s uintptr, dist uint32, lc uint32) int32 { /* trees.c:1014:19: */ 17042 *(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ush(dist) 17043 *(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = Uch(lc) 17044 if dist == uint32(0) { 17045 // lc is the unmatched char 17046 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(lc)*4))++ 17047 } else { 17048 (*Deflate_state)(unsafe.Pointer(s)).Fmatches++ 17049 // Here, lc is the match length - MIN_MATCH 17050 dist-- // dist = match distance - 1 17051 17052 *(*Ush)(unsafe.Pointer(s + 212 + uintptr(int32(X_length_code[lc])+LITERALS+1)*4))++ 17053 *(*Ush)(unsafe.Pointer(s + 2504 + uintptr(func() int32 { 17054 if dist < uint32(256) { 17055 return int32(X_dist_code[dist]) 17056 } 17057 return int32(X_dist_code[uint32(256)+dist>>7]) 17058 }())*4))++ 17059 } 17060 17061 return libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1)) 17062 // We avoid equality with lit_bufsize because of wraparound at 64K 17063 // on 16 bit machines and because stored blocks are restricted to 17064 // 64K-1 bytes. 17065 } 17066 17067 // =========================================================================== 17068 // Send the block data compressed using the given Huffman trees 17069 func compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { /* trees.c:1064:12: */ 17070 var dist uint32 // distance of matched string 17071 var lc int32 // match length or unmatched char (if dist == 0) 17072 var lx uint32 = uint32(0) // running index in l_buf 17073 var code uint32 // the code to send 17074 var extra int32 // number of extra bits to send 17075 17076 if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != UInt(0) { 17077 for __ccgo := true; __ccgo; __ccgo = lx < (*Deflate_state)(unsafe.Pointer(s)).Flast_lit { 17078 dist = uint32(*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr(lx)*2))) 17079 lc = int32(*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&lx, 1))))) 17080 if dist == uint32(0) { 17081 { 17082 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2))) 17083 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 17084 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4))) 17085 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17086 { 17087 { 17088 *(*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) 17089 } 17090 { 17091 *(*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) 17092 } 17093 17094 } 17095 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17096 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 17097 } else { 17098 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17099 *(*int32)(unsafe.Pointer(s + 5940)) += len 17100 } 17101 } 17102 // send a literal byte 17103 17104 } else { 17105 // Here, lc is the match length - MIN_MATCH 17106 code = uint32(X_length_code[lc]) 17107 { 17108 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4 + 2))) 17109 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 17110 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4))) 17111 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17112 { 17113 { 17114 *(*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) 17115 } 17116 { 17117 *(*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) 17118 } 17119 17120 } 17121 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17122 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 17123 } else { 17124 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17125 *(*int32)(unsafe.Pointer(s + 5940)) += len 17126 } 17127 } 17128 // send the length code 17129 extra = extra_lbits[code] 17130 if extra != 0 { 17131 lc = lc - base_length[code] 17132 { 17133 var len int32 = extra 17134 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 17135 var val int32 = lc 17136 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17137 { 17138 { 17139 *(*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) 17140 } 17141 { 17142 *(*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) 17143 } 17144 17145 } 17146 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17147 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 17148 } else { 17149 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(lc)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17150 *(*int32)(unsafe.Pointer(s + 5940)) += len 17151 } 17152 } 17153 // send the extra length bits 17154 } 17155 dist-- // dist is now the match distance - 1 17156 code = func() uint32 { 17157 if dist < uint32(256) { 17158 return uint32(X_dist_code[dist]) 17159 } 17160 return uint32(X_dist_code[uint32(256)+dist>>7]) 17161 }() 17162 17163 { 17164 var len int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2))) 17165 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 17166 var val int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4))) 17167 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17168 { 17169 { 17170 *(*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) 17171 } 17172 { 17173 *(*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) 17174 } 17175 17176 } 17177 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17178 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 17179 } else { 17180 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17181 *(*int32)(unsafe.Pointer(s + 5940)) += len 17182 } 17183 } 17184 // send the distance code 17185 extra = extra_dbits[code] 17186 if extra != 0 { 17187 dist = dist - uint32(base_dist[code]) 17188 { 17189 var len int32 = extra 17190 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 17191 var val int32 = int32(dist) 17192 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17193 { 17194 { 17195 *(*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) 17196 } 17197 { 17198 *(*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) 17199 } 17200 17201 } 17202 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17203 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 17204 } else { 17205 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(dist)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17206 *(*int32)(unsafe.Pointer(s + 5940)) += len 17207 } 17208 } 17209 // send the extra distance bits 17210 } 17211 } // literal or match pair ? 17212 17213 // Check that the overlay between pending_buf and d_buf+l_buf is ok: 17214 17215 } 17216 } 17217 17218 { 17219 var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 + 2))) 17220 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len { 17221 var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4))) 17222 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17223 { 17224 { 17225 *(*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) 17226 } 17227 { 17228 *(*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) 17229 } 17230 17231 } 17232 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)) 17233 *(*int32)(unsafe.Pointer(s + 5940)) += len - Buf_size 17234 } else { 17235 *(*Ush)(unsafe.Pointer(s + 5936)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + 256*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid) 17236 *(*int32)(unsafe.Pointer(s + 5940)) += len 17237 } 17238 } 17239 17240 } 17241 17242 // =========================================================================== 17243 // Check if the data type is TEXT or BINARY, using the following algorithm: 17244 // - TEXT if the two conditions below are satisfied: 17245 // a) There are no non-portable control characters belonging to the 17246 // "black list" (0..6, 14..25, 28..31). 17247 // b) There is at least one printable character belonging to the 17248 // "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). 17249 // - BINARY otherwise. 17250 // - The following partially-portable control characters form a 17251 // "gray list" that is ignored in this detection algorithm: 17252 // (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). 17253 // 17254 // IN assertion: the fields Freq of dyn_ltree are set. 17255 func detect_data_type(tls *libc.TLS, s uintptr) int32 { /* trees.c:1124:11: */ 17256 // black_mask is the bit mask of black-listed bytes 17257 // set bits 0..6, 14..25, and 28..31 17258 // 0xf3ffc07f = binary 11110011111111111100000001111111 17259 var black_mask uint64 = 0xf3ffc07f 17260 var n int32 17261 17262 // Check for non-textual ("black-listed") bytes. 17263 n = 0 17264 __1: 17265 if !(n <= 31) { 17266 goto __3 17267 } 17268 if black_mask&uint64(1) != 0 && int32(*(*Ush)(unsafe.Pointer(s + 212 + uintptr(n)*4))) != 0 { 17269 return Z_BINARY 17270 } 17271 goto __2 17272 __2: 17273 n++ 17274 black_mask >>= 1 17275 goto __1 17276 goto __3 17277 __3: 17278 ; 17279 17280 // Check for textual ("white-listed") bytes. 17281 if int32(*(*Ush)(unsafe.Pointer(s + 212 + 9*4))) != 0 || int32(*(*Ush)(unsafe.Pointer(s + 212 + 10*4))) != 0 || 17282 int32(*(*Ush)(unsafe.Pointer(s + 212 + 13*4))) != 0 { 17283 return Z_TEXT 17284 } 17285 for n = 32; n < LITERALS; n++ { 17286 if int32(*(*Ush)(unsafe.Pointer(s + 212 + uintptr(n)*4))) != 0 { 17287 return Z_TEXT 17288 } 17289 } 17290 17291 // There are no "black-listed" or "white-listed" bytes: 17292 // this stream either is empty or has tolerated ("gray-listed") bytes only. 17293 return Z_BINARY 17294 } 17295 17296 // =========================================================================== 17297 // Reverse the first len bits of a code, using straightforward code (a faster 17298 // method would use a table) 17299 // IN assertion: 1 <= len <= 15 17300 func bi_reverse(tls *libc.TLS, code uint32, len int32) uint32 { /* trees.c:1158:16: */ 17301 var res uint32 = uint32(0) 17302 for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&len, 1) > 0 { 17303 res = res | code&uint32(1) 17304 code >>= 1 17305 res <<= 1 17306 } 17307 return res >> 1 17308 } 17309 17310 // =========================================================================== 17311 // Flush the bit buffer, keeping at most 7 bits in it. 17312 func bi_flush(tls *libc.TLS, s uintptr) { /* trees.c:1173:12: */ 17313 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid == 16 { 17314 { 17315 { 17316 *(*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) 17317 } 17318 { 17319 *(*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) 17320 } 17321 17322 } 17323 17324 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 17325 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 17326 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid >= 8 { 17327 { 17328 *(*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) 17329 } 17330 17331 libc.AssignShrPtrUint16(s+5936, int(8)) 17332 *(*int32)(unsafe.Pointer(s + 5940)) -= 8 17333 } 17334 } 17335 17336 // =========================================================================== 17337 // Flush the bit buffer and align the output on a byte boundary 17338 func bi_windup(tls *libc.TLS, s uintptr) { /* trees.c:1190:12: */ 17339 if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 8 { 17340 { 17341 { 17342 *(*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) 17343 } 17344 { 17345 *(*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) 17346 } 17347 17348 } 17349 17350 } else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 { 17351 { 17352 *(*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) 17353 } 17354 17355 } 17356 (*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0) 17357 (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 17358 } 17359 17360 // =========================================================================== 17361 // 17362 // Decompresses the source buffer into the destination buffer. *sourceLen is 17363 // the byte length of the source buffer. Upon entry, *destLen is the total size 17364 // of the destination buffer, which must be large enough to hold the entire 17365 // uncompressed data. (The size of the uncompressed data must have been saved 17366 // previously by the compressor and transmitted to the decompressor by some 17367 // mechanism outside the scope of this compression library.) Upon exit, 17368 // *destLen is the size of the decompressed data and *sourceLen is the number 17369 // of source bytes consumed. Upon return, source + *sourceLen points to the 17370 // first unused input byte. 17371 // 17372 // uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough 17373 // memory, Z_BUF_ERROR if there was not enough room in the output buffer, or 17374 // Z_DATA_ERROR if the input data was corrupted, including if the input data is 17375 // an incomplete zlib stream. 17376 func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) int32 { /* uncompr.c:27:13: */ 17377 bp := tls.Alloc(120) 17378 defer tls.Free(120) 17379 17380 // var stream Z_stream at bp+8, 112 17381 17382 var err int32 17383 var max UInt = libc.Uint32(libc.Uint32FromInt32(-1)) 17384 var len ULong 17385 var left ULong 17386 // var buf [1]Byte at bp, 1 17387 // for detection of incomplete stream when *destLen == 0 17388 17389 len = *(*ULong)(unsafe.Pointer(sourceLen)) 17390 if *(*ULongf)(unsafe.Pointer(destLen)) != 0 { 17391 left = *(*ULongf)(unsafe.Pointer(destLen)) 17392 *(*ULongf)(unsafe.Pointer(destLen)) = uint64(0) 17393 } else { 17394 left = uint64(1) 17395 dest = bp /* &buf[0] */ 17396 } 17397 17398 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_in = source 17399 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = UInt(0) 17400 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzalloc = uintptr(0) 17401 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzfree = uintptr(0) 17402 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fopaque = uintptr(0) 17403 17404 err = XinflateInit_(tls, bp+8, ts, int32(unsafe.Sizeof(Z_stream{}))) 17405 if err != Z_OK { 17406 return err 17407 } 17408 17409 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_out = dest 17410 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = UInt(0) 17411 17412 for __ccgo := true; __ccgo; __ccgo = err == Z_OK { 17413 if (*Z_stream)(unsafe.Pointer(bp+8)).Favail_out == UInt(0) { 17414 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = func() uint32 { 17415 if left > ULong(max) { 17416 return max 17417 } 17418 return UInt(left) 17419 }() 17420 left = left - ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_out) 17421 } 17422 if (*Z_stream)(unsafe.Pointer(bp+8)).Favail_in == UInt(0) { 17423 (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = func() uint32 { 17424 if len > ULong(max) { 17425 return max 17426 } 17427 return UInt(len) 17428 }() 17429 len = len - ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_in) 17430 } 17431 err = Xinflate(tls, bp+8, Z_NO_FLUSH) 17432 } 17433 17434 *(*ULong)(unsafe.Pointer(sourceLen)) -= len + ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_in) 17435 if dest != bp { 17436 *(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Ftotal_out 17437 } else if (*Z_stream)(unsafe.Pointer(bp+8)).Ftotal_out != 0 && err == -5 { 17438 left = uint64(1) 17439 } 17440 17441 XinflateEnd(tls, bp+8) 17442 if err == Z_STREAM_END { 17443 return Z_OK 17444 } 17445 if err == Z_NEED_DICT { 17446 return -3 17447 } 17448 if err == -5 && left+ULong((*Z_stream)(unsafe.Pointer(bp+8)).Favail_out) != 0 { 17449 return -3 17450 } 17451 return err 17452 } 17453 17454 func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* uncompr.c:86:13: */ 17455 bp := tls.Alloc(8) 17456 defer tls.Free(8) 17457 *(*ULong)(unsafe.Pointer(bp)) = sourceLen 17458 17459 return Xuncompress2(tls, dest, destLen, source, bp) 17460 } 17461 17462 // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t 17463 // value -- needed when comparing unsigned to z_off64_t, which is signed 17464 // (possible z_off64_t types off_t, off64_t, and long are all signed) 17465 17466 var Xz_errmsg = [10]uintptr{ 17467 uintptr(ts + 876), 17468 uintptr(ts + 892), 17469 uintptr(ts + 101), 17470 uintptr(ts + 903), 17471 uintptr(ts + 914), 17472 uintptr(ts + 927), 17473 uintptr(ts + 938), 17474 uintptr(ts + 958), 17475 uintptr(ts + 971), 17476 uintptr(ts + 101), 17477 } /* zutil.c:13:14 */ 17478 17479 func XzlibVersion(tls *libc.TLS) uintptr { /* zutil.c:27:12: */ 17480 return ts /* "1.2.11" */ 17481 } 17482 17483 func XzlibCompileFlags(tls *libc.TLS) ULong { /* zutil.c:32:15: */ 17484 var flags ULong 17485 17486 flags = uint64(0) 17487 switch int32(unsafe.Sizeof(UInt(0))) { 17488 case 2: 17489 break 17490 case 4: 17491 flags = flags + uint64(1) 17492 break 17493 case 8: 17494 flags = flags + uint64(2) 17495 break 17496 default: 17497 flags = flags + uint64(3) 17498 } 17499 switch int32(unsafe.Sizeof(ULong(0))) { 17500 case 2: 17501 break 17502 case 4: 17503 flags = flags + uint64(int32(1)<<2) 17504 break 17505 case 8: 17506 flags = flags + uint64(int32(2)<<2) 17507 break 17508 default: 17509 flags = flags + uint64(int32(3)<<2) 17510 } 17511 switch int32(unsafe.Sizeof(Voidpf(0))) { 17512 case 2: 17513 break 17514 case 4: 17515 flags = flags + uint64(int32(1)<<4) 17516 break 17517 case 8: 17518 flags = flags + uint64(int32(2)<<4) 17519 break 17520 default: 17521 flags = flags + uint64(int32(3)<<4) 17522 } 17523 switch int32(unsafe.Sizeof(Off_t(0))) { 17524 case 2: 17525 break 17526 case 4: 17527 flags = flags + uint64(int32(1)<<6) 17528 break 17529 case 8: 17530 flags = flags + uint64(int32(2)<<6) 17531 break 17532 default: 17533 flags = flags + uint64(int32(3)<<6) 17534 } 17535 return flags 17536 } 17537 17538 // exported to allow conversion of error code to string for compress() and 17539 // uncompress() 17540 func XzError(tls *libc.TLS, err int32) uintptr { /* zutil.c:133:12: */ 17541 return Xz_errmsg[Z_NEED_DICT-err] 17542 } 17543 17544 func Xzcalloc(tls *libc.TLS, opaque Voidpf, items uint32, size uint32) Voidpf { /* zutil.c:305:22: */ 17545 _ = opaque 17546 if uint64(unsafe.Sizeof(UInt(0))) > uint64(2) { 17547 return libc.Xmalloc(tls, uint64(items*size)) 17548 } 17549 return libc.Xcalloc(tls, uint64(items), uint64(size)) 17550 } 17551 17552 func Xzcfree(tls *libc.TLS, opaque Voidpf, ptr Voidpf) { /* zutil.c:315:20: */ 17553 _ = opaque 17554 libc.Xfree(tls, ptr) 17555 } 17556 17557 func init() { 17558 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 8)) = deflate_stored // deflate.c:136:29: 17559 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 24)) = deflate_fast // deflate.c:137:29: 17560 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 40)) = deflate_fast // deflate.c:138:29: 17561 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 56)) = deflate_fast // deflate.c:139:29: 17562 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 72)) = deflate_slow // deflate.c:141:29: 17563 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 88)) = deflate_slow // deflate.c:142:29: 17564 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 104)) = deflate_slow // deflate.c:143:29: 17565 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 120)) = deflate_slow // deflate.c:144:29: 17566 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 136)) = deflate_slow // deflate.c:145:30: 17567 *(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 152)) = deflate_slow // deflate.c:146:30: 17568 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_bl_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_blbits)) // trees.c:132:22: 17569 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_dtree)) // trees.c:129:2: 17570 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_dbits)) // trees.c:129:16: 17571 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_ltree)) // trees.c:126:2: 17572 *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_lbits)) // trees.c:126:16: 17573 } 17574 17575 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" 17576 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data