modernc.org/z@v1.7.4/lib/z_freebsd_arm.go (about)

     1  // Code generated by 'ccgo -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -o lib/z_freebsd_arm.go -pkgname z -trace-translation-units /home/jnml/tmpdir/go-generate-478397193/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                              = 262144               // syslimits.h:54:1:
    24  	BASE                                 = 65521                // adler32.c:12:1:
    25  	BC_BASE_MAX                          = 99                   // limits.h:65:1:
    26  	BC_DIM_MAX                           = 2048                 // limits.h:66:1:
    27  	BC_SCALE_MAX                         = 99                   // limits.h:67:1:
    28  	BC_STRING_MAX                        = 1000                 // limits.h:68:1:
    29  	BIG_ENDIAN                           = 4321                 // _endian.h:70:1:
    30  	BYTE_ORDER                           = 1234                 // _endian.h:72:1:
    31  	CHARCLASS_NAME_MAX                   = 14                   // limits.h:69:1:
    32  	CHAR_BIT                             = 8                    // limits.h:40:1:
    33  	CHAR_MAX                             = 255                  // limits.h:48:1:
    34  	CHAR_MIN                             = 0                    // limits.h:49:1:
    35  	CHILD_MAX                            = 40                   // syslimits.h:57:1:
    36  	CLOSE_RANGE_CLOEXEC                  = 4                    // unistd.h:205:1:
    37  	COLL_WEIGHTS_MAX                     = 10                   // limits.h:70:1:
    38  	DEF_MEM_LEVEL                        = 8                    // zutil.h:66:1:
    39  	DEF_WBITS                            = 15                   // zutil.h:61:1:
    40  	DYN_TREES                            = 2                    // zutil.h:74:1:
    41  	EXIT_FAILURE                         = 1                    // stdlib.h:73:1:
    42  	EXIT_SUCCESS                         = 0                    // stdlib.h:74:1:
    43  	EXPR_NEST_MAX                        = 32                   // limits.h:71:1:
    44  	FAR                                  = 0                    // zconf.h:387:1:
    45  	FD_SETSIZE                           = 1024                 // select.h:61:1:
    46  	F_LOCK                               = 1                    // unistd.h:85:1:
    47  	F_OK                                 = 0                    // unistd.h:102:1:
    48  	F_TEST                               = 3                    // unistd.h:87:1:
    49  	F_TLOCK                              = 2                    // unistd.h:86:1:
    50  	F_ULOCK                              = 0                    // unistd.h:84:1:
    51  	GID_MAX                              = 4294967295           // limits.h:85:1:
    52  	HAVE_HIDDEN                          = 1                    // <defines>:2:1:
    53  	HAVE_MEMCPY                          = 0                    // zutil.h:218:1:
    54  	INT_MAX                              = 2147483647           // limits.h:60:1:
    55  	INT_MIN                              = -2147483648          // limits.h:61:1:
    56  	IOV_MAX                              = 1024                 // syslimits.h:70:1:
    57  	LINE_MAX                             = 2048                 // limits.h:72:1:
    58  	LITTLE_ENDIAN                        = 1234                 // _endian.h:69:1:
    59  	LLONG_MAX                            = 9223372036854775807  // limits.h:69:1:
    60  	LLONG_MIN                            = -9223372036854775808 // limits.h:70:1:
    61  	LONG_BIT                             = 32                   // limits.h:94:1:
    62  	LONG_MAX                             = 2147483647           // limits.h:64:1:
    63  	LONG_MIN                             = -2147483648          // limits.h:65:1:
    64  	L_INCR                               = 1                    // unistd.h:121:1:
    65  	L_SET                                = 0                    // unistd.h:120:1:
    66  	L_XTND                               = 2                    // unistd.h:122:1:
    67  	MAX_CANON                            = 255                  // syslimits.h:59:1:
    68  	MAX_INPUT                            = 255                  // syslimits.h:60:1:
    69  	MAX_MATCH                            = 258                  // zutil.h:78:1:
    70  	MAX_MEM_LEVEL                        = 9                    // zconf.h:260:1:
    71  	MAX_WBITS                            = 15                   // zconf.h:270:1:
    72  	MB_LEN_MAX                           = 6                    // limits.h:141:1:
    73  	MIN_MATCH                            = 3                    // zutil.h:77:1:
    74  	MQ_PRIO_MAX                          = 64                   // limits.h:99:1:
    75  	NAME_MAX                             = 255                  // syslimits.h:61:1:
    76  	NGROUPS_MAX                          = 1023                 // syslimits.h:63:1:
    77  	NL_ARGMAX                            = 4096                 // limits.h:125:1:
    78  	NL_LANGMAX                           = 31                   // limits.h:137:1:
    79  	NL_MSGMAX                            = 32767                // limits.h:126:1:
    80  	NL_NMAX                              = 1                    // limits.h:138:1:
    81  	NL_SETMAX                            = 255                  // limits.h:127:1:
    82  	NL_TEXTMAX                           = 2048                 // limits.h:128:1:
    83  	NMAX                                 = 5552                 // adler32.c:13:1:
    84  	OFF_MAX                              = 9223372036854775807  // limits.h:80:1:
    85  	OFF_MIN                              = -9223372036854775808 // limits.h:81:1:
    86  	OPEN_MAX                             = 64                   // syslimits.h:66:1:
    87  	OS_CODE                              = 3                    // zutil.h:198:1:
    88  	PASS_MAX                             = 128                  // limits.h:135:1:
    89  	PATH_MAX                             = 1024                 // syslimits.h:68:1:
    90  	PDP_ENDIAN                           = 3412                 // _endian.h:71:1:
    91  	PIPE_BUF                             = 512                  // syslimits.h:69:1:
    92  	PRESET_DICT                          = 0x20                 // zutil.h:81:1:
    93  	QUAD_MAX                             = 9223372036854775807  // limits.h:89:1:
    94  	QUAD_MIN                             = -9223372036854775808 // limits.h:90:1:
    95  	RAND_MAX                             = 0x7fffffff           // stdlib.h:80:1:
    96  	RE_DUP_MAX                           = 255                  // limits.h:73:1:
    97  	RFCENVG                              = 2048                 // unistd.h:178:1:
    98  	RFCFDG                               = 4096                 // unistd.h:179:1:
    99  	RFCNAMEG                             = 1024                 // unistd.h:177:1:
   100  	RFENVG                               = 2                    // unistd.h:171:1:
   101  	RFFDG                                = 4                    // unistd.h:172:1:
   102  	RFFLAGS                              = 2416930932           // unistd.h:195:1:
   103  	RFHIGHPID                            = 262144               // unistd.h:184:1:
   104  	RFKERNELONLY                         = 268828672            // unistd.h:198:1:
   105  	RFLINUXTHPN                          = 65536                // unistd.h:182:1:
   106  	RFMEM                                = 32                   // unistd.h:175:1:
   107  	RFNAMEG                              = 1                    // unistd.h:170:1:
   108  	RFNOTEG                              = 8                    // unistd.h:173:1:
   109  	RFNOWAIT                             = 64                   // unistd.h:176:1:
   110  	RFPPWAIT                             = 2147483648           // unistd.h:192:1:
   111  	RFPROC                               = 16                   // unistd.h:174:1:
   112  	RFPROCDESC                           = 268435456            // unistd.h:190:1:
   113  	RFSIGSHARE                           = 16384                // unistd.h:181:1:
   114  	RFSPAWN                              = 2147483648           // unistd.h:194:1:
   115  	RFSTOPPED                            = 131072               // unistd.h:183:1:
   116  	RFTHREAD                             = 8192                 // unistd.h:180:1:
   117  	RFTSIGMASK                           = 0xFF                 // unistd.h:187:1:
   118  	RFTSIGSHIFT                          = 20                   // unistd.h:186:1:
   119  	RFTSIGZMB                            = 524288               // unistd.h:185:1:
   120  	R_OK                                 = 0x04                 // unistd.h:105:1:
   121  	SCHAR_MAX                            = 127                  // limits.h:42:1:
   122  	SCHAR_MIN                            = -128                 // limits.h:43:1:
   123  	SEEK_CUR                             = 1                    // unistd.h:110:1:
   124  	SEEK_DATA                            = 3                    // unistd.h:114:1:
   125  	SEEK_END                             = 2                    // unistd.h:111:1:
   126  	SEEK_HOLE                            = 4                    // unistd.h:115:1:
   127  	SEEK_SET                             = 0                    // unistd.h:109:1:
   128  	SHRT_MAX                             = 32767                // limits.h:56:1:
   129  	SHRT_MIN                             = -32768               // limits.h:57:1:
   130  	SIZE_T_MAX                           = 4294967295           // limits.h:78:1:
   131  	SSIZE_MAX                            = 2147483647           // limits.h:74:1:
   132  	STATIC_TREES                         = 1                    // zutil.h:73:1:
   133  	STDC                                 = 0                    // zconf.h:203:1:
   134  	STDC99                               = 0                    // zconf.h:207:1:
   135  	STDERR_FILENO                        = 2                    // unistd.h:81:1:
   136  	STDIN_FILENO                         = 0                    // unistd.h:79:1:
   137  	STDOUT_FILENO                        = 1                    // unistd.h:80:1:
   138  	STORED_BLOCK                         = 0                    // zutil.h:72:1:
   139  	SWAPOFF_FORCE                        = 0x00000001           // unistd.h:200:1:
   140  	UCHAR_MAX                            = 255                  // limits.h:45:1:
   141  	UID_MAX                              = 4294967295           // limits.h:86:1:
   142  	UINT_MAX                             = 4294967295           // limits.h:59:1:
   143  	ULLONG_MAX                           = 18446744073709551615 // limits.h:68:1:
   144  	ULONG_MAX                            = 4294967295           // limits.h:63:1:
   145  	UQUAD_MAX                            = 18446744073709551615 // limits.h:88:1:
   146  	USHRT_MAX                            = 65535                // limits.h:55:1:
   147  	WORD_BIT                             = 32                   // limits.h:95:1:
   148  	W_OK                                 = 0x02                 // unistd.h:104:1:
   149  	X_OK                                 = 0x01                 // unistd.h:103:1:
   150  	ZCONF_H                              = 0                    // zconf.h:9:1:
   151  	ZEXPORT                              = 0                    // zconf.h:380:1:
   152  	ZEXPORTVA                            = 0                    // zconf.h:383:1:
   153  	ZLIB_H                               = 0                    // zlib.h:32:1:
   154  	ZLIB_VERNUM                          = 0x12b0               // zlib.h:41:1:
   155  	ZLIB_VERSION                         = "1.2.11"             // zlib.h:40:1:
   156  	ZLIB_VER_MAJOR                       = 1                    // zlib.h:42:1:
   157  	ZLIB_VER_MINOR                       = 2                    // zlib.h:43:1:
   158  	ZLIB_VER_REVISION                    = 11                   // zlib.h:44:1:
   159  	ZLIB_VER_SUBREVISION                 = 0                    // zlib.h:45:1:
   160  	ZUTIL_H                              = 0                    // zutil.h:14:1:
   161  	Z_ASCII                              = 1                    // zlib.h:205:1:
   162  	Z_BEST_COMPRESSION                   = 9                    // zlib.h:192:1:
   163  	Z_BEST_SPEED                         = 1                    // zlib.h:191:1:
   164  	Z_BINARY                             = 0                    // zlib.h:203:1:
   165  	Z_BLOCK                              = 5                    // zlib.h:173:1:
   166  	Z_BUF_ERROR                          = -5                   // zlib.h:184:1:
   167  	Z_DATA_ERROR                         = -3                   // zlib.h:182:1:
   168  	Z_DEFAULT_COMPRESSION                = -1                   // zlib.h:193:1:
   169  	Z_DEFAULT_STRATEGY                   = 0                    // zlib.h:200:1:
   170  	Z_DEFLATED                           = 8                    // zlib.h:209:1:
   171  	Z_ERRNO                              = -1                   // zlib.h:180:1:
   172  	Z_FILTERED                           = 1                    // zlib.h:196:1:
   173  	Z_FINISH                             = 4                    // zlib.h:172:1:
   174  	Z_FIXED                              = 4                    // zlib.h:199:1:
   175  	Z_FULL_FLUSH                         = 3                    // zlib.h:171:1:
   176  	Z_HAVE_STDARG_H                      = 0                    // zconf.h:439:1:
   177  	Z_HAVE_UNISTD_H                      = 0                    // zconf.h:435:1:
   178  	Z_HUFFMAN_ONLY                       = 2                    // zlib.h:197:1:
   179  	Z_MEM_ERROR                          = -4                   // zlib.h:183:1:
   180  	Z_NEED_DICT                          = 2                    // zlib.h:179:1:
   181  	Z_NO_COMPRESSION                     = 0                    // zlib.h:190:1:
   182  	Z_NO_FLUSH                           = 0                    // zlib.h:168:1:
   183  	Z_NULL                               = 0                    // zlib.h:212:1:
   184  	Z_OK                                 = 0                    // zlib.h:177:1:
   185  	Z_PARTIAL_FLUSH                      = 1                    // zlib.h:169:1:
   186  	Z_RLE                                = 3                    // zlib.h:198:1:
   187  	Z_STREAM_END                         = 1                    // zlib.h:178:1:
   188  	Z_STREAM_ERROR                       = -2                   // zlib.h:181:1:
   189  	Z_SYNC_FLUSH                         = 2                    // zlib.h:170:1:
   190  	Z_TEXT                               = 1                    // zlib.h:204:1:
   191  	Z_TREES                              = 6                    // zlib.h:174:1:
   192  	Z_UNKNOWN                            = 2                    // zlib.h:206:1:
   193  	Z_VERSION_ERROR                      = -6                   // zlib.h:185:1:
   194  	X_ACCMODE_T_DECLARED                 = 0                    // types.h:166:1:
   195  	X_BIG_ENDIAN                         = 4321                 // _endian.h:47:1:
   196  	X_BLKCNT_T_DECLARED                  = 0                    // types.h:90:1:
   197  	X_BLKSIZE_T_DECLARED                 = 0                    // types.h:81:1:
   198  	X_BYTE_ORDER                         = 1234                 // _endian.h:40:1:
   199  	X_CAP_IOCTL_T_DECLARED               = 0                    // types.h:243:1:
   200  	X_CAP_RIGHTS_T_DECLARED              = 0                    // types.h:248:1:
   201  	X_CLOCKID_T_DECLARED                 = 0                    // types.h:100:1:
   202  	X_CLOCK_T_DECLARED                   = 0                    // types.h:95:1:
   203  	X_CS_PATH                            = 1                    // unistd.h:302:1:
   204  	X_CS_POSIX_V6_ILP32_OFF32_CFLAGS     = 2                    // unistd.h:306:1:
   205  	X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS    = 3                    // unistd.h:307:1:
   206  	X_CS_POSIX_V6_ILP32_OFF32_LIBS       = 4                    // unistd.h:308:1:
   207  	X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS    = 5                    // unistd.h:309:1:
   208  	X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS   = 6                    // unistd.h:310:1:
   209  	X_CS_POSIX_V6_ILP32_OFFBIG_LIBS      = 7                    // unistd.h:311:1:
   210  	X_CS_POSIX_V6_LP64_OFF64_CFLAGS      = 8                    // unistd.h:312:1:
   211  	X_CS_POSIX_V6_LP64_OFF64_LDFLAGS     = 9                    // unistd.h:313:1:
   212  	X_CS_POSIX_V6_LP64_OFF64_LIBS        = 10                   // unistd.h:314:1:
   213  	X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS    = 11                   // unistd.h:315:1:
   214  	X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS   = 12                   // unistd.h:316:1:
   215  	X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS      = 13                   // unistd.h:317:1:
   216  	X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS  = 14                   // unistd.h:318:1:
   217  	X_DEV_T_DECLARED                     = 0                    // types.h:108:1:
   218  	X_ERRNO_T_DEFINED                    = 0                    // string.h:158:1:
   219  	X_FFLAGS_T_DECLARED                  = 0                    // types.h:113:1:
   220  	X_FILE_OFFSET_BITS                   = 64                   // <builtin>:25:1:
   221  	X_FSBLKCNT_T_DECLARED                = 0                    // types.h:121:1:
   222  	X_FTRUNCATE_DECLARED                 = 0                    // types.h:417:1:
   223  	X_GCC_MAX_ALIGN_T                    = 0                    // stddef.h:71:1:
   224  	X_GETOPT_DECLARED                    = 0                    // unistd.h:378:1:
   225  	X_GID_T_DECLARED                     = 0                    // types.h:126:1:
   226  	X_ID_T_DECLARED                      = 0                    // types.h:141:1:
   227  	X_ILP32                              = 1                    // <predefined>:1:1:
   228  	X_INO_T_DECLARED                     = 0                    // types.h:146:1:
   229  	X_INT16_T_DECLARED                   = 0                    // _stdint.h:42:1:
   230  	X_INT32_T_DECLARED                   = 0                    // _stdint.h:47:1:
   231  	X_INT64_T_DECLARED                   = 0                    // _stdint.h:52:1:
   232  	X_INT8_T_DECLARED                    = 0                    // _stdint.h:37:1:
   233  	X_INTMAX_T_DECLARED                  = 0                    // _stdint.h:85:1:
   234  	X_INTPTR_T_DECLARED                  = 0                    // _stdint.h:77:1:
   235  	X_IN_ADDR_T_DECLARED                 = 0                    // types.h:131:1:
   236  	X_IN_PORT_T_DECLARED                 = 0                    // types.h:136:1:
   237  	X_KEY_T_DECLARED                     = 0                    // types.h:151:1:
   238  	X_LARGEFILE64_SOURCE                 = 1                    // <defines>:1:1:
   239  	X_LIMITS_H_                          = 0                    // limits.h:36:1:
   240  	X_LITTLE_ENDIAN                      = 1234                 // _endian.h:46:1:
   241  	X_LOCALE_T_DEFINED                   = 0                    // _strings.h:29:1:
   242  	X_LSEEK_DECLARED                     = 0                    // types.h:421:1:
   243  	X_LWPID_T_DECLARED                   = 0                    // types.h:156:1:
   244  	X_MACHINE_ENDIAN_H_                  = 0                    // endian.h:36:1:
   245  	X_MACHINE_STDARG_H_                  = 0                    // stdarg.h:31:1:
   246  	X_MACHINE__LIMITS_H_                 = 0                    // _limits.h:36:1:
   247  	X_MACHINE__TYPES_H_                  = 0                    // _types.h:42:1:
   248  	X_MKDTEMP_DECLARED                   = 0                    // unistd.h:528:1:
   249  	X_MKNOD_DECLARED                     = 0                    // unistd.h:532:1:
   250  	X_MKSTEMP_DECLARED                   = 0                    // unistd.h:536:1:
   251  	X_MKTEMP_DECLARED                    = 0                    // unistd.h:541:1:
   252  	X_MMAP_DECLARED                      = 0                    // types.h:425:1:
   253  	X_MODE_T_DECLARED                    = 0                    // types.h:161:1:
   254  	X_MQD_T_DECLARED                     = 0                    // types.h:227:1:
   255  	X_NLINK_T_DECLARED                   = 0                    // types.h:171:1:
   256  	X_Nonnull                            = 0                    // cdefs.h:790:1:
   257  	X_Null_unspecified                   = 0                    // cdefs.h:792:1:
   258  	X_Nullable                           = 0                    // cdefs.h:791:1:
   259  	X_OFF64_T_DECLARED                   = 0                    // types.h:181:1:
   260  	X_OFF_T_DECLARED                     = 0                    // types.h:176:1:
   261  	X_OPTRESET_DECLARED                  = 0                    // unistd.h:592:1:
   262  	X_PC_ACL_EXTENDED                    = 59                   // unistd.h:153:1:
   263  	X_PC_ACL_NFS4                        = 64                   // unistd.h:158:1:
   264  	X_PC_ACL_PATH_MAX                    = 60                   // unistd.h:154:1:
   265  	X_PC_ALLOC_SIZE_MIN                  = 10                   // unistd.h:143:1:
   266  	X_PC_ASYNC_IO                        = 53                   // unistd.h:137:1:
   267  	X_PC_CAP_PRESENT                     = 61                   // unistd.h:155:1:
   268  	X_PC_CHOWN_RESTRICTED                = 7                    // unistd.h:132:1:
   269  	X_PC_FILESIZEBITS                    = 12                   // unistd.h:144:1:
   270  	X_PC_INF_PRESENT                     = 62                   // unistd.h:156:1:
   271  	X_PC_LINK_MAX                        = 1                    // unistd.h:126:1:
   272  	X_PC_MAC_PRESENT                     = 63                   // unistd.h:157:1:
   273  	X_PC_MAX_CANON                       = 2                    // unistd.h:127:1:
   274  	X_PC_MAX_INPUT                       = 3                    // unistd.h:128:1:
   275  	X_PC_MIN_HOLE_SIZE                   = 21                   // unistd.h:162:1:
   276  	X_PC_NAME_MAX                        = 4                    // unistd.h:129:1:
   277  	X_PC_NO_TRUNC                        = 8                    // unistd.h:133:1:
   278  	X_PC_PATH_MAX                        = 5                    // unistd.h:130:1:
   279  	X_PC_PIPE_BUF                        = 6                    // unistd.h:131:1:
   280  	X_PC_PRIO_IO                         = 54                   // unistd.h:138:1:
   281  	X_PC_REC_INCR_XFER_SIZE              = 14                   // unistd.h:145:1:
   282  	X_PC_REC_MAX_XFER_SIZE               = 15                   // unistd.h:146:1:
   283  	X_PC_REC_MIN_XFER_SIZE               = 16                   // unistd.h:147:1:
   284  	X_PC_REC_XFER_ALIGN                  = 17                   // unistd.h:148:1:
   285  	X_PC_SYMLINK_MAX                     = 18                   // unistd.h:149:1:
   286  	X_PC_SYNC_IO                         = 55                   // unistd.h:139:1:
   287  	X_PC_VDISABLE                        = 9                    // unistd.h:134:1:
   288  	X_PDP_ENDIAN                         = 3412                 // _endian.h:48:1:
   289  	X_PID_T_DECLARED                     = 0                    // types.h:186:1:
   290  	X_POSIX2_BC_BASE_MAX                 = 99                   // limits.h:75:1:
   291  	X_POSIX2_BC_DIM_MAX                  = 2048                 // limits.h:76:1:
   292  	X_POSIX2_BC_SCALE_MAX                = 99                   // limits.h:77:1:
   293  	X_POSIX2_BC_STRING_MAX               = 1000                 // limits.h:78:1:
   294  	X_POSIX2_CHARCLASS_NAME_MAX          = 14                   // limits.h:79:1:
   295  	X_POSIX2_CHAR_TERM                   = 1                    // unistd.h:127:1:
   296  	X_POSIX2_COLL_WEIGHTS_MAX            = 2                    // limits.h:80:1:
   297  	X_POSIX2_C_BIND                      = 200112               // unistd.h:125:1:
   298  	X_POSIX2_C_DEV                       = -1                   // unistd.h:126:1:
   299  	X_POSIX2_EQUIV_CLASS_MAX             = 2                    // limits.h:81:1:
   300  	X_POSIX2_EXPR_NEST_MAX               = 32                   // limits.h:82:1:
   301  	X_POSIX2_FORT_DEV                    = -1                   // unistd.h:128:1:
   302  	X_POSIX2_FORT_RUN                    = 200112               // unistd.h:129:1:
   303  	X_POSIX2_LINE_MAX                    = 2048                 // limits.h:83:1:
   304  	X_POSIX2_LOCALEDEF                   = -1                   // unistd.h:130:1:
   305  	X_POSIX2_PBS                         = -1                   // unistd.h:131:1:
   306  	X_POSIX2_PBS_ACCOUNTING              = -1                   // unistd.h:132:1:
   307  	X_POSIX2_PBS_CHECKPOINT              = -1                   // unistd.h:133:1:
   308  	X_POSIX2_PBS_LOCATE                  = -1                   // unistd.h:134:1:
   309  	X_POSIX2_PBS_MESSAGE                 = -1                   // unistd.h:135:1:
   310  	X_POSIX2_PBS_TRACK                   = -1                   // unistd.h:136:1:
   311  	X_POSIX2_RE_DUP_MAX                  = 255                  // limits.h:84:1:
   312  	X_POSIX2_SW_DEV                      = -1                   // unistd.h:137:1:
   313  	X_POSIX2_UPE                         = 200112               // unistd.h:138:1:
   314  	X_POSIX2_VERSION                     = 199212               // unistd.h:154:1:
   315  	X_POSIX_ADVISORY_INFO                = 200112               // unistd.h:54:1:
   316  	X_POSIX_AIO_LISTIO_MAX               = 2                    // limits.h:89:1:
   317  	X_POSIX_AIO_MAX                      = 1                    // limits.h:90:1:
   318  	X_POSIX_ARG_MAX                      = 4096                 // limits.h:41:1:
   319  	X_POSIX_ASYNCHRONOUS_IO              = 200112               // unistd.h:55:1:
   320  	X_POSIX_BARRIERS                     = 200112               // unistd.h:104:1:
   321  	X_POSIX_CHILD_MAX                    = 25                   // limits.h:51:1:
   322  	X_POSIX_CHOWN_RESTRICTED             = 1                    // unistd.h:56:1:
   323  	X_POSIX_CLOCKRES_MIN                 = 20000000             // limits.h:100:1:
   324  	X_POSIX_CLOCK_SELECTION              = -1                   // unistd.h:57:1:
   325  	X_POSIX_CPUTIME                      = 200112               // unistd.h:105:1:
   326  	X_POSIX_DELAYTIMER_MAX               = 32                   // limits.h:91:1:
   327  	X_POSIX_FSYNC                        = 200112               // unistd.h:59:1:
   328  	X_POSIX_HOST_NAME_MAX                = 255                  // limits.h:110:1:
   329  	X_POSIX_IPV6                         = 0                    // unistd.h:60:1:
   330  	X_POSIX_JOB_CONTROL                  = 1                    // unistd.h:61:1:
   331  	X_POSIX_LINK_MAX                     = 8                    // limits.h:42:1:
   332  	X_POSIX_LOGIN_NAME_MAX               = 9                    // limits.h:111:1:
   333  	X_POSIX_MAPPED_FILES                 = 200112               // unistd.h:62:1:
   334  	X_POSIX_MAX_CANON                    = 255                  // limits.h:43:1:
   335  	X_POSIX_MAX_INPUT                    = 255                  // limits.h:44:1:
   336  	X_POSIX_MEMLOCK                      = -1                   // unistd.h:63:1:
   337  	X_POSIX_MEMLOCK_RANGE                = 200112               // unistd.h:64:1:
   338  	X_POSIX_MEMORY_PROTECTION            = 200112               // unistd.h:65:1:
   339  	X_POSIX_MESSAGE_PASSING              = 200112               // unistd.h:66:1:
   340  	X_POSIX_MONOTONIC_CLOCK              = 200112               // unistd.h:67:1:
   341  	X_POSIX_MQ_OPEN_MAX                  = 8                    // limits.h:92:1:
   342  	X_POSIX_MQ_PRIO_MAX                  = 32                   // limits.h:93:1:
   343  	X_POSIX_NAME_MAX                     = 14                   // limits.h:45:1:
   344  	X_POSIX_NGROUPS_MAX                  = 8                    // limits.h:52:1:
   345  	X_POSIX_NO_TRUNC                     = 1                    // unistd.h:68:1:
   346  	X_POSIX_OPEN_MAX                     = 20                   // limits.h:53:1:
   347  	X_POSIX_PATH_MAX                     = 256                  // limits.h:54:1:
   348  	X_POSIX_PIPE_BUF                     = 512                  // limits.h:46:1:
   349  	X_POSIX_PRIORITIZED_IO               = -1                   // unistd.h:69:1:
   350  	X_POSIX_PRIORITY_SCHEDULING          = 0                    // unistd.h:70:1:
   351  	X_POSIX_RAW_SOCKETS                  = 200112               // unistd.h:71:1:
   352  	X_POSIX_READER_WRITER_LOCKS          = 200112               // unistd.h:106:1:
   353  	X_POSIX_REALTIME_SIGNALS             = 200112               // unistd.h:72:1:
   354  	X_POSIX_REGEXP                       = 1                    // unistd.h:107:1:
   355  	X_POSIX_RE_DUP_MAX                   = 255                  // limits.h:121:1:
   356  	X_POSIX_RTSIG_MAX                    = 8                    // limits.h:94:1:
   357  	X_POSIX_SEMAPHORES                   = 200112               // unistd.h:73:1:
   358  	X_POSIX_SEM_NSEMS_MAX                = 256                  // limits.h:95:1:
   359  	X_POSIX_SEM_VALUE_MAX                = 32767                // limits.h:96:1:
   360  	X_POSIX_SHARED_MEMORY_OBJECTS        = 200112               // unistd.h:74:1:
   361  	X_POSIX_SHELL                        = 1                    // unistd.h:108:1:
   362  	X_POSIX_SIGQUEUE_MAX                 = 32                   // limits.h:97:1:
   363  	X_POSIX_SPAWN                        = 200112               // unistd.h:109:1:
   364  	X_POSIX_SPIN_LOCKS                   = 200112               // unistd.h:110:1:
   365  	X_POSIX_SPORADIC_SERVER              = -1                   // unistd.h:75:1:
   366  	X_POSIX_SSIZE_MAX                    = 32767                // limits.h:47:1:
   367  	X_POSIX_SS_REPL_MAX                  = 4                    // limits.h:112:1:
   368  	X_POSIX_STREAM_MAX                   = 8                    // limits.h:48:1:
   369  	X_POSIX_SYMLINK_MAX                  = 255                  // limits.h:113:1:
   370  	X_POSIX_SYMLOOP_MAX                  = 8                    // limits.h:114:1:
   371  	X_POSIX_SYNCHRONIZED_IO              = -1                   // unistd.h:76:1:
   372  	X_POSIX_THREADS                      = 200112               // unistd.h:120:1:
   373  	X_POSIX_THREAD_ATTR_STACKADDR        = 200112               // unistd.h:111:1:
   374  	X_POSIX_THREAD_ATTR_STACKSIZE        = 200112               // unistd.h:112:1:
   375  	X_POSIX_THREAD_CPUTIME               = 200112               // unistd.h:113:1:
   376  	X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4                    // limits.h:104:1:
   377  	X_POSIX_THREAD_KEYS_MAX              = 128                  // limits.h:105:1:
   378  	X_POSIX_THREAD_PRIORITY_SCHEDULING   = 200112               // unistd.h:116:1:
   379  	X_POSIX_THREAD_PRIO_INHERIT          = 200112               // unistd.h:114:1:
   380  	X_POSIX_THREAD_PRIO_PROTECT          = 200112               // unistd.h:115:1:
   381  	X_POSIX_THREAD_PROCESS_SHARED        = 200112               // unistd.h:117:1:
   382  	X_POSIX_THREAD_SAFE_FUNCTIONS        = -1                   // unistd.h:118:1:
   383  	X_POSIX_THREAD_SPORADIC_SERVER       = -1                   // unistd.h:119:1:
   384  	X_POSIX_THREAD_THREADS_MAX           = 64                   // limits.h:106:1:
   385  	X_POSIX_TIMEOUTS                     = 200112               // unistd.h:77:1:
   386  	X_POSIX_TIMERS                       = 200112               // unistd.h:78:1:
   387  	X_POSIX_TIMER_MAX                    = 32                   // limits.h:98:1:
   388  	X_POSIX_TRACE                        = -1                   // unistd.h:121:1:
   389  	X_POSIX_TRACE_EVENT_FILTER           = -1                   // unistd.h:122:1:
   390  	X_POSIX_TRACE_EVENT_NAME_MAX         = 30                   // limits.h:115:1:
   391  	X_POSIX_TRACE_INHERIT                = -1                   // unistd.h:123:1:
   392  	X_POSIX_TRACE_LOG                    = -1                   // unistd.h:124:1:
   393  	X_POSIX_TRACE_NAME_MAX               = 8                    // limits.h:116:1:
   394  	X_POSIX_TRACE_SYS_MAX                = 8                    // limits.h:117:1:
   395  	X_POSIX_TRACE_USER_EVENT_MAX         = 32                   // limits.h:118:1:
   396  	X_POSIX_TTY_NAME_MAX                 = 9                    // limits.h:119:1:
   397  	X_POSIX_TYPED_MEMORY_OBJECTS         = -1                   // unistd.h:79:1:
   398  	X_POSIX_TZNAME_MAX                   = 6                    // limits.h:55:1:
   399  	X_POSIX_VDISABLE                     = 0xff                 // unistd.h:80:1:
   400  	X_POSIX_VERSION                      = 200112               // unistd.h:99:1:
   401  	X_PTHREAD_T_DECLARED                 = 0                    // _pthreadtypes.h:68:1:
   402  	X_PTRDIFF_T_DECLARED                 = 0                    // stddef.h:45:1:
   403  	X_QUAD_HIGHWORD                      = 1                    // _endian.h:55:1:
   404  	X_QUAD_LOWWORD                       = 0                    // _endian.h:56:1:
   405  	X_RLIM_T_DECLARED                    = 0                    // types.h:193:1:
   406  	X_RSIZE_T_DEFINED                    = 0                    // stddef.h:80:1:
   407  	X_RUNE_T_DECLARED                    = 0                    // stddef.h:51:1:
   408  	X_SC_2_CHAR_TERM                     = 20                   // unistd.h:184:1:
   409  	X_SC_2_C_BIND                        = 18                   // unistd.h:182:1:
   410  	X_SC_2_C_DEV                         = 19                   // unistd.h:183:1:
   411  	X_SC_2_FORT_DEV                      = 21                   // unistd.h:185:1:
   412  	X_SC_2_FORT_RUN                      = 22                   // unistd.h:186:1:
   413  	X_SC_2_LOCALEDEF                     = 23                   // unistd.h:187:1:
   414  	X_SC_2_PBS                           = 59                   // unistd.h:222:1:
   415  	X_SC_2_PBS_ACCOUNTING                = 60                   // unistd.h:223:1:
   416  	X_SC_2_PBS_CHECKPOINT                = 61                   // unistd.h:224:1:
   417  	X_SC_2_PBS_LOCATE                    = 62                   // unistd.h:225:1:
   418  	X_SC_2_PBS_MESSAGE                   = 63                   // unistd.h:226:1:
   419  	X_SC_2_PBS_TRACK                     = 64                   // unistd.h:227:1:
   420  	X_SC_2_SW_DEV                        = 24                   // unistd.h:188:1:
   421  	X_SC_2_UPE                           = 25                   // unistd.h:189:1:
   422  	X_SC_2_VERSION                       = 17                   // unistd.h:181:1:
   423  	X_SC_ADVISORY_INFO                   = 65                   // unistd.h:228:1:
   424  	X_SC_AIO_LISTIO_MAX                  = 42                   // unistd.h:208:1:
   425  	X_SC_AIO_MAX                         = 43                   // unistd.h:209:1:
   426  	X_SC_AIO_PRIO_DELTA_MAX              = 44                   // unistd.h:210:1:
   427  	X_SC_ARG_MAX                         = 1                    // unistd.h:165:1:
   428  	X_SC_ASYNCHRONOUS_IO                 = 28                   // unistd.h:194:1:
   429  	X_SC_ATEXIT_MAX                      = 107                  // unistd.h:276:1:
   430  	X_SC_BARRIERS                        = 66                   // unistd.h:229:1:
   431  	X_SC_BC_BASE_MAX                     = 9                    // unistd.h:173:1:
   432  	X_SC_BC_DIM_MAX                      = 10                   // unistd.h:174:1:
   433  	X_SC_BC_SCALE_MAX                    = 11                   // unistd.h:175:1:
   434  	X_SC_BC_STRING_MAX                   = 12                   // unistd.h:176:1:
   435  	X_SC_CHILD_MAX                       = 2                    // unistd.h:166:1:
   436  	X_SC_CLK_TCK                         = 3                    // unistd.h:167:1:
   437  	X_SC_CLOCK_SELECTION                 = 67                   // unistd.h:230:1:
   438  	X_SC_COLL_WEIGHTS_MAX                = 13                   // unistd.h:177:1:
   439  	X_SC_CPUSET_SIZE                     = 122                  // unistd.h:294:1:
   440  	X_SC_CPUTIME                         = 68                   // unistd.h:231:1:
   441  	X_SC_DELAYTIMER_MAX                  = 45                   // unistd.h:211:1:
   442  	X_SC_EXPR_NEST_MAX                   = 14                   // unistd.h:178:1:
   443  	X_SC_FILE_LOCKING                    = 69                   // unistd.h:232:1:
   444  	X_SC_FSYNC                           = 38                   // unistd.h:204:1:
   445  	X_SC_GETGR_R_SIZE_MAX                = 70                   // unistd.h:233:1:
   446  	X_SC_GETPW_R_SIZE_MAX                = 71                   // unistd.h:234:1:
   447  	X_SC_HOST_NAME_MAX                   = 72                   // unistd.h:235:1:
   448  	X_SC_IOV_MAX                         = 56                   // unistd.h:277:1:
   449  	X_SC_IPV6                            = 118                  // unistd.h:270:1:
   450  	X_SC_JOB_CONTROL                     = 6                    // unistd.h:170:1:
   451  	X_SC_LINE_MAX                        = 15                   // unistd.h:179:1:
   452  	X_SC_LOGIN_NAME_MAX                  = 73                   // unistd.h:236:1:
   453  	X_SC_MAPPED_FILES                    = 29                   // unistd.h:195:1:
   454  	X_SC_MEMLOCK                         = 30                   // unistd.h:196:1:
   455  	X_SC_MEMLOCK_RANGE                   = 31                   // unistd.h:197:1:
   456  	X_SC_MEMORY_PROTECTION               = 32                   // unistd.h:198:1:
   457  	X_SC_MESSAGE_PASSING                 = 33                   // unistd.h:199:1:
   458  	X_SC_MONOTONIC_CLOCK                 = 74                   // unistd.h:237:1:
   459  	X_SC_MQ_OPEN_MAX                     = 46                   // unistd.h:212:1:
   460  	X_SC_MQ_PRIO_MAX                     = 75                   // unistd.h:238:1:
   461  	X_SC_NGROUPS_MAX                     = 4                    // unistd.h:168:1:
   462  	X_SC_NPROCESSORS_CONF                = 57                   // unistd.h:292:1:
   463  	X_SC_NPROCESSORS_ONLN                = 58                   // unistd.h:293:1:
   464  	X_SC_OPEN_MAX                        = 5                    // unistd.h:169:1:
   465  	X_SC_PAGESIZE                        = 47                   // unistd.h:213:1:
   466  	X_SC_PAGE_SIZE                       = 47                   // unistd.h:278:1:
   467  	X_SC_PHYS_PAGES                      = 121                  // unistd.h:298:1:
   468  	X_SC_PRIORITIZED_IO                  = 34                   // unistd.h:200:1:
   469  	X_SC_PRIORITY_SCHEDULING             = 35                   // unistd.h:201:1:
   470  	X_SC_RAW_SOCKETS                     = 119                  // unistd.h:271:1:
   471  	X_SC_READER_WRITER_LOCKS             = 76                   // unistd.h:239:1:
   472  	X_SC_REALTIME_SIGNALS                = 36                   // unistd.h:202:1:
   473  	X_SC_REGEXP                          = 77                   // unistd.h:240:1:
   474  	X_SC_RE_DUP_MAX                      = 16                   // unistd.h:180:1:
   475  	X_SC_RTSIG_MAX                       = 48                   // unistd.h:214:1:
   476  	X_SC_SAVED_IDS                       = 7                    // unistd.h:171:1:
   477  	X_SC_SEMAPHORES                      = 37                   // unistd.h:203:1:
   478  	X_SC_SEM_NSEMS_MAX                   = 49                   // unistd.h:215:1:
   479  	X_SC_SEM_VALUE_MAX                   = 50                   // unistd.h:216:1:
   480  	X_SC_SHARED_MEMORY_OBJECTS           = 39                   // unistd.h:205:1:
   481  	X_SC_SHELL                           = 78                   // unistd.h:241:1:
   482  	X_SC_SIGQUEUE_MAX                    = 51                   // unistd.h:217:1:
   483  	X_SC_SPAWN                           = 79                   // unistd.h:242:1:
   484  	X_SC_SPIN_LOCKS                      = 80                   // unistd.h:243:1:
   485  	X_SC_SPORADIC_SERVER                 = 81                   // unistd.h:244:1:
   486  	X_SC_STREAM_MAX                      = 26                   // unistd.h:190:1:
   487  	X_SC_SYMLOOP_MAX                     = 120                  // unistd.h:272:1:
   488  	X_SC_SYNCHRONIZED_IO                 = 40                   // unistd.h:206:1:
   489  	X_SC_THREADS                         = 96                   // unistd.h:259:1:
   490  	X_SC_THREAD_ATTR_STACKADDR           = 82                   // unistd.h:245:1:
   491  	X_SC_THREAD_ATTR_STACKSIZE           = 83                   // unistd.h:246:1:
   492  	X_SC_THREAD_CPUTIME                  = 84                   // unistd.h:247:1:
   493  	X_SC_THREAD_DESTRUCTOR_ITERATIONS    = 85                   // unistd.h:248:1:
   494  	X_SC_THREAD_KEYS_MAX                 = 86                   // unistd.h:249:1:
   495  	X_SC_THREAD_PRIORITY_SCHEDULING      = 89                   // unistd.h:252:1:
   496  	X_SC_THREAD_PRIO_INHERIT             = 87                   // unistd.h:250:1:
   497  	X_SC_THREAD_PRIO_PROTECT             = 88                   // unistd.h:251:1:
   498  	X_SC_THREAD_PROCESS_SHARED           = 90                   // unistd.h:253:1:
   499  	X_SC_THREAD_SAFE_FUNCTIONS           = 91                   // unistd.h:254:1:
   500  	X_SC_THREAD_SPORADIC_SERVER          = 92                   // unistd.h:255:1:
   501  	X_SC_THREAD_STACK_MIN                = 93                   // unistd.h:256:1:
   502  	X_SC_THREAD_THREADS_MAX              = 94                   // unistd.h:257:1:
   503  	X_SC_TIMEOUTS                        = 95                   // unistd.h:258:1:
   504  	X_SC_TIMERS                          = 41                   // unistd.h:207:1:
   505  	X_SC_TIMER_MAX                       = 52                   // unistd.h:218:1:
   506  	X_SC_TRACE                           = 97                   // unistd.h:260:1:
   507  	X_SC_TRACE_EVENT_FILTER              = 98                   // unistd.h:261:1:
   508  	X_SC_TRACE_INHERIT                   = 99                   // unistd.h:262:1:
   509  	X_SC_TRACE_LOG                       = 100                  // unistd.h:263:1:
   510  	X_SC_TTY_NAME_MAX                    = 101                  // unistd.h:264:1:
   511  	X_SC_TYPED_MEMORY_OBJECTS            = 102                  // unistd.h:265:1:
   512  	X_SC_TZNAME_MAX                      = 27                   // unistd.h:191:1:
   513  	X_SC_V6_ILP32_OFF32                  = 103                  // unistd.h:266:1:
   514  	X_SC_V6_ILP32_OFFBIG                 = 104                  // unistd.h:267:1:
   515  	X_SC_V6_LP64_OFF64                   = 105                  // unistd.h:268:1:
   516  	X_SC_V6_LPBIG_OFFBIG                 = 106                  // unistd.h:269:1:
   517  	X_SC_VERSION                         = 8                    // unistd.h:172:1:
   518  	X_SC_XOPEN_CRYPT                     = 108                  // unistd.h:279:1:
   519  	X_SC_XOPEN_ENH_I18N                  = 109                  // unistd.h:280:1:
   520  	X_SC_XOPEN_LEGACY                    = 110                  // unistd.h:281:1:
   521  	X_SC_XOPEN_REALTIME                  = 111                  // unistd.h:282:1:
   522  	X_SC_XOPEN_REALTIME_THREADS          = 112                  // unistd.h:283:1:
   523  	X_SC_XOPEN_SHM                       = 113                  // unistd.h:284:1:
   524  	X_SC_XOPEN_STREAMS                   = 114                  // unistd.h:285:1:
   525  	X_SC_XOPEN_UNIX                      = 115                  // unistd.h:286:1:
   526  	X_SC_XOPEN_VERSION                   = 116                  // unistd.h:287:1:
   527  	X_SC_XOPEN_XCU_VERSION               = 117                  // unistd.h:288:1:
   528  	X_SELECT_DECLARED                    = 0                    // select.h:103:1:
   529  	X_SIGSET_T_DECLARED                  = 0                    // select.h:50:1:
   530  	X_SIG_MAXSIG                         = 128                  // _sigset.h:47:1:
   531  	X_SIG_WORDS                          = 4                    // _sigset.h:46:1:
   532  	X_SIZE_T_DECLARED                    = 0                    // stddef.h:57:1:
   533  	X_SSIZE_T_DECLARED                   = 0                    // types.h:207:1:
   534  	X_STDDEF_H_                          = 0                    // stddef.h:37:1:
   535  	X_STDLIB_H_                          = 0                    // stdlib.h:36:1:
   536  	X_STRINGS_H_                         = 0                    // strings.h:32:1:
   537  	X_STRING_H_                          = 0                    // string.h:36:1:
   538  	X_SUSECONDS_T_DECLARED               = 0                    // types.h:212:1:
   539  	X_SWAB_DECLARED                      = 0                    // unistd.h:461:1:
   540  	X_SYS_CDEFS_H_                       = 0                    // cdefs.h:39:1:
   541  	X_SYS_LIMITS_H_                      = 0                    // limits.h:35:1:
   542  	X_SYS_SELECT_H_                      = 0                    // select.h:35:1:
   543  	X_SYS_SYSLIMITS_H_                   = 0                    // syslimits.h:36:1:
   544  	X_SYS_TIMESPEC_H_                    = 0                    // timespec.h:37:1:
   545  	X_SYS_TYPES_H_                       = 0                    // types.h:41:1:
   546  	X_SYS_UNISTD_H_                      = 0                    // unistd.h:36:1:
   547  	X_SYS__ENDIAN_H_                     = 0                    // _endian.h:33:1:
   548  	X_SYS__PTHREADTYPES_H_               = 0                    // _pthreadtypes.h:39:1:
   549  	X_SYS__SIGSET_H_                     = 0                    // _sigset.h:41:1:
   550  	X_SYS__STDARG_H_                     = 0                    // _stdarg.h:34:1:
   551  	X_SYS__STDINT_H_                     = 0                    // _stdint.h:33:1:
   552  	X_SYS__TIMESPEC_H_                   = 0                    // _timespec.h:37:1:
   553  	X_SYS__TIMEVAL_H_                    = 0                    // _timeval.h:32:1:
   554  	X_SYS__TYPES_H_                      = 0                    // _types.h:32:1:
   555  	X_TIMER_T_DECLARED                   = 0                    // types.h:222:1:
   556  	X_TIME_T_DECLARED                    = 0                    // types.h:217:1:
   557  	X_TRUNCATE_DECLARED                  = 0                    // types.h:429:1:
   558  	X_UID_T_DECLARED                     = 0                    // types.h:234:1:
   559  	X_UINT16_T_DECLARED                  = 0                    // _stdint.h:62:1:
   560  	X_UINT32_T_DECLARED                  = 0                    // _stdint.h:67:1:
   561  	X_UINT64_T_DECLARED                  = 0                    // _stdint.h:72:1:
   562  	X_UINT8_T_DECLARED                   = 0                    // _stdint.h:57:1:
   563  	X_UINTMAX_T_DECLARED                 = 0                    // _stdint.h:89:1:
   564  	X_UINTPTR_T_DECLARED                 = 0                    // _stdint.h:81:1:
   565  	X_UNISTD_H_                          = 0                    // unistd.h:36:1:
   566  	X_USECONDS_T_DECLARED                = 0                    // types.h:239:1:
   567  	X_V6_ILP32_OFF32                     = -1                   // unistd.h:139:1:
   568  	X_V6_ILP32_OFFBIG                    = 0                    // unistd.h:140:1:
   569  	X_V6_LP64_OFF64                      = 0                    // unistd.h:141:1:
   570  	X_V6_LPBIG_OFFBIG                    = -1                   // unistd.h:142:1:
   571  	X_VA_LIST_DECLARED                   = 0                    // _stdarg.h:40:3:
   572  	X_WCHAR_T_DECLARED                   = 0                    // stddef.h:63:1:
   573  	X_XLOCALE_STRING1_H                  = 0                    // _string.h:42:1:
   574  	X_XLOCALE_STRINGS1_H                 = 0                    // _strings.h:40:1:
   575  	X_XOPEN_CRYPT                        = -1                   // unistd.h:145:1:
   576  	X_XOPEN_ENH_I18N                     = -1                   // unistd.h:146:1:
   577  	X_XOPEN_IOV_MAX                      = 16                   // limits.h:132:1:
   578  	X_XOPEN_LEGACY                       = -1                   // unistd.h:147:1:
   579  	X_XOPEN_NAME_MAX                     = 255                  // limits.h:133:1:
   580  	X_XOPEN_PATH_MAX                     = 1024                 // limits.h:134:1:
   581  	X_XOPEN_REALTIME                     = -1                   // unistd.h:148:1:
   582  	X_XOPEN_REALTIME_THREADS             = -1                   // unistd.h:149:1:
   583  	X_XOPEN_SHM                          = 1                    // unistd.h:83:1:
   584  	X_XOPEN_STREAMS                      = -1                   // unistd.h:84:1:
   585  	X_XOPEN_UNIX                         = -1                   // unistd.h:150:1:
   586  	Unix                                 = 1                    // <predefined>:367:1:
   587  	Z_const                              = 0                    // zconf.h:237:1:
   588  	BYFOUR                               = 0                    // crc32.c:35:1:
   589  	GF2_DIM                              = 32                   // crc32.c:341:1:
   590  	TBLS                                 = 8                    // crc32.c:42:1:
   591  	BL_CODES                             = 19                   // deflate.h:42:1:
   592  	BUSY_STATE                           = 113                  // deflate.h:62:1:
   593  	Buf_size                             = 16                   // deflate.h:51:1:
   594  	COMMENT_STATE                        = 91                   // deflate.h:60:1:
   595  	DEFLATE_H                            = 0                    // deflate.h:14:1:
   596  	D_CODES                              = 30                   // deflate.h:39:1:
   597  	EXTRA_STATE                          = 69                   // deflate.h:58:1:
   598  	FINISH_STATE                         = 666                  // deflate.h:63:1:
   599  	GZIP                                 = 0                    // deflate.h:23:1:
   600  	GZIP_STATE                           = 57                   // deflate.h:56:1:
   601  	HCRC_STATE                           = 103                  // deflate.h:61:1:
   602  	HEAP_SIZE                            = 573                  // deflate.h:45:1:
   603  	INIT_STATE                           = 42                   // deflate.h:54:1:
   604  	LENGTH_CODES                         = 29                   // deflate.h:30:1:
   605  	LITERALS                             = 256                  // deflate.h:33:1:
   606  	L_CODES                              = 286                  // deflate.h:36:1:
   607  	MAX_BITS                             = 15                   // deflate.h:48:1:
   608  	MAX_STORED                           = 65535                // deflate.c:1623:1:
   609  	MIN_LOOKAHEAD                        = 262                  // deflate.h:284:1:
   610  	NAME_STATE                           = 73                   // deflate.h:59:1:
   611  	NIL                                  = 0                    // deflate.c:107:1:
   612  	TOO_FAR                              = 4096                 // deflate.c:111:1:
   613  	WIN_INIT                             = 258                  // deflate.h:294:1:
   614  	AT_EACCESS                           = 0x0100               // fcntl.h:224:1:
   615  	AT_EMPTY_PATH                        = 0x4000               // fcntl.h:234:1:
   616  	AT_FDCWD                             = -100                 // fcntl.h:219:1:
   617  	AT_REMOVEDIR                         = 0x0800               // fcntl.h:228:1:
   618  	AT_RESOLVE_BENEATH                   = 0x2000               // fcntl.h:232:1:
   619  	AT_SYMLINK_FOLLOW                    = 0x0400               // fcntl.h:227:1:
   620  	AT_SYMLINK_NOFOLLOW                  = 0x0200               // fcntl.h:226:1:
   621  	BUFSIZ                               = 1024                 // stdio.h:209:1:
   622  	COPY1                                = 1                    // gzguts.h:166:1:
   623  	E2BIG                                = 7                    // errno.h:57:1:
   624  	EACCES                               = 13                   // errno.h:64:1:
   625  	EAGAIN                               = 35                   // errno.h:94:1:
   626  	EBADF                                = 9                    // errno.h:59:1:
   627  	EBADMSG                              = 89                   // errno.h:173:1:
   628  	EBUSY                                = 16                   // errno.h:69:1:
   629  	ECHILD                               = 10                   // errno.h:60:1:
   630  	EDEADLK                              = 11                   // errno.h:61:1:
   631  	EDOM                                 = 33                   // errno.h:90:1:
   632  	EEXIST                               = 17                   // errno.h:70:1:
   633  	EFAULT                               = 14                   // errno.h:65:1:
   634  	EFBIG                                = 27                   // errno.h:82:1:
   635  	EINTR                                = 4                    // errno.h:54:1:
   636  	EINVAL                               = 22                   // errno.h:75:1:
   637  	EIO                                  = 5                    // errno.h:55:1:
   638  	EISDIR                               = 21                   // errno.h:74:1:
   639  	EMFILE                               = 24                   // errno.h:77:1:
   640  	EMLINK                               = 31                   // errno.h:86:1:
   641  	EMULTIHOP                            = 90                   // errno.h:174:1:
   642  	ENAMETOOLONG                         = 63                   // errno.h:131:1:
   643  	ENFILE                               = 23                   // errno.h:76:1:
   644  	ENODEV                               = 19                   // errno.h:72:1:
   645  	ENOENT                               = 2                    // errno.h:52:1:
   646  	ENOEXEC                              = 8                    // errno.h:58:1:
   647  	ENOLCK                               = 77                   // errno.h:156:1:
   648  	ENOLINK                              = 91                   // errno.h:175:1:
   649  	ENOMEM                               = 12                   // errno.h:63:1:
   650  	ENOSPC                               = 28                   // errno.h:83:1:
   651  	ENOSYS                               = 78                   // errno.h:157:1:
   652  	ENOTDIR                              = 20                   // errno.h:73:1:
   653  	ENOTEMPTY                            = 66                   // errno.h:138:1:
   654  	ENOTTY                               = 25                   // errno.h:78:1:
   655  	ENXIO                                = 6                    // errno.h:56:1:
   656  	EOF                                  = -1                   // stdio.h:210:1:
   657  	EPERM                                = 1                    // errno.h:51:1:
   658  	EPIPE                                = 32                   // errno.h:87:1:
   659  	EPROTO                               = 92                   // errno.h:176:1:
   660  	ERANGE                               = 34                   // errno.h:91:1:
   661  	EROFS                                = 30                   // errno.h:85:1:
   662  	ESPIPE                               = 29                   // errno.h:84:1:
   663  	ESRCH                                = 3                    // errno.h:53:1:
   664  	EXDEV                                = 18                   // errno.h:71:1:
   665  	FAPPEND                              = 8                    // fcntl.h:193:1:
   666  	FASYNC                               = 64                   // fcntl.h:194:1:
   667  	FDSYNC                               = 16777216             // fcntl.h:196:1:
   668  	FD_CLOEXEC                           = 1                    // fcntl.h:283:1:
   669  	FD_NONE                              = -200                 // fcntl.h:355:1:
   670  	FFSYNC                               = 128                  // fcntl.h:195:1:
   671  	FILENAME_MAX                         = 1024                 // stdio.h:221:1:
   672  	FNDELAY                              = 4                    // fcntl.h:198:1:
   673  	FNONBLOCK                            = 4                    // fcntl.h:197:1:
   674  	FOPEN_MAX                            = 20                   // stdio.h:219:1:
   675  	FRDAHEAD                             = 512                  // fcntl.h:210:1:
   676  	FREAD                                = 0x0001               // fcntl.h:89:1:
   677  	FWRITE                               = 0x0002               // fcntl.h:90:1:
   678  	F_ADD_SEALS                          = 19                   // fcntl.h:270:1:
   679  	F_CANCEL                             = 5                    // fcntl.h:291:1:
   680  	F_DUP2FD                             = 10                   // fcntl.h:255:1:
   681  	F_DUP2FD_CLOEXEC                     = 18                   // fcntl.h:269:1:
   682  	F_DUPFD                              = 0                    // fcntl.h:242:1:
   683  	F_DUPFD_CLOEXEC                      = 17                   // fcntl.h:266:1:
   684  	F_GETFD                              = 1                    // fcntl.h:243:1:
   685  	F_GETFL                              = 3                    // fcntl.h:245:1:
   686  	F_GETLK                              = 11                   // fcntl.h:257:1:
   687  	F_GETOWN                             = 5                    // fcntl.h:248:1:
   688  	F_GET_SEALS                          = 20                   // fcntl.h:271:1:
   689  	F_ISUNIONSTACK                       = 21                   // fcntl.h:272:1:
   690  	F_KINFO                              = 22                   // fcntl.h:273:1:
   691  	F_OGETLK                             = 7                    // fcntl.h:252:1:
   692  	F_OSETLK                             = 8                    // fcntl.h:253:1:
   693  	F_OSETLKW                            = 9                    // fcntl.h:254:1:
   694  	F_RDAHEAD                            = 16                   // fcntl.h:263:1:
   695  	F_RDLCK                              = 1                    // fcntl.h:286:1:
   696  	F_READAHEAD                          = 15                   // fcntl.h:262:1:
   697  	F_SEAL_GROW                          = 0x0004               // fcntl.h:278:1:
   698  	F_SEAL_SEAL                          = 0x0001               // fcntl.h:276:1:
   699  	F_SEAL_SHRINK                        = 0x0002               // fcntl.h:277:1:
   700  	F_SEAL_WRITE                         = 0x0008               // fcntl.h:279:1:
   701  	F_SETFD                              = 2                    // fcntl.h:244:1:
   702  	F_SETFL                              = 4                    // fcntl.h:246:1:
   703  	F_SETLK                              = 12                   // fcntl.h:258:1:
   704  	F_SETLKW                             = 13                   // fcntl.h:259:1:
   705  	F_SETLK_REMOTE                       = 14                   // fcntl.h:261:1:
   706  	F_SETOWN                             = 6                    // fcntl.h:249:1:
   707  	F_UNLCK                              = 2                    // fcntl.h:287:1:
   708  	F_UNLCKSYS                           = 4                    // fcntl.h:290:1:
   709  	F_WRLCK                              = 3                    // fcntl.h:288:1:
   710  	GZBUFSIZE                            = 8192                 // gzguts.h:156:1:
   711  	GZ_APPEND                            = 1                    // gzguts.h:162:1:
   712  	GZ_NONE                              = 0                    // gzguts.h:159:1:
   713  	GZ_READ                              = 7247                 // gzguts.h:160:1:
   714  	GZ_WRITE                             = 31153                // gzguts.h:161:1:
   715  	HAVE_VSNPRINTF                       = 0                    // gzguts.h:59:1:
   716  	LOCK_EX                              = 0x02                 // fcntl.h:332:1:
   717  	LOCK_NB                              = 0x04                 // fcntl.h:333:1:
   718  	LOCK_SH                              = 0x01                 // fcntl.h:331:1:
   719  	LOCK_UN                              = 0x08                 // fcntl.h:334:1:
   720  	LOOK                                 = 0                    // gzguts.h:165:1:
   721  	L_ctermid                            = 1024                 // stdio.h:319:1:
   722  	L_cuserid                            = 17                   // stdio.h:315:1:
   723  	L_tmpnam                             = 1024                 // stdio.h:227:1:
   724  	O_ACCMODE                            = 0x0003               // fcntl.h:78:1:
   725  	O_APPEND                             = 0x0008               // fcntl.h:93:1:
   726  	O_ASYNC                              = 0x0040               // fcntl.h:97:1:
   727  	O_CLOEXEC                            = 0x00100000           // fcntl.h:133:1:
   728  	O_CREAT                              = 0x0200               // fcntl.h:104:1:
   729  	O_DIRECT                             = 0x00010000           // fcntl.h:116:1:
   730  	O_DIRECTORY                          = 0x00020000           // fcntl.h:120:1:
   731  	O_DSYNC                              = 0x01000000           // fcntl.h:143:1:
   732  	O_EMPTY_PATH                         = 0x02000000           // fcntl.h:145:1:
   733  	O_EXCL                               = 0x0800               // fcntl.h:106:1:
   734  	O_EXEC                               = 0x00040000           // fcntl.h:121:1:
   735  	O_EXLOCK                             = 0x0020               // fcntl.h:96:1:
   736  	O_FSYNC                              = 0x0080               // fcntl.h:98:1:
   737  	O_NDELAY                             = 4                    // fcntl.h:199:1:
   738  	O_NOCTTY                             = 0x8000               // fcntl.h:112:1:
   739  	O_NOFOLLOW                           = 0x0100               // fcntl.h:102:1:
   740  	O_NONBLOCK                           = 0x0004               // fcntl.h:92:1:
   741  	O_PATH                               = 0x00400000           // fcntl.h:138:1:
   742  	O_RDONLY                             = 0x0000               // fcntl.h:75:1:
   743  	O_RDWR                               = 0x0002               // fcntl.h:77:1:
   744  	O_RESOLVE_BENEATH                    = 0x00800000           // fcntl.h:139:1:
   745  	O_SEARCH                             = 262144               // fcntl.h:122:1:
   746  	O_SHLOCK                             = 0x0010               // fcntl.h:95:1:
   747  	O_SYNC                               = 0x0080               // fcntl.h:100:1:
   748  	O_TRUNC                              = 0x0400               // fcntl.h:105:1:
   749  	O_TTY_INIT                           = 0x00080000           // fcntl.h:131:1:
   750  	O_VERIFY                             = 0x00200000           // fcntl.h:137:1:
   751  	O_WRONLY                             = 0x0001               // fcntl.h:76:1:
   752  	POSIX_FADV_DONTNEED                  = 4                    // fcntl.h:345:1:
   753  	POSIX_FADV_NOREUSE                   = 5                    // fcntl.h:346:1:
   754  	POSIX_FADV_NORMAL                    = 0                    // fcntl.h:341:1:
   755  	POSIX_FADV_RANDOM                    = 1                    // fcntl.h:342:1:
   756  	POSIX_FADV_SEQUENTIAL                = 2                    // fcntl.h:343:1:
   757  	POSIX_FADV_WILLNEED                  = 3                    // fcntl.h:344:1:
   758  	P_tmpdir                             = "/tmp/"              // stdio.h:225:1:
   759  	TMP_MAX                              = 308915776            // stdio.h:228:1:
   760  	X_FSTDIO                             = 0                    // stdio.h:82:1:
   761  	X_IOFBF                              = 0                    // stdio.h:205:1:
   762  	X_IOLBF                              = 1                    // stdio.h:206:1:
   763  	X_IONBF                              = 2                    // stdio.h:207:1:
   764  	X_LARGEFILE_SOURCE                   = 1                    // gzguts.h:8:1:
   765  	X_POSIX_SOURCE                       = 0                    // gzguts.h:30:1:
   766  	X_STDFILE_DECLARED                   = 0                    // stdio.h:164:1:
   767  	X_STDIO_H_                           = 0                    // stdio.h:39:1:
   768  	X_STDSTREAM_DECLARED                 = 0                    // stdio.h:173:1:
   769  	X_SYS_ERRNO_H_                       = 0                    // errno.h:41:1:
   770  	X_SYS_FCNTL_H_                       = 0                    // fcntl.h:41:1:
   771  	ENOUGH                               = 1444                 // inftrees.h:51:1:
   772  	ENOUGH_DISTS                         = 592                  // inftrees.h:50:1:
   773  	ENOUGH_LENS                          = 852                  // inftrees.h:49:1:
   774  	GUNZIP                               = 0                    // inflate.h:16:1:
   775  	MAXBITS                              = 15                   // inftrees.c:9:1:
   776  	DIST_CODE_LEN                        = 512                  // trees.c:81:1:
   777  	END_BLOCK                            = 256                  // trees.c:50:1:
   778  	MAX_BL_BITS                          = 7                    // trees.c:47:1:
   779  	REPZ_11_138                          = 18                   // trees.c:59:1:
   780  	REPZ_3_10                            = 17                   // trees.c:56:1:
   781  	REP_3_6                              = 16                   // trees.c:53:1:
   782  	SMALLEST                             = 1                    // trees.c:422:1:
   783  )
   784  
   785  //
   786  //   If you use the zlib library in a product, an acknowledgment is welcome
   787  //   in the documentation of your product. If for some reason you cannot
   788  //   include such an acknowledgment, I would appreciate that you keep this
   789  //   copyright string in the executable of your product.
   790  //
   791  
   792  // ===========================================================================
   793  //  Function prototypes.
   794  const ( /* deflate.c:66:1: */
   795  	Need_more      = 0 // block not completed, need more input or more output
   796  	Block_done     = 1 // block flush performed
   797  	Finish_started = 2 // finish started, need only more output at next deflate
   798  	Finish_done    = 3
   799  )
   800  
   801  // inflate.h -- internal inflate state definition
   802  // Copyright (C) 1995-2016 Mark Adler
   803  // For conditions of distribution and use, see copyright notice in zlib.h
   804  
   805  // WARNING: this file should *not* be used by applications. It is
   806  //    part of the implementation of the compression library and is
   807  //    subject to change. Applications should only use zlib.h.
   808  //
   809  
   810  // define NO_GZIP when compiling if you want to disable gzip header and
   811  //    trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
   812  //    the crc code when it is not needed.  For shared libraries, gzip decoding
   813  //    should be left enabled.
   814  
   815  // Possible inflate modes between inflate() calls
   816  const ( /* inflate.h:20:1: */
   817  	HEAD     = 16180 // i: waiting for magic header
   818  	FLAGS    = 16181 // i: waiting for method and flags (gzip)
   819  	TIME     = 16182 // i: waiting for modification time (gzip)
   820  	OS       = 16183 // i: waiting for extra flags and operating system (gzip)
   821  	EXLEN    = 16184 // i: waiting for extra length (gzip)
   822  	EXTRA    = 16185 // i: waiting for extra bytes (gzip)
   823  	NAME     = 16186 // i: waiting for end of file name (gzip)
   824  	COMMENT  = 16187 // i: waiting for end of comment (gzip)
   825  	HCRC     = 16188 // i: waiting for header crc (gzip)
   826  	DICTID   = 16189 // i: waiting for dictionary check value
   827  	DICT     = 16190 // waiting for inflateSetDictionary() call
   828  	TYPE     = 16191 // i: waiting for type bits, including last-flag bit
   829  	TYPEDO   = 16192 // i: same, but skip check to exit inflate on new block
   830  	STORED   = 16193 // i: waiting for stored size (length and complement)
   831  	COPY_    = 16194 // i/o: same as COPY below, but only first time in
   832  	COPY     = 16195 // i/o: waiting for input or output to copy stored block
   833  	TABLE    = 16196 // i: waiting for dynamic block table lengths
   834  	LENLENS  = 16197 // i: waiting for code length code lengths
   835  	CODELENS = 16198 // i: waiting for length/lit and distance code lengths
   836  	LEN_     = 16199 // i: same as LEN below, but only first time in
   837  	LEN      = 16200 // i: waiting for length/lit/eob code
   838  	LENEXT   = 16201 // i: waiting for length extra bits
   839  	DIST     = 16202 // i: waiting for distance code
   840  	DISTEXT  = 16203 // i: waiting for distance extra bits
   841  	MATCH    = 16204 // o: waiting for output space to copy string
   842  	LIT      = 16205 // o: waiting for output space to write literal
   843  	CHECK    = 16206 // i: waiting for 32-bit check value
   844  	LENGTH   = 16207 // i: waiting for 32-bit length (gzip)
   845  	DONE     = 16208 // finished check, done -- remain here until reset
   846  	BAD      = 16209 // got a data error -- remain here until reset
   847  	MEM      = 16210 // got an inflate() memory error -- remain here until reset
   848  	SYNC     = 16211
   849  )
   850  
   851  // op values as set by inflate_table():
   852  //     00000000 - literal
   853  //     0000tttt - table link, tttt != 0 is the number of table index bits
   854  //     0001eeee - length or distance, eeee is the number of extra bits
   855  //     01100000 - end of block
   856  //     01000000 - invalid code
   857  //
   858  
   859  // Maximum size of the dynamic table.  The maximum number of code structures is
   860  //    1444, which is the sum of 852 for literal/length codes and 592 for distance
   861  //    codes.  These values were found by exhaustive searches using the program
   862  //    examples/enough.c found in the zlib distribtution.  The arguments to that
   863  //    program are the number of symbols, the initial root table size, and the
   864  //    maximum bit length of a code.  "enough 286 9 15" for literal/length codes
   865  //    returns returns 852, and "enough 30 6 15" for distance codes returns 592.
   866  //    The initial root table size (9 or 6) is found in the fifth argument of the
   867  //    inflate_table() calls in inflate.c and infback.c.  If the root table size is
   868  //    changed, then these maximum sizes would be need to be recalculated and
   869  //    updated.
   870  
   871  // Type of code to build for inflate_table()
   872  const ( /* inftrees.h:54:1: */
   873  	CODES = 0
   874  	LENS  = 1
   875  	DISTS = 2
   876  )
   877  
   878  type Ptrdiff_t = int32 /* <builtin>:3:26 */
   879  
   880  type Size_t = uint32 /* <builtin>:9:23 */
   881  
   882  type Wchar_t = uint32 /* <builtin>:15:24 */
   883  
   884  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
   885  type X__float128 = float64        /* <builtin>:47:21 */
   886  
   887  // adler32.c -- compute the Adler-32 checksum of a data stream
   888  // Copyright (C) 1995-2011, 2016 Mark Adler
   889  // For conditions of distribution and use, see copyright notice in zlib.h
   890  
   891  // @(#) $Id$
   892  
   893  // zutil.h -- internal interface and configuration of the compression library
   894  // Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
   895  // For conditions of distribution and use, see copyright notice in zlib.h
   896  
   897  // WARNING: this file should *not* be used by applications. It is
   898  //    part of the implementation of the compression library and is
   899  //    subject to change. Applications should only use zlib.h.
   900  //
   901  
   902  // @(#) $Id$
   903  
   904  // zlib.h -- interface of the 'zlib' general purpose compression library
   905  //   version 1.2.11, January 15th, 2017
   906  //
   907  //   Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
   908  //
   909  //   This software is provided 'as-is', without any express or implied
   910  //   warranty.  In no event will the authors be held liable for any damages
   911  //   arising from the use of this software.
   912  //
   913  //   Permission is granted to anyone to use this software for any purpose,
   914  //   including commercial applications, and to alter it and redistribute it
   915  //   freely, subject to the following restrictions:
   916  //
   917  //   1. The origin of this software must not be misrepresented; you must not
   918  //      claim that you wrote the original software. If you use this software
   919  //      in a product, an acknowledgment in the product documentation would be
   920  //      appreciated but is not required.
   921  //   2. Altered source versions must be plainly marked as such, and must not be
   922  //      misrepresented as being the original software.
   923  //   3. This notice may not be removed or altered from any source distribution.
   924  //
   925  //   Jean-loup Gailly        Mark Adler
   926  //   jloup@gzip.org          madler@alumni.caltech.edu
   927  //
   928  //
   929  //   The data format used by the zlib library is described by RFCs (Request for
   930  //   Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
   931  //   (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
   932  
   933  // zconf.h -- configuration of the zlib compression library
   934  // Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
   935  // For conditions of distribution and use, see copyright notice in zlib.h
   936  
   937  // @(#) $Id$
   938  
   939  // If you *really* need a unique prefix for all types and library functions,
   940  // compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
   941  // Even better than compiling with -DZ_PREFIX would be to use configure to set
   942  // this permanently in zconf.h using "./configure --zprefix".
   943  
   944  // Compile with -DMAXSEG_64K if the alloc function cannot allocate more
   945  // than 64k bytes at a time (needed on systems with 16-bit int).
   946  
   947  // -
   948  // SPDX-License-Identifier: BSD-3-Clause
   949  //
   950  // Copyright (c) 1990, 1993
   951  //	The Regents of the University of California.  All rights reserved.
   952  //
   953  // Redistribution and use in source and binary forms, with or without
   954  // modification, are permitted provided that the following conditions
   955  // are met:
   956  // 1. Redistributions of source code must retain the above copyright
   957  //    notice, this list of conditions and the following disclaimer.
   958  // 2. Redistributions in binary form must reproduce the above copyright
   959  //    notice, this list of conditions and the following disclaimer in the
   960  //    documentation and/or other materials provided with the distribution.
   961  // 3. Neither the name of the University nor the names of its contributors
   962  //    may be used to endorse or promote products derived from this software
   963  //    without specific prior written permission.
   964  //
   965  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   966  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   967  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   968  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   969  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   970  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   971  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   972  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   973  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   974  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   975  // SUCH DAMAGE.
   976  //
   977  //	@(#)stddef.h	8.1 (Berkeley) 6/2/93
   978  //
   979  // $FreeBSD$
   980  
   981  // -
   982  // SPDX-License-Identifier: BSD-3-Clause
   983  //
   984  // Copyright (c) 1991, 1993
   985  //	The Regents of the University of California.  All rights reserved.
   986  //
   987  // This code is derived from software contributed to Berkeley by
   988  // Berkeley Software Design, Inc.
   989  //
   990  // Redistribution and use in source and binary forms, with or without
   991  // modification, are permitted provided that the following conditions
   992  // are met:
   993  // 1. Redistributions of source code must retain the above copyright
   994  //    notice, this list of conditions and the following disclaimer.
   995  // 2. Redistributions in binary form must reproduce the above copyright
   996  //    notice, this list of conditions and the following disclaimer in the
   997  //    documentation and/or other materials provided with the distribution.
   998  // 3. Neither the name of the University nor the names of its contributors
   999  //    may be used to endorse or promote products derived from this software
  1000  //    without specific prior written permission.
  1001  //
  1002  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1003  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1004  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1005  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1006  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1007  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1008  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1009  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1010  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1011  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1012  // SUCH DAMAGE.
  1013  //
  1014  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1015  // $FreeBSD$
  1016  
  1017  // Testing against Clang-specific extensions.
  1018  
  1019  // This code has been put in place to help reduce the addition of
  1020  // compiler specific defines in FreeBSD code.  It helps to aid in
  1021  // having a compiler-agnostic source tree.
  1022  
  1023  // Compiler memory barriers, specific to gcc and clang.
  1024  
  1025  // XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced
  1026  
  1027  // Macro to test if we're using a specific version of gcc or later.
  1028  
  1029  // The __CONCAT macro is used to concatenate parts of symbol names, e.g.
  1030  // with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
  1031  // The __CONCAT macro is a bit tricky to use if it must work in non-ANSI
  1032  // mode -- there must be no spaces between its arguments, and for nested
  1033  // __CONCAT's, all the __CONCAT's must be at the left.  __CONCAT can also
  1034  // concatenate double-quoted strings produced by the __STRING macro, but
  1035  // this only works with ANSI C.
  1036  //
  1037  // __XSTRING is like __STRING, but it expands any macros in its argument
  1038  // first.  It is only available with ANSI C.
  1039  
  1040  // Compiler-dependent macros to help declare dead (non-returning) and
  1041  // pure (no side effects) functions, and unused variables.  They are
  1042  // null except for versions of gcc that are known to support the features
  1043  // properly (old versions of gcc-2 supported the dead and pure features
  1044  // in a different (wrong) way).  If we do not provide an implementation
  1045  // for a given compiler, let the compile fail if it is told to use
  1046  // a feature that we cannot live without.
  1047  
  1048  // Keywords added in C11.
  1049  
  1050  // Emulation of C11 _Generic().  Unlike the previously defined C11
  1051  // keywords, it is not possible to implement this using exactly the same
  1052  // syntax.  Therefore implement something similar under the name
  1053  // __generic().  Unlike _Generic(), this macro can only distinguish
  1054  // between a single type, so it requires nested invocations to
  1055  // distinguish multiple cases.
  1056  
  1057  // C99 Static array indices in function parameter declarations.  Syntax such as:
  1058  // void bar(int myArray[static 10]);
  1059  // is allowed in C99 but not in C++.  Define __min_size appropriately so
  1060  // headers using it can be compiled in either language.  Use like this:
  1061  // void bar(int myArray[__min_size(10)]);
  1062  
  1063  // XXX: should use `#if __STDC_VERSION__ < 199901'.
  1064  
  1065  // C++11 exposes a load of C99 stuff
  1066  
  1067  // GCC 2.95 provides `__restrict' as an extension to C90 to support the
  1068  // C99-specific `restrict' type qualifier.  We happen to use `__restrict' as
  1069  // a way to define the `restrict' type qualifier without disturbing older
  1070  // software that is unaware of C99 keywords.
  1071  
  1072  // GNU C version 2.96 adds explicit branch prediction so that
  1073  // the CPU back-end can hint the processor and also so that
  1074  // code blocks can be reordered such that the predicted path
  1075  // sees a more linear flow, thus improving cache behavior, etc.
  1076  //
  1077  // The following two macros provide us with a way to utilize this
  1078  // compiler feature.  Use __predict_true() if you expect the expression
  1079  // to evaluate to true, and __predict_false() if you expect the
  1080  // expression to evaluate to false.
  1081  //
  1082  // A few notes about usage:
  1083  //
  1084  //	* Generally, __predict_false() error condition checks (unless
  1085  //	  you have some _strong_ reason to do otherwise, in which case
  1086  //	  document it), and/or __predict_true() `no-error' condition
  1087  //	  checks, assuming you want to optimize for the no-error case.
  1088  //
  1089  //	* Other than that, if you don't know the likelihood of a test
  1090  //	  succeeding from empirical or other `hard' evidence, don't
  1091  //	  make predictions.
  1092  //
  1093  //	* These are meant to be used in places that are run `a lot'.
  1094  //	  It is wasteful to make predictions in code that is run
  1095  //	  seldomly (e.g. at subsystem initialization time) as the
  1096  //	  basic block reordering that this affects can often generate
  1097  //	  larger code.
  1098  
  1099  // We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
  1100  // require it.
  1101  
  1102  // Given the pointer x to the member m of the struct s, return
  1103  // a pointer to the containing structure.  When using GCC, we first
  1104  // assign pointer x to a local variable, to check that its type is
  1105  // compatible with member m.
  1106  
  1107  // Compiler-dependent macros to declare that functions take printf-like
  1108  // or scanf-like arguments.  They are null except for versions of gcc
  1109  // that are known to support the features properly (old versions of gcc-2
  1110  // didn't permit keeping the keywords out of the application namespace).
  1111  
  1112  // Compiler-dependent macros that rely on FreeBSD-specific extensions.
  1113  
  1114  // Embed the rcs id of a source file in the resulting library.  Note that in
  1115  // more recent ELF binutils, we use .ident allowing the ID to be stripped.
  1116  // Usage:
  1117  //	__FBSDID("$FreeBSD$");
  1118  
  1119  // -
  1120  // The following definitions are an extension of the behavior originally
  1121  // implemented in <sys/_posix.h>, but with a different level of granularity.
  1122  // POSIX.1 requires that the macros we test be defined before any standard
  1123  // header file is included.
  1124  //
  1125  // Here's a quick run-down of the versions:
  1126  //  defined(_POSIX_SOURCE)		1003.1-1988
  1127  //  _POSIX_C_SOURCE == 1		1003.1-1990
  1128  //  _POSIX_C_SOURCE == 2		1003.2-1992 C Language Binding Option
  1129  //  _POSIX_C_SOURCE == 199309		1003.1b-1993
  1130  //  _POSIX_C_SOURCE == 199506		1003.1c-1995, 1003.1i-1995,
  1131  //					and the omnibus ISO/IEC 9945-1: 1996
  1132  //  _POSIX_C_SOURCE == 200112		1003.1-2001
  1133  //  _POSIX_C_SOURCE == 200809		1003.1-2008
  1134  //
  1135  // In addition, the X/Open Portability Guide, which is now the Single UNIX
  1136  // Specification, defines a feature-test macro which indicates the version of
  1137  // that specification, and which subsumes _POSIX_C_SOURCE.
  1138  //
  1139  // Our macros begin with two underscores to avoid namespace screwage.
  1140  
  1141  // Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1.
  1142  
  1143  // Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2.
  1144  
  1145  // Deal with various X/Open Portability Guides and Single UNIX Spec.
  1146  
  1147  // Deal with all versions of POSIX.  The ordering relative to the tests above is
  1148  // important.
  1149  // -
  1150  // Deal with _ANSI_SOURCE:
  1151  // If it is defined, and no other compilation environment is explicitly
  1152  // requested, then define our internal feature-test macros to zero.  This
  1153  // makes no difference to the preprocessor (undefined symbols in preprocessing
  1154  // expressions are defined to have value zero), but makes it more convenient for
  1155  // a test program to print out the values.
  1156  //
  1157  // If a program mistakenly defines _ANSI_SOURCE and some other macro such as
  1158  // _POSIX_C_SOURCE, we will assume that it wants the broader compilation
  1159  // environment (and in fact we will never get here).
  1160  
  1161  // User override __EXT1_VISIBLE
  1162  
  1163  // Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
  1164  // translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
  1165  
  1166  // Nullability qualifiers: currently only supported by Clang.
  1167  
  1168  // Type Safety Checking
  1169  //
  1170  // Clang provides additional attributes to enable checking type safety
  1171  // properties that cannot be enforced by the C type system.
  1172  
  1173  // Lock annotations.
  1174  //
  1175  // Clang provides support for doing basic thread-safety tests at
  1176  // compile-time, by marking which locks will/should be held when
  1177  // entering/leaving a functions.
  1178  //
  1179  // Furthermore, it is also possible to annotate variables and structure
  1180  // members to enforce that they are only accessed when certain locks are
  1181  // held.
  1182  
  1183  // Structure implements a lock.
  1184  
  1185  // Function acquires an exclusive or shared lock.
  1186  
  1187  // Function attempts to acquire an exclusive or shared lock.
  1188  
  1189  // Function releases a lock.
  1190  
  1191  // Function asserts that an exclusive or shared lock is held.
  1192  
  1193  // Function requires that an exclusive or shared lock is or is not held.
  1194  
  1195  // Function should not be analyzed.
  1196  
  1197  // Function or variable should not be sanitized, e.g., by AddressSanitizer.
  1198  // GCC has the nosanitize attribute, but as a function attribute only, and
  1199  // warns on use as a variable attribute.
  1200  
  1201  // Guard variables and structure members by lock.
  1202  
  1203  // Alignment builtins for better type checking and improved code generation.
  1204  // Provide fallback versions for other compilers (GCC/Clang < 10):
  1205  
  1206  // -
  1207  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  1208  //
  1209  // Copyright (c) 2003 Marcel Moolenaar
  1210  // All rights reserved.
  1211  //
  1212  // Redistribution and use in source and binary forms, with or without
  1213  // modification, are permitted provided that the following conditions
  1214  // are met:
  1215  //
  1216  // 1. Redistributions of source code must retain the above copyright
  1217  //    notice, this list of conditions and the following disclaimer.
  1218  // 2. Redistributions in binary form must reproduce the above copyright
  1219  //    notice, this list of conditions and the following disclaimer in the
  1220  //    documentation and/or other materials provided with the distribution.
  1221  //
  1222  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  1223  // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  1224  // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  1225  // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  1226  // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  1227  // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  1228  // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  1229  // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  1230  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  1231  // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1232  //
  1233  // $FreeBSD$
  1234  
  1235  // -
  1236  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  1237  //
  1238  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  1239  // All rights reserved.
  1240  //
  1241  // Redistribution and use in source and binary forms, with or without
  1242  // modification, are permitted provided that the following conditions
  1243  // are met:
  1244  // 1. Redistributions of source code must retain the above copyright
  1245  //    notice, this list of conditions and the following disclaimer.
  1246  // 2. Redistributions in binary form must reproduce the above copyright
  1247  //    notice, this list of conditions and the following disclaimer in the
  1248  //    documentation and/or other materials provided with the distribution.
  1249  //
  1250  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  1251  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1252  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1253  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  1254  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1255  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1256  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1257  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1258  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1259  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1260  // SUCH DAMAGE.
  1261  //
  1262  // $FreeBSD$
  1263  
  1264  // -
  1265  // SPDX-License-Identifier: BSD-3-Clause
  1266  //
  1267  // Copyright (c) 1991, 1993
  1268  //	The Regents of the University of California.  All rights reserved.
  1269  //
  1270  // This code is derived from software contributed to Berkeley by
  1271  // Berkeley Software Design, Inc.
  1272  //
  1273  // Redistribution and use in source and binary forms, with or without
  1274  // modification, are permitted provided that the following conditions
  1275  // are met:
  1276  // 1. Redistributions of source code must retain the above copyright
  1277  //    notice, this list of conditions and the following disclaimer.
  1278  // 2. Redistributions in binary form must reproduce the above copyright
  1279  //    notice, this list of conditions and the following disclaimer in the
  1280  //    documentation and/or other materials provided with the distribution.
  1281  // 3. Neither the name of the University nor the names of its contributors
  1282  //    may be used to endorse or promote products derived from this software
  1283  //    without specific prior written permission.
  1284  //
  1285  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1286  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1287  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1288  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1289  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1290  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1291  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1292  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1293  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1294  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1295  // SUCH DAMAGE.
  1296  //
  1297  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1298  // $FreeBSD$
  1299  
  1300  // -
  1301  // SPDX-License-Identifier: BSD-4-Clause
  1302  //
  1303  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  1304  // Copyright (c) 1990, 1993
  1305  //	The Regents of the University of California.  All rights reserved.
  1306  //
  1307  // Redistribution and use in source and binary forms, with or without
  1308  // modification, are permitted provided that the following conditions
  1309  // are met:
  1310  // 1. Redistributions of source code must retain the above copyright
  1311  //    notice, this list of conditions and the following disclaimer.
  1312  // 2. Redistributions in binary form must reproduce the above copyright
  1313  //    notice, this list of conditions and the following disclaimer in the
  1314  //    documentation and/or other materials provided with the distribution.
  1315  // 3. All advertising materials mentioning features or use of this software
  1316  //    must display the following acknowledgement:
  1317  //	This product includes software developed by the University of
  1318  //	California, Berkeley and its contributors.
  1319  // 4. Neither the name of the University nor the names of its contributors
  1320  //    may be used to endorse or promote products derived from this software
  1321  //    without specific prior written permission.
  1322  //
  1323  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1324  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1325  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1326  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1327  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1328  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1329  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1330  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1331  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1332  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1333  // SUCH DAMAGE.
  1334  //
  1335  //	From: @(#)ansi.h	8.2 (Berkeley) 1/4/94
  1336  //	From: @(#)types.h	8.3 (Berkeley) 1/5/94
  1337  // $FreeBSD$
  1338  
  1339  // Basic types upon which most other types are built.
  1340  type X__int8_t = int8     /* _types.h:51:22 */
  1341  type X__uint8_t = uint8   /* _types.h:52:24 */
  1342  type X__int16_t = int16   /* _types.h:53:17 */
  1343  type X__uint16_t = uint16 /* _types.h:54:25 */
  1344  type X__int32_t = int32   /* _types.h:55:15 */
  1345  type X__uint32_t = uint32 /* _types.h:56:23 */
  1346  
  1347  // LONGLONG
  1348  type X__int64_t = int64 /* _types.h:61:20 */
  1349  
  1350  // LONGLONG
  1351  type X__uint64_t = uint64 /* _types.h:66:28 */
  1352  
  1353  // Standard type definitions.
  1354  type X__clock_t = X__uint32_t        /* _types.h:71:20 */ // clock()...
  1355  type X__critical_t = X__int32_t      /* _types.h:72:19 */
  1356  type X__double_t = float64           /* _types.h:74:17 */
  1357  type X__float_t = float32            /* _types.h:75:16 */
  1358  type X__intfptr_t = X__int32_t       /* _types.h:77:19 */
  1359  type X__intmax_t = X__int64_t        /* _types.h:78:19 */
  1360  type X__intptr_t = X__int32_t        /* _types.h:79:19 */
  1361  type X__int_fast8_t = X__int32_t     /* _types.h:80:19 */
  1362  type X__int_fast16_t = X__int32_t    /* _types.h:81:19 */
  1363  type X__int_fast32_t = X__int32_t    /* _types.h:82:19 */
  1364  type X__int_fast64_t = X__int64_t    /* _types.h:83:19 */
  1365  type X__int_least8_t = X__int8_t     /* _types.h:84:18 */
  1366  type X__int_least16_t = X__int16_t   /* _types.h:85:19 */
  1367  type X__int_least32_t = X__int32_t   /* _types.h:86:19 */
  1368  type X__int_least64_t = X__int64_t   /* _types.h:87:19 */
  1369  type X__ptrdiff_t = X__int32_t       /* _types.h:88:19 */ // ptr1 - ptr2
  1370  type X__register_t = X__int32_t      /* _types.h:89:19 */
  1371  type X__segsz_t = X__int32_t         /* _types.h:90:19 */ // segment size (in pages)
  1372  type X__size_t = X__uint32_t         /* _types.h:91:20 */ // sizeof()
  1373  type X__ssize_t = X__int32_t         /* _types.h:92:19 */ // byte count or error
  1374  type X__time_t = X__int64_t          /* _types.h:93:19 */ // time()...
  1375  type X__uintfptr_t = X__uint32_t     /* _types.h:94:20 */
  1376  type X__uintmax_t = X__uint64_t      /* _types.h:95:20 */
  1377  type X__uintptr_t = X__uint32_t      /* _types.h:96:20 */
  1378  type X__uint_fast8_t = X__uint32_t   /* _types.h:97:20 */
  1379  type X__uint_fast16_t = X__uint32_t  /* _types.h:98:20 */
  1380  type X__uint_fast32_t = X__uint32_t  /* _types.h:99:20 */
  1381  type X__uint_fast64_t = X__uint64_t  /* _types.h:100:20 */
  1382  type X__uint_least8_t = X__uint8_t   /* _types.h:101:19 */
  1383  type X__uint_least16_t = X__uint16_t /* _types.h:102:20 */
  1384  type X__uint_least32_t = X__uint32_t /* _types.h:103:20 */
  1385  type X__uint_least64_t = X__uint64_t /* _types.h:104:20 */
  1386  type X__u_register_t = X__uint32_t   /* _types.h:105:20 */
  1387  type X__vm_offset_t = X__uint32_t    /* _types.h:106:20 */
  1388  type X__vm_paddr_t = X__uint32_t     /* _types.h:107:20 */
  1389  type X__vm_size_t = X__uint32_t      /* _types.h:108:20 */
  1390  
  1391  type X___wchar_t = uint32 /* _types.h:110:22 */
  1392  
  1393  // Standard type definitions.
  1394  type X__blksize_t = X__int32_t   /* _types.h:40:19 */ // file block size
  1395  type X__blkcnt_t = X__int64_t    /* _types.h:41:19 */ // file block count
  1396  type X__clockid_t = X__int32_t   /* _types.h:42:19 */ // clock_gettime()...
  1397  type X__fflags_t = X__uint32_t   /* _types.h:43:20 */ // file flags
  1398  type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */
  1399  type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */
  1400  type X__gid_t = X__uint32_t      /* _types.h:46:20 */
  1401  type X__id_t = X__int64_t        /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t
  1402  type X__ino_t = X__uint64_t      /* _types.h:48:20 */ // inode number
  1403  type X__key_t = int32            /* _types.h:49:15 */ // IPC key (for Sys V IPC)
  1404  type X__lwpid_t = X__int32_t     /* _types.h:50:19 */ // Thread ID (a.k.a. LWP)
  1405  type X__mode_t = X__uint16_t     /* _types.h:51:20 */ // permissions
  1406  type X__accmode_t = int32        /* _types.h:52:14 */ // access permissions
  1407  type X__nl_item = int32          /* _types.h:53:14 */
  1408  type X__nlink_t = X__uint64_t    /* _types.h:54:20 */ // link count
  1409  type X__off_t = X__int64_t       /* _types.h:55:19 */ // file offset
  1410  type X__off64_t = X__int64_t     /* _types.h:56:19 */ // file offset (alias)
  1411  type X__pid_t = X__int32_t       /* _types.h:57:19 */ // process [group]
  1412  type X__rlim_t = X__int64_t      /* _types.h:58:19 */ // resource limit - intentionally
  1413  // signed, because of legacy code
  1414  // that uses -1 for RLIM_INFINITY
  1415  type X__sa_family_t = X__uint8_t /* _types.h:61:19 */
  1416  type X__socklen_t = X__uint32_t  /* _types.h:62:20 */
  1417  type X__suseconds_t = int32      /* _types.h:63:15 */ // microseconds (signed)
  1418  type X__timer_t = uintptr        /* _types.h:64:24 */ // timer_gettime()...
  1419  type X__mqd_t = uintptr          /* _types.h:65:21 */ // mq_open()...
  1420  type X__uid_t = X__uint32_t      /* _types.h:66:20 */
  1421  type X__useconds_t = uint32      /* _types.h:67:22 */ // microseconds (unsigned)
  1422  type X__cpuwhich_t = int32       /* _types.h:68:14 */ // which parameter for cpuset.
  1423  type X__cpulevel_t = int32       /* _types.h:69:14 */ // level parameter for cpuset.
  1424  type X__cpusetid_t = int32       /* _types.h:70:14 */ // cpuset identifier.
  1425  type X__daddr_t = X__int64_t     /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc
  1426  
  1427  // Unusual type definitions.
  1428  // rune_t is declared to be an ``int'' instead of the more natural
  1429  // ``unsigned long'' or ``long''.  Two things are happening here.  It is not
  1430  // unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
  1431  // it looks like 10646 will be a 31 bit standard.  This means that if your
  1432  // ints cannot hold 32 bits, you will be in trouble.  The reason an int was
  1433  // chosen over a long is that the is*() and to*() routines take ints (says
  1434  // ANSI C), but they use __ct_rune_t instead of int.
  1435  //
  1436  // NOTE: rune_t is not covered by ANSI nor other standards, and should not
  1437  // be instantiated outside of lib/libc/locale.  Use wchar_t.  wint_t and
  1438  // rune_t must be the same type.  Also, wint_t should be able to hold all
  1439  // members of the largest character set plus one extra value (WEOF), and
  1440  // must be at least 16 bits.
  1441  type X__ct_rune_t = int32     /* _types.h:91:14 */ // arg type for ctype funcs
  1442  type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above)
  1443  type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above)
  1444  
  1445  // Clang already provides these types as built-ins, but only in C++ mode.
  1446  type X__char16_t = X__uint_least16_t /* _types.h:97:26 */
  1447  type X__char32_t = X__uint_least32_t /* _types.h:98:26 */
  1448  // In C++11, char16_t and char32_t are built-in types.
  1449  
  1450  type X__max_align_t = struct {
  1451  	F__max_align1 int64
  1452  	F__max_align2 float64
  1453  } /* _types.h:111:3 */
  1454  
  1455  type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number
  1456  
  1457  type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
  1458  
  1459  // mbstate_t is an opaque object to keep conversion state during multibyte
  1460  // stream conversions.
  1461  type X__mbstate_t = struct {
  1462  	F__ccgo_pad1 [0]uint64
  1463  	F__mbstate8  [128]uint8
  1464  } /* _types.h:124:3 */
  1465  
  1466  type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
  1467  
  1468  // Types for varargs. These are all provided by builtin types these
  1469  // days, so centralize their definition.
  1470  type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc
  1471  type X__gnuc_va_list = X__va_list    /* _types.h:140:20 */
  1472  
  1473  type Rune_t = X__rune_t /* stddef.h:50:18 */
  1474  
  1475  type Max_align_t = X__max_align_t /* stddef.h:69:23 */
  1476  
  1477  // ISO/IEC 9899:2011 K.3.3.2
  1478  type Rsize_t = Size_t /* stddef.h:81:16 */
  1479  
  1480  type Z_size_t = Size_t /* zconf.h:248:21 */
  1481  
  1482  // Maximum value for memLevel in deflateInit2
  1483  
  1484  // Maximum value for windowBits in deflateInit2 and inflateInit2.
  1485  // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
  1486  // created by gzip. (Files created by minigzip can still be extracted by
  1487  // gzip.)
  1488  
  1489  // The memory requirements for deflate are (in bytes):
  1490  //             (1 << (windowBits+2)) +  (1 << (memLevel+9))
  1491  //  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
  1492  //  plus a few kilobytes for small objects. For example, if you want to reduce
  1493  //  the default memory requirements from 256K to 128K, compile with
  1494  //      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
  1495  //  Of course this will generally degrade compression (there's no free lunch).
  1496  //
  1497  //    The memory requirements for inflate are (in bytes) 1 << windowBits
  1498  //  that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
  1499  //  for small objects.
  1500  
  1501  // Type declarations
  1502  
  1503  // The following definitions for FAR are needed only for MSDOS mixed
  1504  // model programming (small or medium model with some far allocations).
  1505  // This was tested only with MSC; for other MSDOS compilers you may have
  1506  // to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
  1507  // just define FAR to be empty.
  1508  
  1509  type Byte = uint8   /* zconf.h:391:24 */ // 8 bits
  1510  type UInt = uint32  /* zconf.h:393:24 */ // 16 bits or more
  1511  type ULong = uint32 /* zconf.h:394:24 */ // 32 bits or more
  1512  
  1513  type Bytef = Byte   /* zconf.h:400:22 */
  1514  type Charf = uint8  /* zconf.h:402:19 */
  1515  type Intf = int32   /* zconf.h:403:19 */
  1516  type UIntf = UInt   /* zconf.h:404:19 */
  1517  type ULongf = ULong /* zconf.h:405:19 */
  1518  
  1519  type Voidpc = uintptr /* zconf.h:408:23 */
  1520  type Voidpf = uintptr /* zconf.h:409:23 */
  1521  type Voidp = uintptr  /* zconf.h:410:23 */
  1522  
  1523  // -
  1524  // SPDX-License-Identifier: BSD-3-Clause
  1525  //
  1526  // Copyright (c) 1988, 1993
  1527  //	The Regents of the University of California.  All rights reserved.
  1528  //
  1529  // Redistribution and use in source and binary forms, with or without
  1530  // modification, are permitted provided that the following conditions
  1531  // are met:
  1532  // 1. Redistributions of source code must retain the above copyright
  1533  //    notice, this list of conditions and the following disclaimer.
  1534  // 2. Redistributions in binary form must reproduce the above copyright
  1535  //    notice, this list of conditions and the following disclaimer in the
  1536  //    documentation and/or other materials provided with the distribution.
  1537  // 3. Neither the name of the University nor the names of its contributors
  1538  //    may be used to endorse or promote products derived from this software
  1539  //    without specific prior written permission.
  1540  //
  1541  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1542  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1543  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1544  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1545  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1546  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1547  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1548  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1549  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1550  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1551  // SUCH DAMAGE.
  1552  //
  1553  //	@(#)limits.h	8.2 (Berkeley) 1/4/94
  1554  // $FreeBSD$
  1555  
  1556  // -
  1557  // SPDX-License-Identifier: BSD-3-Clause
  1558  //
  1559  // Copyright (c) 1991, 1993
  1560  //	The Regents of the University of California.  All rights reserved.
  1561  //
  1562  // This code is derived from software contributed to Berkeley by
  1563  // Berkeley Software Design, Inc.
  1564  //
  1565  // Redistribution and use in source and binary forms, with or without
  1566  // modification, are permitted provided that the following conditions
  1567  // are met:
  1568  // 1. Redistributions of source code must retain the above copyright
  1569  //    notice, this list of conditions and the following disclaimer.
  1570  // 2. Redistributions in binary form must reproduce the above copyright
  1571  //    notice, this list of conditions and the following disclaimer in the
  1572  //    documentation and/or other materials provided with the distribution.
  1573  // 3. Neither the name of the University nor the names of its contributors
  1574  //    may be used to endorse or promote products derived from this software
  1575  //    without specific prior written permission.
  1576  //
  1577  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1578  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1579  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1580  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1581  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1582  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1583  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1584  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1585  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1586  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1587  // SUCH DAMAGE.
  1588  //
  1589  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1590  // $FreeBSD$
  1591  
  1592  // -
  1593  // SPDX-License-Identifier: BSD-3-Clause
  1594  //
  1595  // Copyright (c) 1988, 1993
  1596  //	The Regents of the University of California.  All rights reserved.
  1597  //
  1598  // Redistribution and use in source and binary forms, with or without
  1599  // modification, are permitted provided that the following conditions
  1600  // are met:
  1601  // 1. Redistributions of source code must retain the above copyright
  1602  //    notice, this list of conditions and the following disclaimer.
  1603  // 2. Redistributions in binary form must reproduce the above copyright
  1604  //    notice, this list of conditions and the following disclaimer in the
  1605  //    documentation and/or other materials provided with the distribution.
  1606  // 3. Neither the name of the University nor the names of its contributors
  1607  //    may be used to endorse or promote products derived from this software
  1608  //    without specific prior written permission.
  1609  //
  1610  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1611  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1612  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1613  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1614  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1615  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1616  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1617  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1618  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1619  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1620  // SUCH DAMAGE.
  1621  //
  1622  // $FreeBSD$
  1623  
  1624  // -
  1625  // SPDX-License-Identifier: BSD-3-Clause
  1626  //
  1627  // Copyright (c) 1991, 1993
  1628  //	The Regents of the University of California.  All rights reserved.
  1629  //
  1630  // This code is derived from software contributed to Berkeley by
  1631  // Berkeley Software Design, Inc.
  1632  //
  1633  // Redistribution and use in source and binary forms, with or without
  1634  // modification, are permitted provided that the following conditions
  1635  // are met:
  1636  // 1. Redistributions of source code must retain the above copyright
  1637  //    notice, this list of conditions and the following disclaimer.
  1638  // 2. Redistributions in binary form must reproduce the above copyright
  1639  //    notice, this list of conditions and the following disclaimer in the
  1640  //    documentation and/or other materials provided with the distribution.
  1641  // 3. Neither the name of the University nor the names of its contributors
  1642  //    may be used to endorse or promote products derived from this software
  1643  //    without specific prior written permission.
  1644  //
  1645  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1646  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1647  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1648  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1649  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1650  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1651  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1652  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1653  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1654  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1655  // SUCH DAMAGE.
  1656  //
  1657  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1658  // $FreeBSD$
  1659  
  1660  // -
  1661  // SPDX-License-Identifier: BSD-3-Clause
  1662  //
  1663  // Copyright (c) 1988, 1993
  1664  //	The Regents of the University of California.  All rights reserved.
  1665  //
  1666  // Redistribution and use in source and binary forms, with or without
  1667  // modification, are permitted provided that the following conditions
  1668  // are met:
  1669  // 1. Redistributions of source code must retain the above copyright
  1670  //    notice, this list of conditions and the following disclaimer.
  1671  // 2. Redistributions in binary form must reproduce the above copyright
  1672  //    notice, this list of conditions and the following disclaimer in the
  1673  //    documentation and/or other materials provided with the distribution.
  1674  // 3. Neither the name of the University nor the names of its contributors
  1675  //    may be used to endorse or promote products derived from this software
  1676  //    without specific prior written permission.
  1677  //
  1678  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1679  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1680  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1681  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1682  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1683  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1684  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1685  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1686  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1687  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1688  // SUCH DAMAGE.
  1689  //
  1690  //	@(#)limits.h	8.3 (Berkeley) 1/4/94
  1691  // $FreeBSD$
  1692  
  1693  // According to ANSI (section 2.2.4.2), the values below must be usable by
  1694  // #if preprocessing directives.  Additionally, the expression must have the
  1695  // same type as would an expression that is an object of the corresponding
  1696  // type converted according to the integral promotions.  The subtraction for
  1697  // INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
  1698  // unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
  1699  
  1700  // max value for an unsigned long long
  1701  
  1702  // Quads and long longs are the same size.  Ensure they stay in sync.
  1703  
  1704  // Minimum signal stack size.
  1705  
  1706  // -
  1707  // SPDX-License-Identifier: BSD-3-Clause
  1708  //
  1709  // Copyright (c) 1988, 1993
  1710  //	The Regents of the University of California.  All rights reserved.
  1711  //
  1712  // Redistribution and use in source and binary forms, with or without
  1713  // modification, are permitted provided that the following conditions
  1714  // are met:
  1715  // 1. Redistributions of source code must retain the above copyright
  1716  //    notice, this list of conditions and the following disclaimer.
  1717  // 2. Redistributions in binary form must reproduce the above copyright
  1718  //    notice, this list of conditions and the following disclaimer in the
  1719  //    documentation and/or other materials provided with the distribution.
  1720  // 3. Neither the name of the University nor the names of its contributors
  1721  //    may be used to endorse or promote products derived from this software
  1722  //    without specific prior written permission.
  1723  //
  1724  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1725  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1726  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1727  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1728  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1729  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1730  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1731  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1732  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1733  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1734  // SUCH DAMAGE.
  1735  //
  1736  //	@(#)syslimits.h	8.1 (Berkeley) 6/2/93
  1737  // $FreeBSD$
  1738  
  1739  // Do not add any new variables here.  (See the comment at the end of
  1740  // the file for why.)
  1741  
  1742  // We leave the following values undefined to force applications to either
  1743  // assume conservative values or call sysconf() to get the current value.
  1744  //
  1745  // HOST_NAME_MAX
  1746  //
  1747  // (We should do this for most of the values currently defined here,
  1748  // but many programs are not prepared to deal with this yet.)
  1749  
  1750  type Z_crc_t = uint32 /* zconf.h:429:17 */
  1751  type Pthread_once = struct {
  1752  	Fstate int32
  1753  	Fmutex Pthread_mutex_t
  1754  } /* _pthreadtypes.h:52:1 */
  1755  
  1756  // Primitive system data type definitions required by P1003.1c.
  1757  //
  1758  // Note that P1003.1c specifies that there are no defined comparison
  1759  // or assignment operators for the types pthread_attr_t, pthread_cond_t,
  1760  // pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t.
  1761  type Pthread_t = uintptr             /* _pthreadtypes.h:67:26 */
  1762  type Pthread_attr_t = uintptr        /* _pthreadtypes.h:70:30 */
  1763  type Pthread_mutex_t = uintptr       /* _pthreadtypes.h:71:31 */
  1764  type Pthread_mutexattr_t = uintptr   /* _pthreadtypes.h:72:35 */
  1765  type Pthread_cond_t = uintptr        /* _pthreadtypes.h:73:30 */
  1766  type Pthread_condattr_t = uintptr    /* _pthreadtypes.h:74:34 */
  1767  type Pthread_key_t = int32           /* _pthreadtypes.h:75:20 */
  1768  type Pthread_once_t = Pthread_once   /* _pthreadtypes.h:76:30 */
  1769  type Pthread_rwlock_t = uintptr      /* _pthreadtypes.h:77:32 */
  1770  type Pthread_rwlockattr_t = uintptr  /* _pthreadtypes.h:78:35 */
  1771  type Pthread_barrier_t = uintptr     /* _pthreadtypes.h:79:33 */
  1772  type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */
  1773  type Pthread_spinlock_t = uintptr    /* _pthreadtypes.h:81:33 */
  1774  
  1775  // Additional type definitions:
  1776  //
  1777  // Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for
  1778  // use in header symbols.
  1779  type Pthread_addr_t = uintptr         /* _pthreadtypes.h:89:14 */
  1780  type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */
  1781  
  1782  type U_char = uint8   /* types.h:52:23 */
  1783  type U_short = uint16 /* types.h:53:24 */
  1784  type U_int = uint32   /* types.h:54:22 */
  1785  type U_long = uint32  /* types.h:55:23 */
  1786  type Ushort = uint16  /* types.h:57:24 */ // Sys V compatibility
  1787  type Uint = uint32    /* types.h:58:22 */ // Sys V compatibility
  1788  
  1789  // XXX POSIX sized integrals that should appear only in <sys/stdint.h>.
  1790  // -
  1791  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  1792  //
  1793  // Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org>
  1794  // Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
  1795  // All rights reserved.
  1796  //
  1797  // Redistribution and use in source and binary forms, with or without
  1798  // modification, are permitted provided that the following conditions
  1799  // are met:
  1800  // 1. Redistributions of source code must retain the above copyright
  1801  //    notice, this list of conditions and the following disclaimer.
  1802  // 2. Redistributions in binary form must reproduce the above copyright
  1803  //    notice, this list of conditions and the following disclaimer in the
  1804  //    documentation and/or other materials provided with the distribution.
  1805  //
  1806  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  1807  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1808  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1809  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  1810  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1811  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1812  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1813  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1814  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1815  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1816  // SUCH DAMAGE.
  1817  //
  1818  // $FreeBSD$
  1819  
  1820  type Int8_t = X__int8_t /* _stdint.h:36:19 */
  1821  
  1822  type Int16_t = X__int16_t /* _stdint.h:41:20 */
  1823  
  1824  type Int32_t = X__int32_t /* _stdint.h:46:20 */
  1825  
  1826  type Int64_t = X__int64_t /* _stdint.h:51:20 */
  1827  
  1828  type Uint8_t = X__uint8_t /* _stdint.h:56:20 */
  1829  
  1830  type Uint16_t = X__uint16_t /* _stdint.h:61:21 */
  1831  
  1832  type Uint32_t = X__uint32_t /* _stdint.h:66:21 */
  1833  
  1834  type Uint64_t = X__uint64_t /* _stdint.h:71:21 */
  1835  
  1836  type Intptr_t = X__intptr_t   /* _stdint.h:76:21 */
  1837  type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */
  1838  type Intmax_t = X__intmax_t   /* _stdint.h:84:21 */
  1839  type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */
  1840  
  1841  type U_int8_t = X__uint8_t   /* types.h:67:19 */ // unsigned integrals (deprecated)
  1842  type U_int16_t = X__uint16_t /* types.h:68:20 */
  1843  type U_int32_t = X__uint32_t /* types.h:69:20 */
  1844  type U_int64_t = X__uint64_t /* types.h:70:20 */
  1845  
  1846  type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated)
  1847  type Quad_t = X__int64_t    /* types.h:73:19 */
  1848  type Qaddr_t = uintptr      /* types.h:74:16 */
  1849  
  1850  type Caddr_t = uintptr   /* types.h:76:14 */ // core address
  1851  type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const
  1852  
  1853  type Blksize_t = X__blksize_t /* types.h:80:21 */
  1854  
  1855  type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */
  1856  type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */
  1857  type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */
  1858  
  1859  type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */
  1860  
  1861  type Clock_t = X__clock_t /* types.h:94:19 */
  1862  
  1863  type Clockid_t = X__clockid_t /* types.h:99:21 */
  1864  
  1865  type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value
  1866  type Daddr_t = X__daddr_t       /* types.h:104:19 */ // disk address
  1867  
  1868  type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev
  1869  
  1870  type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags
  1871  
  1872  type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number
  1873  
  1874  type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */
  1875  type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */
  1876  
  1877  type Gid_t = X__gid_t /* types.h:125:18 */ // group id
  1878  
  1879  type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address
  1880  
  1881  type In_port_t = X__uint16_t /* types.h:135:20 */
  1882  
  1883  type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t
  1884  
  1885  type Ino_t = X__ino_t /* types.h:145:18 */ // inode number
  1886  
  1887  type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC)
  1888  
  1889  type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP)
  1890  
  1891  type Mode_t = X__mode_t /* types.h:160:18 */ // permissions
  1892  
  1893  type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions
  1894  
  1895  type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count
  1896  
  1897  type Off_t = X__off_t /* types.h:175:18 */ // file offset
  1898  
  1899  type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias)
  1900  
  1901  type Pid_t = X__pid_t /* types.h:185:18 */ // process id
  1902  
  1903  type Register_t = X__register_t /* types.h:189:22 */
  1904  
  1905  type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit
  1906  
  1907  type Sbintime_t = X__int64_t /* types.h:196:19 */
  1908  
  1909  type Segsz_t = X__segsz_t /* types.h:198:19 */ // segment size (in pages)
  1910  
  1911  type Ssize_t = X__ssize_t /* types.h:206:19 */
  1912  
  1913  type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed)
  1914  
  1915  type Time_t = X__time_t /* types.h:216:18 */
  1916  
  1917  type Timer_t = X__timer_t /* types.h:221:19 */
  1918  
  1919  type Mqd_t = X__mqd_t /* types.h:226:17 */
  1920  
  1921  type U_register_t = X__u_register_t /* types.h:230:24 */
  1922  
  1923  type Uid_t = X__uid_t /* types.h:233:18 */ // user id
  1924  
  1925  type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned)
  1926  
  1927  type Cap_ioctl_t = uint32 /* types.h:244:23 */
  1928  
  1929  // Types suitable for exporting physical addresses, virtual addresses
  1930  // (pointers), and memory object sizes from the kernel independent of native
  1931  // word size.  These should be used in place of vm_paddr_t, (u)intptr_t, and
  1932  // size_t in structs which contain such types that are shared with userspace.
  1933  type Kpaddr_t = X__uint64_t /* types.h:260:20 */
  1934  type Kvaddr_t = X__uint64_t /* types.h:261:20 */
  1935  type Ksize_t = X__uint64_t  /* types.h:262:20 */
  1936  type Kssize_t = X__int64_t  /* types.h:263:19 */
  1937  
  1938  type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */
  1939  type Vm_ooffset_t = X__uint64_t   /* types.h:266:20 */
  1940  type Vm_paddr_t = X__vm_paddr_t   /* types.h:267:22 */
  1941  type Vm_pindex_t = X__uint64_t    /* types.h:268:20 */
  1942  type Vm_size_t = X__vm_size_t     /* types.h:269:21 */
  1943  
  1944  type Rman_res_t = X__rman_res_t /* types.h:271:25 */
  1945  
  1946  func __bitcount32(tls *libc.TLS, _x X__uint32_t) X__uint32_t { /* types.h:335:1: */
  1947  
  1948  	_x = _x&X__uint32_t(0x55555555) + _x&0xaaaaaaaa>>1
  1949  	_x = _x&X__uint32_t(0x33333333) + _x&0xcccccccc>>2
  1950  	_x = (_x + _x>>4) & X__uint32_t(0x0f0f0f0f)
  1951  	_x = _x + _x>>8
  1952  	_x = (_x + _x>>16) & X__uint32_t(0x000000ff)
  1953  	return _x
  1954  }
  1955  
  1956  // -
  1957  // SPDX-License-Identifier: BSD-3-Clause
  1958  //
  1959  // Copyright (c) 1992, 1993
  1960  //	The Regents of the University of California.  All rights reserved.
  1961  //
  1962  // Redistribution and use in source and binary forms, with or without
  1963  // modification, are permitted provided that the following conditions
  1964  // are met:
  1965  // 1. Redistributions of source code must retain the above copyright
  1966  //    notice, this list of conditions and the following disclaimer.
  1967  // 2. Redistributions in binary form must reproduce the above copyright
  1968  //    notice, this list of conditions and the following disclaimer in the
  1969  //    documentation and/or other materials provided with the distribution.
  1970  // 3. Neither the name of the University nor the names of its contributors
  1971  //    may be used to endorse or promote products derived from this software
  1972  //    without specific prior written permission.
  1973  //
  1974  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1975  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1976  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1977  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1978  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1979  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1980  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1981  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1982  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1983  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1984  // SUCH DAMAGE.
  1985  //
  1986  // $FreeBSD$
  1987  
  1988  // -
  1989  // SPDX-License-Identifier: BSD-3-Clause
  1990  //
  1991  // Copyright (c) 1991, 1993
  1992  //	The Regents of the University of California.  All rights reserved.
  1993  //
  1994  // This code is derived from software contributed to Berkeley by
  1995  // Berkeley Software Design, Inc.
  1996  //
  1997  // Redistribution and use in source and binary forms, with or without
  1998  // modification, are permitted provided that the following conditions
  1999  // are met:
  2000  // 1. Redistributions of source code must retain the above copyright
  2001  //    notice, this list of conditions and the following disclaimer.
  2002  // 2. Redistributions in binary form must reproduce the above copyright
  2003  //    notice, this list of conditions and the following disclaimer in the
  2004  //    documentation and/or other materials provided with the distribution.
  2005  // 3. Neither the name of the University nor the names of its contributors
  2006  //    may be used to endorse or promote products derived from this software
  2007  //    without specific prior written permission.
  2008  //
  2009  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2010  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2011  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2012  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2013  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2014  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2015  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2016  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2017  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2018  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2019  // SUCH DAMAGE.
  2020  //
  2021  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  2022  // $FreeBSD$
  2023  
  2024  // -
  2025  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2026  //
  2027  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2028  // All rights reserved.
  2029  //
  2030  // Redistribution and use in source and binary forms, with or without
  2031  // modification, are permitted provided that the following conditions
  2032  // are met:
  2033  // 1. Redistributions of source code must retain the above copyright
  2034  //    notice, this list of conditions and the following disclaimer.
  2035  // 2. Redistributions in binary form must reproduce the above copyright
  2036  //    notice, this list of conditions and the following disclaimer in the
  2037  //    documentation and/or other materials provided with the distribution.
  2038  //
  2039  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2040  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2041  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2042  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2043  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2044  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2045  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2046  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2047  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2048  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2049  // SUCH DAMAGE.
  2050  //
  2051  // $FreeBSD$
  2052  
  2053  // -
  2054  // SPDX-License-Identifier: BSD-3-Clause
  2055  //
  2056  // Copyright (c) 1982, 1986, 1989, 1991, 1993
  2057  //	The Regents of the University of California.  All rights reserved.
  2058  // (c) UNIX System Laboratories, Inc.
  2059  // All or some portions of this file are derived from material licensed
  2060  // to the University of California by American Telephone and Telegraph
  2061  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  2062  // the permission of UNIX System Laboratories, Inc.
  2063  //
  2064  // Redistribution and use in source and binary forms, with or without
  2065  // modification, are permitted provided that the following conditions
  2066  // are met:
  2067  // 1. Redistributions of source code must retain the above copyright
  2068  //    notice, this list of conditions and the following disclaimer.
  2069  // 2. Redistributions in binary form must reproduce the above copyright
  2070  //    notice, this list of conditions and the following disclaimer in the
  2071  //    documentation and/or other materials provided with the distribution.
  2072  // 3. Neither the name of the University nor the names of its contributors
  2073  //    may be used to endorse or promote products derived from this software
  2074  //    without specific prior written permission.
  2075  //
  2076  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2077  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2078  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2079  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2080  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2081  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2082  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2083  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2084  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2085  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2086  // SUCH DAMAGE.
  2087  //
  2088  //	@(#)signal.h	8.4 (Berkeley) 5/4/95
  2089  // $FreeBSD$
  2090  
  2091  // sigset_t macros.
  2092  
  2093  type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */
  2094  
  2095  // -
  2096  // SPDX-License-Identifier: BSD-3-Clause
  2097  //
  2098  // Copyright (c) 1992, 1993
  2099  //	The Regents of the University of California.  All rights reserved.
  2100  //
  2101  // Redistribution and use in source and binary forms, with or without
  2102  // modification, are permitted provided that the following conditions
  2103  // are met:
  2104  // 1. Redistributions of source code must retain the above copyright
  2105  //    notice, this list of conditions and the following disclaimer.
  2106  // 2. Redistributions in binary form must reproduce the above copyright
  2107  //    notice, this list of conditions and the following disclaimer in the
  2108  //    documentation and/or other materials provided with the distribution.
  2109  // 3. Neither the name of the University nor the names of its contributors
  2110  //    may be used to endorse or promote products derived from this software
  2111  //    without specific prior written permission.
  2112  //
  2113  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2114  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2115  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2116  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2117  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2118  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2119  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2120  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2121  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2122  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2123  // SUCH DAMAGE.
  2124  //
  2125  // $FreeBSD$
  2126  
  2127  // -
  2128  // SPDX-License-Identifier: BSD-3-Clause
  2129  //
  2130  // Copyright (c) 1991, 1993
  2131  //	The Regents of the University of California.  All rights reserved.
  2132  //
  2133  // This code is derived from software contributed to Berkeley by
  2134  // Berkeley Software Design, Inc.
  2135  //
  2136  // Redistribution and use in source and binary forms, with or without
  2137  // modification, are permitted provided that the following conditions
  2138  // are met:
  2139  // 1. Redistributions of source code must retain the above copyright
  2140  //    notice, this list of conditions and the following disclaimer.
  2141  // 2. Redistributions in binary form must reproduce the above copyright
  2142  //    notice, this list of conditions and the following disclaimer in the
  2143  //    documentation and/or other materials provided with the distribution.
  2144  // 3. Neither the name of the University nor the names of its contributors
  2145  //    may be used to endorse or promote products derived from this software
  2146  //    without specific prior written permission.
  2147  //
  2148  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2149  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2150  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2151  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2152  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2153  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2154  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2155  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2156  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2157  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2158  // SUCH DAMAGE.
  2159  //
  2160  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  2161  // $FreeBSD$
  2162  
  2163  // -
  2164  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2165  //
  2166  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2167  // All rights reserved.
  2168  //
  2169  // Redistribution and use in source and binary forms, with or without
  2170  // modification, are permitted provided that the following conditions
  2171  // are met:
  2172  // 1. Redistributions of source code must retain the above copyright
  2173  //    notice, this list of conditions and the following disclaimer.
  2174  // 2. Redistributions in binary form must reproduce the above copyright
  2175  //    notice, this list of conditions and the following disclaimer in the
  2176  //    documentation and/or other materials provided with the distribution.
  2177  //
  2178  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2179  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2180  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2181  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2182  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2183  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2184  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2185  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2186  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2187  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2188  // SUCH DAMAGE.
  2189  //
  2190  // $FreeBSD$
  2191  
  2192  // -
  2193  // SPDX-License-Identifier: BSD-3-Clause
  2194  //
  2195  // Copyright (c) 1982, 1986, 1989, 1991, 1993
  2196  //	The Regents of the University of California.  All rights reserved.
  2197  // (c) UNIX System Laboratories, Inc.
  2198  // All or some portions of this file are derived from material licensed
  2199  // to the University of California by American Telephone and Telegraph
  2200  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  2201  // the permission of UNIX System Laboratories, Inc.
  2202  //
  2203  // Redistribution and use in source and binary forms, with or without
  2204  // modification, are permitted provided that the following conditions
  2205  // are met:
  2206  // 1. Redistributions of source code must retain the above copyright
  2207  //    notice, this list of conditions and the following disclaimer.
  2208  // 2. Redistributions in binary form must reproduce the above copyright
  2209  //    notice, this list of conditions and the following disclaimer in the
  2210  //    documentation and/or other materials provided with the distribution.
  2211  // 3. Neither the name of the University nor the names of its contributors
  2212  //    may be used to endorse or promote products derived from this software
  2213  //    without specific prior written permission.
  2214  //
  2215  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2216  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2217  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2218  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2219  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2220  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2221  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2222  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2223  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2224  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2225  // SUCH DAMAGE.
  2226  //
  2227  //	@(#)signal.h	8.4 (Berkeley) 5/4/95
  2228  // $FreeBSD$
  2229  
  2230  // sigset_t macros.
  2231  
  2232  type X__sigset_t = X__sigset /* _sigset.h:55:3 */
  2233  
  2234  // -
  2235  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2236  //
  2237  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2238  // All rights reserved.
  2239  //
  2240  // Redistribution and use in source and binary forms, with or without
  2241  // modification, are permitted provided that the following conditions
  2242  // are met:
  2243  // 1. Redistributions of source code must retain the above copyright
  2244  //    notice, this list of conditions and the following disclaimer.
  2245  // 2. Redistributions in binary form must reproduce the above copyright
  2246  //    notice, this list of conditions and the following disclaimer in the
  2247  //    documentation and/or other materials provided with the distribution.
  2248  //
  2249  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2250  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2251  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2252  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2253  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2254  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2255  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2256  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2257  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2258  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2259  // SUCH DAMAGE.
  2260  //
  2261  // $FreeBSD$
  2262  
  2263  // -
  2264  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2265  //
  2266  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2267  // All rights reserved.
  2268  //
  2269  // Redistribution and use in source and binary forms, with or without
  2270  // modification, are permitted provided that the following conditions
  2271  // are met:
  2272  // 1. Redistributions of source code must retain the above copyright
  2273  //    notice, this list of conditions and the following disclaimer.
  2274  // 2. Redistributions in binary form must reproduce the above copyright
  2275  //    notice, this list of conditions and the following disclaimer in the
  2276  //    documentation and/or other materials provided with the distribution.
  2277  //
  2278  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2279  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2280  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2281  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2282  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2283  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2284  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2285  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2286  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2287  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2288  // SUCH DAMAGE.
  2289  //
  2290  // $FreeBSD$
  2291  
  2292  // Structure returned by gettimeofday(2) system call, and used in other calls.
  2293  type Timeval = struct {
  2294  	Ftv_sec      Time_t
  2295  	Ftv_usec     Suseconds_t
  2296  	F__ccgo_pad1 [4]byte
  2297  } /* _timeval.h:49:1 */
  2298  
  2299  // -
  2300  // SPDX-License-Identifier: BSD-3-Clause
  2301  //
  2302  // Copyright (c) 1982, 1986, 1993
  2303  //	The Regents of the University of California.  All rights reserved.
  2304  //
  2305  // Redistribution and use in source and binary forms, with or without
  2306  // modification, are permitted provided that the following conditions
  2307  // are met:
  2308  // 1. Redistributions of source code must retain the above copyright
  2309  //    notice, this list of conditions and the following disclaimer.
  2310  // 2. Redistributions in binary form must reproduce the above copyright
  2311  //    notice, this list of conditions and the following disclaimer in the
  2312  //    documentation and/or other materials provided with the distribution.
  2313  // 3. Neither the name of the University nor the names of its contributors
  2314  //    may be used to endorse or promote products derived from this software
  2315  //    without specific prior written permission.
  2316  //
  2317  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2318  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2319  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2320  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2321  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2322  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2323  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2324  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2325  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2326  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2327  // SUCH DAMAGE.
  2328  //
  2329  //	@(#)time.h	8.5 (Berkeley) 5/4/95
  2330  // from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp
  2331  //	$FreeBSD$
  2332  
  2333  // -
  2334  // SPDX-License-Identifier: BSD-3-Clause
  2335  //
  2336  // Copyright (c) 1991, 1993
  2337  //	The Regents of the University of California.  All rights reserved.
  2338  //
  2339  // This code is derived from software contributed to Berkeley by
  2340  // Berkeley Software Design, Inc.
  2341  //
  2342  // Redistribution and use in source and binary forms, with or without
  2343  // modification, are permitted provided that the following conditions
  2344  // are met:
  2345  // 1. Redistributions of source code must retain the above copyright
  2346  //    notice, this list of conditions and the following disclaimer.
  2347  // 2. Redistributions in binary form must reproduce the above copyright
  2348  //    notice, this list of conditions and the following disclaimer in the
  2349  //    documentation and/or other materials provided with the distribution.
  2350  // 3. Neither the name of the University nor the names of its contributors
  2351  //    may be used to endorse or promote products derived from this software
  2352  //    without specific prior written permission.
  2353  //
  2354  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2355  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2356  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2357  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2358  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2359  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2360  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2361  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2362  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2363  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2364  // SUCH DAMAGE.
  2365  //
  2366  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  2367  // $FreeBSD$
  2368  
  2369  // -
  2370  // SPDX-License-Identifier: BSD-3-Clause
  2371  //
  2372  // Copyright (c) 1982, 1986, 1993
  2373  //	The Regents of the University of California.  All rights reserved.
  2374  //
  2375  // Redistribution and use in source and binary forms, with or without
  2376  // modification, are permitted provided that the following conditions
  2377  // are met:
  2378  // 1. Redistributions of source code must retain the above copyright
  2379  //    notice, this list of conditions and the following disclaimer.
  2380  // 2. Redistributions in binary form must reproduce the above copyright
  2381  //    notice, this list of conditions and the following disclaimer in the
  2382  //    documentation and/or other materials provided with the distribution.
  2383  // 3. Neither the name of the University nor the names of its contributors
  2384  //    may be used to endorse or promote products derived from this software
  2385  //    without specific prior written permission.
  2386  //
  2387  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2388  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2389  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2390  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2391  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2392  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2393  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2394  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2395  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2396  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2397  // SUCH DAMAGE.
  2398  //
  2399  //	@(#)time.h	8.5 (Berkeley) 5/4/95
  2400  // from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp
  2401  //	$FreeBSD$
  2402  
  2403  // -
  2404  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2405  //
  2406  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2407  // All rights reserved.
  2408  //
  2409  // Redistribution and use in source and binary forms, with or without
  2410  // modification, are permitted provided that the following conditions
  2411  // are met:
  2412  // 1. Redistributions of source code must retain the above copyright
  2413  //    notice, this list of conditions and the following disclaimer.
  2414  // 2. Redistributions in binary form must reproduce the above copyright
  2415  //    notice, this list of conditions and the following disclaimer in the
  2416  //    documentation and/or other materials provided with the distribution.
  2417  //
  2418  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2419  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2420  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2421  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2422  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2423  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2424  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2425  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2426  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2427  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2428  // SUCH DAMAGE.
  2429  //
  2430  // $FreeBSD$
  2431  
  2432  type Timespec = struct {
  2433  	Ftv_sec      Time_t
  2434  	Ftv_nsec     int32
  2435  	F__ccgo_pad1 [4]byte
  2436  } /* _timespec.h:46:1 */
  2437  
  2438  // Structure defined by POSIX.1b to be like a itimerval, but with
  2439  // timespecs. Used in the timer_*() system calls.
  2440  type Itimerspec = struct {
  2441  	Fit_interval struct {
  2442  		Ftv_sec      Time_t
  2443  		Ftv_nsec     int32
  2444  		F__ccgo_pad1 [4]byte
  2445  	}
  2446  	Fit_value struct {
  2447  		Ftv_sec      Time_t
  2448  		Ftv_nsec     int32
  2449  		F__ccgo_pad1 [4]byte
  2450  	}
  2451  } /* timespec.h:60:1 */
  2452  
  2453  type X__fd_mask = uint32  /* select.h:44:23 */
  2454  type Fd_mask = X__fd_mask /* select.h:46:19 */
  2455  
  2456  type Sigset_t = X__sigset_t /* select.h:51:20 */
  2457  
  2458  // Select uses bit masks of file descriptors in longs.  These macros
  2459  // manipulate such bit fields (the filesystem macros use chars).
  2460  // FD_SETSIZE may be defined by the user, but the default here should
  2461  // be enough for most uses.
  2462  
  2463  type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */
  2464  
  2465  // Select uses bit masks of file descriptors in longs.  These macros
  2466  // manipulate such bit fields (the filesystem macros use chars).
  2467  // FD_SETSIZE may be defined by the user, but the default here should
  2468  // be enough for most uses.
  2469  
  2470  type Fd_set = Fd_set1 /* select.h:75:3 */
  2471  
  2472  // -
  2473  // SPDX-License-Identifier: BSD-2-Clause
  2474  //
  2475  // Copyright (c) 2017 Poul-Henning Kamp.  All rights reserved.
  2476  //
  2477  // Redistribution and use in source and binary forms, with or without
  2478  // modification, are permitted provided that the following conditions
  2479  // are met:
  2480  // 1. Redistributions of source code must retain the above copyright
  2481  //    notice, this list of conditions and the following disclaimer.
  2482  // 2. Redistributions in binary form must reproduce the above copyright
  2483  //    notice, this list of conditions and the following disclaimer in the
  2484  //    documentation and/or other materials provided with the distribution.
  2485  //
  2486  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2487  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2488  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2489  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2490  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2491  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2492  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2493  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2494  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2495  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2496  // SUCH DAMAGE.
  2497  //
  2498  // $FreeBSD$
  2499  
  2500  // -
  2501  // SPDX-License-Identifier: BSD-3-Clause
  2502  //
  2503  // Copyright (c) 2002 David E. O'Brien.  All rights reserved.
  2504  //
  2505  // Redistribution and use in source and binary forms, with or without
  2506  // modification, are permitted provided that the following conditions
  2507  // are met:
  2508  // 1. Redistributions of source code must retain the above copyright
  2509  //    notice, this list of conditions and the following disclaimer.
  2510  // 2. Redistributions in binary form must reproduce the above copyright
  2511  //    notice, this list of conditions and the following disclaimer in the
  2512  //    documentation and/or other materials provided with the distribution.
  2513  // 3. Neither the name of the University nor the names of its contributors
  2514  //    may be used to endorse or promote products derived from this software
  2515  //    without specific prior written permission.
  2516  //
  2517  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2518  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2519  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2520  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2521  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2522  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2523  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2524  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2525  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2526  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2527  // SUCH DAMAGE.
  2528  //
  2529  // $FreeBSD$
  2530  
  2531  // -
  2532  // SPDX-License-Identifier: BSD-3-Clause
  2533  //
  2534  // Copyright (c) 1991, 1993
  2535  //	The Regents of the University of California.  All rights reserved.
  2536  //
  2537  // This code is derived from software contributed to Berkeley by
  2538  // Berkeley Software Design, Inc.
  2539  //
  2540  // Redistribution and use in source and binary forms, with or without
  2541  // modification, are permitted provided that the following conditions
  2542  // are met:
  2543  // 1. Redistributions of source code must retain the above copyright
  2544  //    notice, this list of conditions and the following disclaimer.
  2545  // 2. Redistributions in binary form must reproduce the above copyright
  2546  //    notice, this list of conditions and the following disclaimer in the
  2547  //    documentation and/or other materials provided with the distribution.
  2548  // 3. Neither the name of the University nor the names of its contributors
  2549  //    may be used to endorse or promote products derived from this software
  2550  //    without specific prior written permission.
  2551  //
  2552  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2553  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2554  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2555  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2556  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2557  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2558  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2559  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2560  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2561  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2562  // SUCH DAMAGE.
  2563  //
  2564  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  2565  // $FreeBSD$
  2566  
  2567  // -
  2568  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2569  //
  2570  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2571  // All rights reserved.
  2572  //
  2573  // Redistribution and use in source and binary forms, with or without
  2574  // modification, are permitted provided that the following conditions
  2575  // are met:
  2576  // 1. Redistributions of source code must retain the above copyright
  2577  //    notice, this list of conditions and the following disclaimer.
  2578  // 2. Redistributions in binary form must reproduce the above copyright
  2579  //    notice, this list of conditions and the following disclaimer in the
  2580  //    documentation and/or other materials provided with the distribution.
  2581  //
  2582  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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  // $FreeBSD$
  2595  
  2596  type Va_list = X__va_list /* _stdarg.h:41:27 */ // select(2)
  2597  
  2598  type Crypt_data = struct {
  2599  	Finitialized int32
  2600  	F__buf       [256]uint8
  2601  } /* unistd.h:489:1 */
  2602  
  2603  // getopt(3) external variable
  2604  
  2605  // MVS linker does not support external names larger than 8 bytes
  2606  
  2607  //
  2608  //     The 'zlib' compression library provides in-memory compression and
  2609  //   decompression functions, including integrity checks of the uncompressed data.
  2610  //   This version of the library supports only one compression method (deflation)
  2611  //   but other algorithms will be added later and will have the same stream
  2612  //   interface.
  2613  //
  2614  //     Compression can be done in a single step if the buffers are large enough,
  2615  //   or can be done by repeated calls of the compression function.  In the latter
  2616  //   case, the application must provide more input and/or consume the output
  2617  //   (providing more output space) before each call.
  2618  //
  2619  //     The compressed data format used by default by the in-memory functions is
  2620  //   the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
  2621  //   around a deflate stream, which is itself documented in RFC 1951.
  2622  //
  2623  //     The library also supports reading and writing files in gzip (.gz) format
  2624  //   with an interface similar to that of stdio using the functions that start
  2625  //   with "gz".  The gzip format is different from the zlib format.  gzip is a
  2626  //   gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
  2627  //
  2628  //     This library can optionally read and write gzip and raw deflate streams in
  2629  //   memory as well.
  2630  //
  2631  //     The zlib format was designed to be compact and fast for use in memory
  2632  //   and on communications channels.  The gzip format was designed for single-
  2633  //   file compression on file systems, has a larger header than zlib to maintain
  2634  //   directory information, and uses a different, slower check method than zlib.
  2635  //
  2636  //     The library does not install any signal handler.  The decoder checks
  2637  //   the consistency of the compressed data, so the library should never crash
  2638  //   even in the case of corrupted input.
  2639  
  2640  type Alloc_func = uintptr /* zlib.h:81:16 */
  2641  type Free_func = uintptr  /* zlib.h:82:16 */
  2642  
  2643  type Internal_state = struct {
  2644  	Fstrm             Z_streamp
  2645  	Fstatus           int32
  2646  	Fpending_buf      uintptr
  2647  	Fpending_buf_size Ulg
  2648  	Fpending_out      uintptr
  2649  	Fpending          Ulg
  2650  	Fwrap             int32
  2651  	Fgzhead           Gz_headerp
  2652  	Fgzindex          Ulg
  2653  	Fmethod           Byte
  2654  	F__ccgo_pad1      [3]byte
  2655  	Flast_flush       int32
  2656  	Fw_size           UInt
  2657  	Fw_bits           UInt
  2658  	Fw_mask           UInt
  2659  	Fwindow           uintptr
  2660  	Fwindow_size      Ulg
  2661  	Fprev             uintptr
  2662  	Fhead             uintptr
  2663  	Fins_h            UInt
  2664  	Fhash_size        UInt
  2665  	Fhash_bits        UInt
  2666  	Fhash_mask        UInt
  2667  	Fhash_shift       UInt
  2668  	Fblock_start      int32
  2669  	Fmatch_length     UInt
  2670  	Fprev_match       IPos
  2671  	Fmatch_available  int32
  2672  	Fstrstart         UInt
  2673  	Fmatch_start      UInt
  2674  	Flookahead        UInt
  2675  	Fprev_length      UInt
  2676  	Fmax_chain_length UInt
  2677  	Fmax_lazy_match   UInt
  2678  	Flevel            int32
  2679  	Fstrategy         int32
  2680  	Fgood_match       UInt
  2681  	Fnice_match       int32
  2682  	Fdyn_ltree        [573]struct {
  2683  		Ffc struct{ Ffreq Ush }
  2684  		Fdl struct{ Fdad Ush }
  2685  	}
  2686  	Fdyn_dtree [61]struct {
  2687  		Ffc struct{ Ffreq Ush }
  2688  		Fdl struct{ Fdad Ush }
  2689  	}
  2690  	Fbl_tree [39]struct {
  2691  		Ffc struct{ Ffreq Ush }
  2692  		Fdl struct{ Fdad Ush }
  2693  	}
  2694  	Fl_desc struct {
  2695  		Fdyn_tree  uintptr
  2696  		Fmax_code  int32
  2697  		Fstat_desc uintptr
  2698  	}
  2699  	Fd_desc struct {
  2700  		Fdyn_tree  uintptr
  2701  		Fmax_code  int32
  2702  		Fstat_desc uintptr
  2703  	}
  2704  	Fbl_desc struct {
  2705  		Fdyn_tree  uintptr
  2706  		Fmax_code  int32
  2707  		Fstat_desc uintptr
  2708  	}
  2709  	Fbl_count    [16]Ush
  2710  	Fheap        [573]int32
  2711  	Fheap_len    int32
  2712  	Fheap_max    int32
  2713  	Fdepth       [573]Uch
  2714  	F__ccgo_pad2 [3]byte
  2715  	Fl_buf       uintptr
  2716  	Flit_bufsize UInt
  2717  	Flast_lit    UInt
  2718  	Fd_buf       uintptr
  2719  	Fopt_len     Ulg
  2720  	Fstatic_len  Ulg
  2721  	Fmatches     UInt
  2722  	Finsert      UInt
  2723  	Fbi_buf      Ush
  2724  	F__ccgo_pad3 [2]byte
  2725  	Fbi_valid    int32
  2726  	Fhigh_water  Ulg
  2727  } /* zlib.h:84:1 */
  2728  
  2729  type Z_stream_s = struct {
  2730  	Fnext_in   uintptr
  2731  	Favail_in  UInt
  2732  	Ftotal_in  ULong
  2733  	Fnext_out  uintptr
  2734  	Favail_out UInt
  2735  	Ftotal_out ULong
  2736  	Fmsg       uintptr
  2737  	Fstate     uintptr
  2738  	Fzalloc    Alloc_func
  2739  	Fzfree     Free_func
  2740  	Fopaque    Voidpf
  2741  	Fdata_type int32
  2742  	Fadler     ULong
  2743  	Freserved  ULong
  2744  } /* zlib.h:86:9 */
  2745  
  2746  type Z_stream = Z_stream_s /* zlib.h:106:3 */
  2747  
  2748  type Z_streamp = uintptr /* zlib.h:108:22 */
  2749  
  2750  //
  2751  //      gzip header information passed to and from zlib routines.  See RFC 1952
  2752  //   for more details on the meanings of these fields.
  2753  type Gz_header_s = struct {
  2754  	Ftext      int32
  2755  	Ftime      ULong
  2756  	Fxflags    int32
  2757  	Fos        int32
  2758  	Fextra     uintptr
  2759  	Fextra_len UInt
  2760  	Fextra_max UInt
  2761  	Fname      uintptr
  2762  	Fname_max  UInt
  2763  	Fcomment   uintptr
  2764  	Fcomm_max  UInt
  2765  	Fhcrc      int32
  2766  	Fdone      int32
  2767  } /* zlib.h:114:9 */
  2768  
  2769  //
  2770  //      gzip header information passed to and from zlib routines.  See RFC 1952
  2771  //   for more details on the meanings of these fields.
  2772  type Gz_header = Gz_header_s /* zlib.h:129:3 */
  2773  
  2774  type Gz_headerp = uintptr /* zlib.h:131:23 */
  2775  //
  2776  //      inflateGetHeader() requests that gzip header information be stored in the
  2777  //    provided gz_header structure.  inflateGetHeader() may be called after
  2778  //    inflateInit2() or inflateReset(), and before the first call of inflate().
  2779  //    As inflate() processes the gzip stream, head->done is zero until the header
  2780  //    is completed, at which time head->done is set to one.  If a zlib stream is
  2781  //    being decoded, then head->done is set to -1 to indicate that there will be
  2782  //    no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
  2783  //    used to force inflate() to return immediately after header processing is
  2784  //    complete and before any actual data is decompressed.
  2785  //
  2786  //      The text, time, xflags, and os fields are filled in with the gzip header
  2787  //    contents.  hcrc is set to true if there is a header CRC.  (The header CRC
  2788  //    was valid if done is set to one.) If extra is not Z_NULL, then extra_max
  2789  //    contains the maximum number of bytes to write to extra.  Once done is true,
  2790  //    extra_len contains the actual extra field length, and extra contains the
  2791  //    extra field, or that field truncated if extra_max is less than extra_len.
  2792  //    If name is not Z_NULL, then up to name_max characters are written there,
  2793  //    terminated with a zero unless the length is greater than name_max.  If
  2794  //    comment is not Z_NULL, then up to comm_max characters are written there,
  2795  //    terminated with a zero unless the length is greater than comm_max.  When any
  2796  //    of extra, name, or comment are not Z_NULL and the respective field is not
  2797  //    present in the header, then that field is set to Z_NULL to signal its
  2798  //    absence.  This allows the use of deflateSetHeader() with the returned
  2799  //    structure to duplicate the header.  However if those fields are set to
  2800  //    allocated memory, then the application will need to save those pointers
  2801  //    elsewhere so that they can be eventually freed.
  2802  //
  2803  //      If inflateGetHeader is not used, then the header information is simply
  2804  //    discarded.  The header is always checked for validity, including the header
  2805  //    CRC if present.  inflateReset() will reset the process to discard the header
  2806  //    information.  The application would need to call inflateGetHeader() again to
  2807  //    retrieve the header from the next gzip stream.
  2808  //
  2809  //      inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
  2810  //    stream state was inconsistent.
  2811  
  2812  //
  2813  // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
  2814  //                                         unsigned char FAR *window));
  2815  //
  2816  //      Initialize the internal stream state for decompression using inflateBack()
  2817  //    calls.  The fields zalloc, zfree and opaque in strm must be initialized
  2818  //    before the call.  If zalloc and zfree are Z_NULL, then the default library-
  2819  //    derived memory allocation routines are used.  windowBits is the base two
  2820  //    logarithm of the window size, in the range 8..15.  window is a caller
  2821  //    supplied buffer of that size.  Except for special applications where it is
  2822  //    assured that deflate was used with small window sizes, windowBits must be 15
  2823  //    and a 32K byte window must be supplied to be able to decompress general
  2824  //    deflate streams.
  2825  //
  2826  //      See inflateBack() for the usage of these routines.
  2827  //
  2828  //      inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
  2829  //    the parameters are invalid, Z_MEM_ERROR if the internal state could not be
  2830  //    allocated, or Z_VERSION_ERROR if the version of the library does not match
  2831  //    the version of the header file.
  2832  
  2833  type In_func = uintptr  /* zlib.h:1092:18 */
  2834  type Out_func = uintptr /* zlib.h:1094:13 */
  2835  //
  2836  //      Same as uncompress, except that sourceLen is a pointer, where the
  2837  //    length of the source is *sourceLen.  On return, *sourceLen is the number of
  2838  //    source bytes consumed.
  2839  
  2840  // gzip file access functions
  2841  
  2842  //
  2843  //      This library supports reading and writing files in gzip (.gz) format with
  2844  //    an interface similar to that of stdio, using the functions that start with
  2845  //    "gz".  The gzip format is different from the zlib format.  gzip is a gzip
  2846  //    wrapper, documented in RFC 1952, wrapped around a deflate stream.
  2847  
  2848  type GzFile_s = struct {
  2849  	Fhave uint32
  2850  	Fnext uintptr
  2851  	Fpos  Off_t
  2852  } /* zlib.h:1300:9 */
  2853  
  2854  //
  2855  //      Same as uncompress, except that sourceLen is a pointer, where the
  2856  //    length of the source is *sourceLen.  On return, *sourceLen is the number of
  2857  //    source bytes consumed.
  2858  
  2859  // gzip file access functions
  2860  
  2861  //
  2862  //      This library supports reading and writing files in gzip (.gz) format with
  2863  //    an interface similar to that of stdio, using the functions that start with
  2864  //    "gz".  The gzip format is different from the zlib format.  gzip is a gzip
  2865  //    wrapper, documented in RFC 1952, wrapped around a deflate stream.
  2866  
  2867  type GzFile = uintptr /* zlib.h:1300:25 */
  2868  
  2869  // -
  2870  // Copyright (c) 2011, 2012 The FreeBSD Foundation
  2871  //
  2872  // Redistribution and use in source and binary forms, with or without
  2873  // modification, are permitted provided that the following conditions
  2874  // are met:
  2875  // 1. Redistributions of source code must retain the above copyright
  2876  //    notice, this list of conditions and the following disclaimer.
  2877  // 2. Redistributions in binary form must reproduce the above copyright
  2878  //    notice, this list of conditions and the following disclaimer in the
  2879  //    documentation and/or other materials provided with the distribution.
  2880  //
  2881  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2882  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2883  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2884  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2885  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2886  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2887  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2888  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2889  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2890  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2891  // SUCH DAMAGE.
  2892  //
  2893  // $FreeBSD$
  2894  
  2895  type Locale_t = uintptr /* _strings.h:30:25 */
  2896  
  2897  // xlocale extensions
  2898  
  2899  type Errno_t = int32 /* string.h:159:13 */
  2900  
  2901  // -
  2902  // SPDX-License-Identifier: BSD-3-Clause
  2903  //
  2904  // Copyright (c) 1990, 1993
  2905  //	The Regents of the University of California.  All rights reserved.
  2906  //
  2907  // Redistribution and use in source and binary forms, with or without
  2908  // modification, are permitted provided that the following conditions
  2909  // are met:
  2910  // 1. Redistributions of source code must retain the above copyright
  2911  //    notice, this list of conditions and the following disclaimer.
  2912  // 2. Redistributions in binary form must reproduce the above copyright
  2913  //    notice, this list of conditions and the following disclaimer in the
  2914  //    documentation and/or other materials provided with the distribution.
  2915  // 3. Neither the name of the University nor the names of its contributors
  2916  //    may be used to endorse or promote products derived from this software
  2917  //    without specific prior written permission.
  2918  //
  2919  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2920  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2921  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2922  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2923  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2924  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2925  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2926  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2927  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2928  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2929  // SUCH DAMAGE.
  2930  //
  2931  //	@(#)stdlib.h	8.5 (Berkeley) 5/19/95
  2932  // $FreeBSD$
  2933  
  2934  // -
  2935  // SPDX-License-Identifier: BSD-3-Clause
  2936  //
  2937  // Copyright (c) 1991, 1993
  2938  //	The Regents of the University of California.  All rights reserved.
  2939  //
  2940  // This code is derived from software contributed to Berkeley by
  2941  // Berkeley Software Design, Inc.
  2942  //
  2943  // Redistribution and use in source and binary forms, with or without
  2944  // modification, are permitted provided that the following conditions
  2945  // are met:
  2946  // 1. Redistributions of source code must retain the above copyright
  2947  //    notice, this list of conditions and the following disclaimer.
  2948  // 2. Redistributions in binary form must reproduce the above copyright
  2949  //    notice, this list of conditions and the following disclaimer in the
  2950  //    documentation and/or other materials provided with the distribution.
  2951  // 3. Neither the name of the University nor the names of its contributors
  2952  //    may be used to endorse or promote products derived from this software
  2953  //    without specific prior written permission.
  2954  //
  2955  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2956  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2957  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2958  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2959  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2960  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2961  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2962  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2963  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2964  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2965  // SUCH DAMAGE.
  2966  //
  2967  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  2968  // $FreeBSD$
  2969  
  2970  // -
  2971  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2972  //
  2973  // Copyright (c) 2003 Marcel Moolenaar
  2974  // All rights reserved.
  2975  //
  2976  // Redistribution and use in source and binary forms, with or without
  2977  // modification, are permitted provided that the following conditions
  2978  // are met:
  2979  //
  2980  // 1. Redistributions of source code must retain the above copyright
  2981  //    notice, this list of conditions and the following disclaimer.
  2982  // 2. Redistributions in binary form must reproduce the above copyright
  2983  //    notice, this list of conditions and the following disclaimer in the
  2984  //    documentation and/or other materials provided with the distribution.
  2985  //
  2986  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  2987  // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  2988  // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  2989  // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  2990  // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  2991  // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  2992  // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  2993  // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  2994  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  2995  // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  2996  //
  2997  // $FreeBSD$
  2998  
  2999  // -
  3000  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  3001  //
  3002  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  3003  // All rights reserved.
  3004  //
  3005  // Redistribution and use in source and binary forms, with or without
  3006  // modification, are permitted provided that the following conditions
  3007  // are met:
  3008  // 1. Redistributions of source code must retain the above copyright
  3009  //    notice, this list of conditions and the following disclaimer.
  3010  // 2. Redistributions in binary form must reproduce the above copyright
  3011  //    notice, this list of conditions and the following disclaimer in the
  3012  //    documentation and/or other materials provided with the distribution.
  3013  //
  3014  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  3015  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3016  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3017  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  3018  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3019  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3020  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3021  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3022  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3023  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3024  // SUCH DAMAGE.
  3025  //
  3026  // $FreeBSD$
  3027  
  3028  type Div_t = struct {
  3029  	Fquot int32
  3030  	Frem  int32
  3031  } /* stdlib.h:66:3 */
  3032  
  3033  type Ldiv_t = struct {
  3034  	Fquot int32
  3035  	Frem  int32
  3036  } /* stdlib.h:71:3 */
  3037  
  3038  // Functions added in C99 which we make conditionally available in the
  3039  // BSD^C89 namespace if the compiler supports `long long'.
  3040  // The #if test is more complicated than it ought to be because
  3041  // __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long'
  3042  // is not supported in the compilation environment (which therefore means
  3043  // that it can't really be ISO C99).
  3044  //
  3045  // (The only other extension made by C99 in thie header is _Exit().)
  3046  // LONGLONG
  3047  type Lldiv_t = struct {
  3048  	Fquot int64
  3049  	Frem  int64
  3050  } /* stdlib.h:142:3 */ // getsubopt(3) external variable
  3051  
  3052  // K.3.6
  3053  type Constraint_handler_t = uintptr /* stdlib.h:349:14 */
  3054  
  3055  // since "static" is used to mean two completely different things in C, we
  3056  //    define "local" for the non-static meaning of "static", for readability
  3057  //    (compile with -Dlocal if your debugger can't find static symbols)
  3058  
  3059  type Uch = uint8  /* zutil.h:43:24 */
  3060  type Uchf = Uch   /* zutil.h:44:17 */
  3061  type Ush = uint16 /* zutil.h:45:24 */
  3062  type Ushf = Ush   /* zutil.h:46:17 */
  3063  type Ulg = uint32 /* zutil.h:47:24 */
  3064  
  3065  // NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1
  3066  
  3067  // use NO_DIVIDE if your processor does not do division in hardware --
  3068  //    try it both ways to see which is faster
  3069  
  3070  // =========================================================================
  3071  func Xadler32_z(tls *libc.TLS, adler ULong, buf uintptr, len Z_size_t) ULong { /* adler32.c:63:15: */
  3072  	var sum2 uint32
  3073  	var n uint32
  3074  
  3075  	// split Adler-32 into component sums
  3076  	sum2 = adler >> 16 & ULong(0xffff)
  3077  	adler = adler & ULong(0xffff)
  3078  
  3079  	// in case user likes doing a byte at a time, keep it fast
  3080  	if len == Z_size_t(1) {
  3081  		adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf)))
  3082  		if adler >= BASE {
  3083  			adler = adler - BASE
  3084  		}
  3085  		sum2 = sum2 + adler
  3086  		if sum2 >= BASE {
  3087  			sum2 = sum2 - BASE
  3088  		}
  3089  		return adler | sum2<<16
  3090  	}
  3091  
  3092  	// initial Adler-32 value (deferred check for len == 1 speed)
  3093  	if buf == uintptr(Z_NULL) {
  3094  		return ULong(1)
  3095  	}
  3096  
  3097  	// in case short lengths are provided, keep it somewhat fast
  3098  	if len < Z_size_t(16) {
  3099  		for libc.PostDecUint32(&len, 1) != 0 {
  3100  			adler = adler + ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))
  3101  			sum2 = sum2 + adler
  3102  		}
  3103  		if adler >= BASE {
  3104  			adler = adler - BASE
  3105  		}
  3106  		sum2 = sum2 % BASE // only added so many BASE's
  3107  		return adler | sum2<<16
  3108  	}
  3109  
  3110  	// do length NMAX blocks -- requires just one modulo operation
  3111  	for len >= Z_size_t(NMAX) {
  3112  		len = len - Z_size_t(NMAX)
  3113  		n = uint32(NMAX / 16) // NMAX is divisible by 16
  3114  		for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 {
  3115  			{
  3116  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf)))
  3117  				sum2 = sum2 + adler
  3118  			}
  3119  			{
  3120  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 1)))
  3121  				sum2 = sum2 + adler
  3122  			}
  3123  
  3124  			{
  3125  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 2)))
  3126  				sum2 = sum2 + adler
  3127  			}
  3128  			{
  3129  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 3)))
  3130  				sum2 = sum2 + adler
  3131  			}
  3132  
  3133  			{
  3134  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 4)))
  3135  				sum2 = sum2 + adler
  3136  			}
  3137  			{
  3138  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 5)))
  3139  				sum2 = sum2 + adler
  3140  			}
  3141  
  3142  			{
  3143  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 6)))
  3144  				sum2 = sum2 + adler
  3145  			}
  3146  			{
  3147  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 7)))
  3148  				sum2 = sum2 + adler
  3149  			}
  3150  
  3151  			{
  3152  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 8)))
  3153  				sum2 = sum2 + adler
  3154  			}
  3155  			{
  3156  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 9)))
  3157  				sum2 = sum2 + adler
  3158  			}
  3159  
  3160  			{
  3161  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 10)))
  3162  				sum2 = sum2 + adler
  3163  			}
  3164  			{
  3165  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 11)))
  3166  				sum2 = sum2 + adler
  3167  			}
  3168  
  3169  			{
  3170  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 12)))
  3171  				sum2 = sum2 + adler
  3172  			}
  3173  			{
  3174  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 13)))
  3175  				sum2 = sum2 + adler
  3176  			}
  3177  
  3178  			{
  3179  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 14)))
  3180  				sum2 = sum2 + adler
  3181  			}
  3182  			{
  3183  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 15)))
  3184  				sum2 = sum2 + adler
  3185  			}
  3186  
  3187  			// 16 sums unrolled
  3188  			buf += uintptr(16)
  3189  		}
  3190  		adler = adler % BASE
  3191  		sum2 = sum2 % BASE
  3192  	}
  3193  
  3194  	// do remaining bytes (less than NMAX, still just one modulo)
  3195  	if len != 0 { // avoid modulos if none remaining
  3196  		for len >= Z_size_t(16) {
  3197  			len = len - Z_size_t(16)
  3198  			{
  3199  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf)))
  3200  				sum2 = sum2 + adler
  3201  			}
  3202  			{
  3203  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 1)))
  3204  				sum2 = sum2 + adler
  3205  			}
  3206  
  3207  			{
  3208  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 2)))
  3209  				sum2 = sum2 + adler
  3210  			}
  3211  			{
  3212  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 3)))
  3213  				sum2 = sum2 + adler
  3214  			}
  3215  
  3216  			{
  3217  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 4)))
  3218  				sum2 = sum2 + adler
  3219  			}
  3220  			{
  3221  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 5)))
  3222  				sum2 = sum2 + adler
  3223  			}
  3224  
  3225  			{
  3226  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 6)))
  3227  				sum2 = sum2 + adler
  3228  			}
  3229  			{
  3230  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 7)))
  3231  				sum2 = sum2 + adler
  3232  			}
  3233  
  3234  			{
  3235  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 8)))
  3236  				sum2 = sum2 + adler
  3237  			}
  3238  			{
  3239  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 9)))
  3240  				sum2 = sum2 + adler
  3241  			}
  3242  
  3243  			{
  3244  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 10)))
  3245  				sum2 = sum2 + adler
  3246  			}
  3247  			{
  3248  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 11)))
  3249  				sum2 = sum2 + adler
  3250  			}
  3251  
  3252  			{
  3253  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 12)))
  3254  				sum2 = sum2 + adler
  3255  			}
  3256  			{
  3257  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 13)))
  3258  				sum2 = sum2 + adler
  3259  			}
  3260  
  3261  			{
  3262  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 14)))
  3263  				sum2 = sum2 + adler
  3264  			}
  3265  			{
  3266  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 15)))
  3267  				sum2 = sum2 + adler
  3268  			}
  3269  
  3270  			buf += uintptr(16)
  3271  		}
  3272  		for libc.PostDecUint32(&len, 1) != 0 {
  3273  			adler = adler + ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))
  3274  			sum2 = sum2 + adler
  3275  		}
  3276  		adler = adler % BASE
  3277  		sum2 = sum2 % BASE
  3278  	}
  3279  
  3280  	// return recombined sums
  3281  	return adler | sum2<<16
  3282  }
  3283  
  3284  // =========================================================================
  3285  func Xadler32(tls *libc.TLS, adler ULong, buf uintptr, len UInt) ULong { /* adler32.c:134:15: */
  3286  	return Xadler32_z(tls, adler, buf, len)
  3287  }
  3288  
  3289  // =========================================================================
  3290  func adler32_combine_(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:143:13: */
  3291  	var sum1 uint32
  3292  	var sum2 uint32
  3293  	var rem uint32
  3294  
  3295  	// for negative len, return invalid adler32 as a clue for debugging
  3296  	if len2 < int64(0) {
  3297  		return 0xffffffff
  3298  	}
  3299  
  3300  	// the derivation of this formula is left as an exercise for the reader
  3301  	len2 = len2 % int64(BASE) // assumes len2 >= 0
  3302  	rem = uint32(len2)
  3303  	sum1 = adler1 & ULong(0xffff)
  3304  	sum2 = uint32(rem) * sum1
  3305  	sum2 = sum2 % BASE
  3306  	sum1 = sum1 + (adler2&ULong(0xffff) + BASE - ULong(1))
  3307  	sum2 = sum2 + (adler1>>16&ULong(0xffff) + adler2>>16&ULong(0xffff) + BASE - ULong(rem))
  3308  	if sum1 >= BASE {
  3309  		sum1 = sum1 - BASE
  3310  	}
  3311  	if sum1 >= BASE {
  3312  		sum1 = sum1 - BASE
  3313  	}
  3314  	if sum2 >= uint32(BASE)<<1 {
  3315  		sum2 = sum2 - uint32(BASE)<<1
  3316  	}
  3317  	if sum2 >= BASE {
  3318  		sum2 = sum2 - BASE
  3319  	}
  3320  	return sum1 | sum2<<16
  3321  }
  3322  
  3323  // =========================================================================
  3324  func Xadler32_combine(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:172:15: */
  3325  	return adler32_combine_(tls, adler1, adler2, len2)
  3326  }
  3327  
  3328  func Xadler32_combine64(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:180:15: */
  3329  	return adler32_combine_(tls, adler1, adler2, len2)
  3330  }
  3331  
  3332  // ===========================================================================
  3333  //      Compresses the source buffer into the destination buffer. The level
  3334  //    parameter has the same meaning as in deflateInit.  sourceLen is the byte
  3335  //    length of the source buffer. Upon entry, destLen is the total size of the
  3336  //    destination buffer, which must be at least 0.1% larger than sourceLen plus
  3337  //    12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
  3338  //
  3339  //      compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
  3340  //    memory, Z_BUF_ERROR if there was not enough room in the output buffer,
  3341  //    Z_STREAM_ERROR if the level parameter is invalid.
  3342  func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong, level int32) int32 { /* compress.c:22:13: */
  3343  	bp := tls.Alloc(56)
  3344  	defer tls.Free(56)
  3345  
  3346  	// var stream Z_stream at bp, 56
  3347  
  3348  	var err int32
  3349  	var max UInt = libc.Uint32(libc.Uint32FromInt32(-1))
  3350  	var left ULong
  3351  
  3352  	left = *(*ULongf)(unsafe.Pointer(destLen))
  3353  	*(*ULongf)(unsafe.Pointer(destLen)) = ULongf(0)
  3354  
  3355  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzalloc = uintptr(0)
  3356  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzfree = uintptr(0)
  3357  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fopaque = uintptr(0)
  3358  
  3359  	err = XdeflateInit_(tls, bp, level, ts, int32(unsafe.Sizeof(Z_stream{})))
  3360  	if err != Z_OK {
  3361  		return err
  3362  	}
  3363  
  3364  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_out = dest
  3365  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = UInt(0)
  3366  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_in = source
  3367  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = UInt(0)
  3368  
  3369  	for __ccgo := true; __ccgo; __ccgo = err == Z_OK {
  3370  		if (*Z_stream)(unsafe.Pointer(bp)).Favail_out == UInt(0) {
  3371  			(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = func() uint32 {
  3372  				if left > ULong(max) {
  3373  					return max
  3374  				}
  3375  				return UInt(left)
  3376  			}()
  3377  			left = left - ULong((*Z_stream)(unsafe.Pointer(bp)).Favail_out)
  3378  		}
  3379  		if (*Z_stream)(unsafe.Pointer(bp)).Favail_in == UInt(0) {
  3380  			(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = func() uint32 {
  3381  				if sourceLen > ULong(max) {
  3382  					return max
  3383  				}
  3384  				return UInt(sourceLen)
  3385  			}()
  3386  			sourceLen = sourceLen - ULong((*Z_stream)(unsafe.Pointer(bp)).Favail_in)
  3387  		}
  3388  		err = Xdeflate(tls, bp, func() int32 {
  3389  			if sourceLen != 0 {
  3390  				return Z_NO_FLUSH
  3391  			}
  3392  			return Z_FINISH
  3393  		}())
  3394  	}
  3395  
  3396  	*(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Ftotal_out
  3397  	XdeflateEnd(tls, bp)
  3398  	if err == Z_STREAM_END {
  3399  		return Z_OK
  3400  	}
  3401  	return err
  3402  }
  3403  
  3404  // ===========================================================================
  3405  func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* compress.c:68:13: */
  3406  	return Xcompress2(tls, dest, destLen, source, sourceLen, -1)
  3407  }
  3408  
  3409  // ===========================================================================
  3410  //      If the default memLevel or windowBits for deflateInit() is changed, then
  3411  //    this function needs to be updated.
  3412  //
  3413  func XcompressBound(tls *libc.TLS, sourceLen ULong) ULong { /* compress.c:81:15: */
  3414  	return sourceLen + sourceLen>>12 + sourceLen>>14 + sourceLen>>25 + ULong(13)
  3415  }
  3416  
  3417  // ========================================================================
  3418  // Tables of CRC-32s of all single-byte values, made by make_crc_table().
  3419  // crc32.h -- tables for rapid CRC calculation
  3420  // Generated automatically by crc32.c
  3421  
  3422  var crc_table = [8][256]Z_crc_t{
  3423  	{
  3424  		0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
  3425  		0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
  3426  		0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
  3427  		0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
  3428  		0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
  3429  		0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
  3430  		0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
  3431  		0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
  3432  		0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
  3433  		0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
  3434  		0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
  3435  		0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
  3436  		0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
  3437  		0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
  3438  		0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
  3439  		0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
  3440  		0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
  3441  		0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
  3442  		0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
  3443  		0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
  3444  		0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
  3445  		0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
  3446  		0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
  3447  		0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
  3448  		0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
  3449  		0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
  3450  		0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
  3451  		0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
  3452  		0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
  3453  		0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
  3454  		0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
  3455  		0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
  3456  		0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
  3457  		0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
  3458  		0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
  3459  		0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
  3460  		0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
  3461  		0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
  3462  		0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
  3463  		0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
  3464  		0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
  3465  		0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
  3466  		0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
  3467  		0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
  3468  		0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
  3469  		0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
  3470  		0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
  3471  		0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
  3472  		0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
  3473  		0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
  3474  		0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
  3475  		0x2d02ef8d,
  3476  	},
  3477  	{
  3478  		0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504,
  3479  		0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49,
  3480  		0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e,
  3481  		0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192,
  3482  		0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859,
  3483  		0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c,
  3484  		0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620,
  3485  		0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265,
  3486  		0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae,
  3487  		0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2,
  3488  		0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175,
  3489  		0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38,
  3490  		0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05,
  3491  		0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40,
  3492  		0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f,
  3493  		0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca,
  3494  		0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850,
  3495  		0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d,
  3496  		0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da,
  3497  		0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864,
  3498  		0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af,
  3499  		0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea,
  3500  		0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74,
  3501  		0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31,
  3502  		0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa,
  3503  		0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a,
  3504  		0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd,
  3505  		0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180,
  3506  		0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a,
  3507  		0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f,
  3508  		0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290,
  3509  		0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5,
  3510  		0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed,
  3511  		0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0,
  3512  		0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167,
  3513  		0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b,
  3514  		0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0,
  3515  		0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5,
  3516  		0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc,
  3517  		0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189,
  3518  		0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842,
  3519  		0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e,
  3520  		0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299,
  3521  		0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4,
  3522  		0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec,
  3523  		0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9,
  3524  		0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66,
  3525  		0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23,
  3526  		0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9,
  3527  		0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4,
  3528  		0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33,
  3529  		0x9324fd72,
  3530  	},
  3531  	{
  3532  		0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc,
  3533  		0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f,
  3534  		0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a,
  3535  		0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29,
  3536  		0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8,
  3537  		0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023,
  3538  		0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e,
  3539  		0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065,
  3540  		0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84,
  3541  		0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7,
  3542  		0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922,
  3543  		0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71,
  3544  		0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0,
  3545  		0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b,
  3546  		0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816,
  3547  		0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd,
  3548  		0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c,
  3549  		0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f,
  3550  		0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba,
  3551  		0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579,
  3552  		0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98,
  3553  		0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873,
  3554  		0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e,
  3555  		0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5,
  3556  		0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134,
  3557  		0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7,
  3558  		0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732,
  3559  		0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461,
  3560  		0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0,
  3561  		0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b,
  3562  		0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26,
  3563  		0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd,
  3564  		0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc,
  3565  		0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef,
  3566  		0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a,
  3567  		0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049,
  3568  		0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8,
  3569  		0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43,
  3570  		0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e,
  3571  		0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5,
  3572  		0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24,
  3573  		0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07,
  3574  		0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982,
  3575  		0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1,
  3576  		0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0,
  3577  		0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b,
  3578  		0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576,
  3579  		0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d,
  3580  		0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c,
  3581  		0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f,
  3582  		0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda,
  3583  		0xbe9834ed,
  3584  	},
  3585  	{
  3586  		0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757,
  3587  		0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a,
  3588  		0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733,
  3589  		0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871,
  3590  		0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70,
  3591  		0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42,
  3592  		0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5,
  3593  		0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787,
  3594  		0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086,
  3595  		0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4,
  3596  		0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d,
  3597  		0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0,
  3598  		0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d,
  3599  		0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f,
  3600  		0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859,
  3601  		0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b,
  3602  		0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5,
  3603  		0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028,
  3604  		0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891,
  3605  		0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed,
  3606  		0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec,
  3607  		0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde,
  3608  		0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817,
  3609  		0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825,
  3610  		0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24,
  3611  		0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e,
  3612  		0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7,
  3613  		0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a,
  3614  		0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4,
  3615  		0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196,
  3616  		0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0,
  3617  		0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2,
  3618  		0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52,
  3619  		0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f,
  3620  		0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36,
  3621  		0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174,
  3622  		0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675,
  3623  		0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647,
  3624  		0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d,
  3625  		0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf,
  3626  		0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be,
  3627  		0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc,
  3628  		0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645,
  3629  		0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98,
  3630  		0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138,
  3631  		0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a,
  3632  		0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c,
  3633  		0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e,
  3634  		0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0,
  3635  		0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d,
  3636  		0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194,
  3637  		0xde0506f1,
  3638  	},
  3639  	{
  3640  		0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07,
  3641  		0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79,
  3642  		0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7,
  3643  		0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84,
  3644  		0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13,
  3645  		0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663,
  3646  		0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5,
  3647  		0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5,
  3648  		0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832,
  3649  		0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51,
  3650  		0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf,
  3651  		0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1,
  3652  		0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76,
  3653  		0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606,
  3654  		0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996,
  3655  		0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6,
  3656  		0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c,
  3657  		0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712,
  3658  		0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c,
  3659  		0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4,
  3660  		0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943,
  3661  		0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333,
  3662  		0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe,
  3663  		0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce,
  3664  		0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359,
  3665  		0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a,
  3666  		0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04,
  3667  		0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a,
  3668  		0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0,
  3669  		0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580,
  3670  		0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10,
  3671  		0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060,
  3672  		0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1,
  3673  		0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf,
  3674  		0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31,
  3675  		0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852,
  3676  		0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5,
  3677  		0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5,
  3678  		0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75,
  3679  		0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005,
  3680  		0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292,
  3681  		0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1,
  3682  		0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f,
  3683  		0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111,
  3684  		0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0,
  3685  		0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0,
  3686  		0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40,
  3687  		0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530,
  3688  		0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba,
  3689  		0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4,
  3690  		0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a,
  3691  		0x8def022d,
  3692  	},
  3693  	{
  3694  		0x00000000, 0x41311b19, 0x82623632, 0xc3532d2b, 0x04c56c64,
  3695  		0x45f4777d, 0x86a75a56, 0xc796414f, 0x088ad9c8, 0x49bbc2d1,
  3696  		0x8ae8effa, 0xcbd9f4e3, 0x0c4fb5ac, 0x4d7eaeb5, 0x8e2d839e,
  3697  		0xcf1c9887, 0x5112c24a, 0x1023d953, 0xd370f478, 0x9241ef61,
  3698  		0x55d7ae2e, 0x14e6b537, 0xd7b5981c, 0x96848305, 0x59981b82,
  3699  		0x18a9009b, 0xdbfa2db0, 0x9acb36a9, 0x5d5d77e6, 0x1c6c6cff,
  3700  		0xdf3f41d4, 0x9e0e5acd, 0xa2248495, 0xe3159f8c, 0x2046b2a7,
  3701  		0x6177a9be, 0xa6e1e8f1, 0xe7d0f3e8, 0x2483dec3, 0x65b2c5da,
  3702  		0xaaae5d5d, 0xeb9f4644, 0x28cc6b6f, 0x69fd7076, 0xae6b3139,
  3703  		0xef5a2a20, 0x2c09070b, 0x6d381c12, 0xf33646df, 0xb2075dc6,
  3704  		0x715470ed, 0x30656bf4, 0xf7f32abb, 0xb6c231a2, 0x75911c89,
  3705  		0x34a00790, 0xfbbc9f17, 0xba8d840e, 0x79dea925, 0x38efb23c,
  3706  		0xff79f373, 0xbe48e86a, 0x7d1bc541, 0x3c2ade58, 0x054f79f0,
  3707  		0x447e62e9, 0x872d4fc2, 0xc61c54db, 0x018a1594, 0x40bb0e8d,
  3708  		0x83e823a6, 0xc2d938bf, 0x0dc5a038, 0x4cf4bb21, 0x8fa7960a,
  3709  		0xce968d13, 0x0900cc5c, 0x4831d745, 0x8b62fa6e, 0xca53e177,
  3710  		0x545dbbba, 0x156ca0a3, 0xd63f8d88, 0x970e9691, 0x5098d7de,
  3711  		0x11a9ccc7, 0xd2fae1ec, 0x93cbfaf5, 0x5cd76272, 0x1de6796b,
  3712  		0xdeb55440, 0x9f844f59, 0x58120e16, 0x1923150f, 0xda703824,
  3713  		0x9b41233d, 0xa76bfd65, 0xe65ae67c, 0x2509cb57, 0x6438d04e,
  3714  		0xa3ae9101, 0xe29f8a18, 0x21cca733, 0x60fdbc2a, 0xafe124ad,
  3715  		0xeed03fb4, 0x2d83129f, 0x6cb20986, 0xab2448c9, 0xea1553d0,
  3716  		0x29467efb, 0x687765e2, 0xf6793f2f, 0xb7482436, 0x741b091d,
  3717  		0x352a1204, 0xf2bc534b, 0xb38d4852, 0x70de6579, 0x31ef7e60,
  3718  		0xfef3e6e7, 0xbfc2fdfe, 0x7c91d0d5, 0x3da0cbcc, 0xfa368a83,
  3719  		0xbb07919a, 0x7854bcb1, 0x3965a7a8, 0x4b98833b, 0x0aa99822,
  3720  		0xc9fab509, 0x88cbae10, 0x4f5def5f, 0x0e6cf446, 0xcd3fd96d,
  3721  		0x8c0ec274, 0x43125af3, 0x022341ea, 0xc1706cc1, 0x804177d8,
  3722  		0x47d73697, 0x06e62d8e, 0xc5b500a5, 0x84841bbc, 0x1a8a4171,
  3723  		0x5bbb5a68, 0x98e87743, 0xd9d96c5a, 0x1e4f2d15, 0x5f7e360c,
  3724  		0x9c2d1b27, 0xdd1c003e, 0x120098b9, 0x533183a0, 0x9062ae8b,
  3725  		0xd153b592, 0x16c5f4dd, 0x57f4efc4, 0x94a7c2ef, 0xd596d9f6,
  3726  		0xe9bc07ae, 0xa88d1cb7, 0x6bde319c, 0x2aef2a85, 0xed796bca,
  3727  		0xac4870d3, 0x6f1b5df8, 0x2e2a46e1, 0xe136de66, 0xa007c57f,
  3728  		0x6354e854, 0x2265f34d, 0xe5f3b202, 0xa4c2a91b, 0x67918430,
  3729  		0x26a09f29, 0xb8aec5e4, 0xf99fdefd, 0x3accf3d6, 0x7bfde8cf,
  3730  		0xbc6ba980, 0xfd5ab299, 0x3e099fb2, 0x7f3884ab, 0xb0241c2c,
  3731  		0xf1150735, 0x32462a1e, 0x73773107, 0xb4e17048, 0xf5d06b51,
  3732  		0x3683467a, 0x77b25d63, 0x4ed7facb, 0x0fe6e1d2, 0xccb5ccf9,
  3733  		0x8d84d7e0, 0x4a1296af, 0x0b238db6, 0xc870a09d, 0x8941bb84,
  3734  		0x465d2303, 0x076c381a, 0xc43f1531, 0x850e0e28, 0x42984f67,
  3735  		0x03a9547e, 0xc0fa7955, 0x81cb624c, 0x1fc53881, 0x5ef42398,
  3736  		0x9da70eb3, 0xdc9615aa, 0x1b0054e5, 0x5a314ffc, 0x996262d7,
  3737  		0xd85379ce, 0x174fe149, 0x567efa50, 0x952dd77b, 0xd41ccc62,
  3738  		0x138a8d2d, 0x52bb9634, 0x91e8bb1f, 0xd0d9a006, 0xecf37e5e,
  3739  		0xadc26547, 0x6e91486c, 0x2fa05375, 0xe836123a, 0xa9070923,
  3740  		0x6a542408, 0x2b653f11, 0xe479a796, 0xa548bc8f, 0x661b91a4,
  3741  		0x272a8abd, 0xe0bccbf2, 0xa18dd0eb, 0x62defdc0, 0x23efe6d9,
  3742  		0xbde1bc14, 0xfcd0a70d, 0x3f838a26, 0x7eb2913f, 0xb924d070,
  3743  		0xf815cb69, 0x3b46e642, 0x7a77fd5b, 0xb56b65dc, 0xf45a7ec5,
  3744  		0x370953ee, 0x763848f7, 0xb1ae09b8, 0xf09f12a1, 0x33cc3f8a,
  3745  		0x72fd2493,
  3746  	},
  3747  	{
  3748  		0x00000000, 0x376ac201, 0x6ed48403, 0x59be4602, 0xdca80907,
  3749  		0xebc2cb06, 0xb27c8d04, 0x85164f05, 0xb851130e, 0x8f3bd10f,
  3750  		0xd685970d, 0xe1ef550c, 0x64f91a09, 0x5393d808, 0x0a2d9e0a,
  3751  		0x3d475c0b, 0x70a3261c, 0x47c9e41d, 0x1e77a21f, 0x291d601e,
  3752  		0xac0b2f1b, 0x9b61ed1a, 0xc2dfab18, 0xf5b56919, 0xc8f23512,
  3753  		0xff98f713, 0xa626b111, 0x914c7310, 0x145a3c15, 0x2330fe14,
  3754  		0x7a8eb816, 0x4de47a17, 0xe0464d38, 0xd72c8f39, 0x8e92c93b,
  3755  		0xb9f80b3a, 0x3cee443f, 0x0b84863e, 0x523ac03c, 0x6550023d,
  3756  		0x58175e36, 0x6f7d9c37, 0x36c3da35, 0x01a91834, 0x84bf5731,
  3757  		0xb3d59530, 0xea6bd332, 0xdd011133, 0x90e56b24, 0xa78fa925,
  3758  		0xfe31ef27, 0xc95b2d26, 0x4c4d6223, 0x7b27a022, 0x2299e620,
  3759  		0x15f32421, 0x28b4782a, 0x1fdeba2b, 0x4660fc29, 0x710a3e28,
  3760  		0xf41c712d, 0xc376b32c, 0x9ac8f52e, 0xada2372f, 0xc08d9a70,
  3761  		0xf7e75871, 0xae591e73, 0x9933dc72, 0x1c259377, 0x2b4f5176,
  3762  		0x72f11774, 0x459bd575, 0x78dc897e, 0x4fb64b7f, 0x16080d7d,
  3763  		0x2162cf7c, 0xa4748079, 0x931e4278, 0xcaa0047a, 0xfdcac67b,
  3764  		0xb02ebc6c, 0x87447e6d, 0xdefa386f, 0xe990fa6e, 0x6c86b56b,
  3765  		0x5bec776a, 0x02523168, 0x3538f369, 0x087faf62, 0x3f156d63,
  3766  		0x66ab2b61, 0x51c1e960, 0xd4d7a665, 0xe3bd6464, 0xba032266,
  3767  		0x8d69e067, 0x20cbd748, 0x17a11549, 0x4e1f534b, 0x7975914a,
  3768  		0xfc63de4f, 0xcb091c4e, 0x92b75a4c, 0xa5dd984d, 0x989ac446,
  3769  		0xaff00647, 0xf64e4045, 0xc1248244, 0x4432cd41, 0x73580f40,
  3770  		0x2ae64942, 0x1d8c8b43, 0x5068f154, 0x67023355, 0x3ebc7557,
  3771  		0x09d6b756, 0x8cc0f853, 0xbbaa3a52, 0xe2147c50, 0xd57ebe51,
  3772  		0xe839e25a, 0xdf53205b, 0x86ed6659, 0xb187a458, 0x3491eb5d,
  3773  		0x03fb295c, 0x5a456f5e, 0x6d2fad5f, 0x801b35e1, 0xb771f7e0,
  3774  		0xeecfb1e2, 0xd9a573e3, 0x5cb33ce6, 0x6bd9fee7, 0x3267b8e5,
  3775  		0x050d7ae4, 0x384a26ef, 0x0f20e4ee, 0x569ea2ec, 0x61f460ed,
  3776  		0xe4e22fe8, 0xd388ede9, 0x8a36abeb, 0xbd5c69ea, 0xf0b813fd,
  3777  		0xc7d2d1fc, 0x9e6c97fe, 0xa90655ff, 0x2c101afa, 0x1b7ad8fb,
  3778  		0x42c49ef9, 0x75ae5cf8, 0x48e900f3, 0x7f83c2f2, 0x263d84f0,
  3779  		0x115746f1, 0x944109f4, 0xa32bcbf5, 0xfa958df7, 0xcdff4ff6,
  3780  		0x605d78d9, 0x5737bad8, 0x0e89fcda, 0x39e33edb, 0xbcf571de,
  3781  		0x8b9fb3df, 0xd221f5dd, 0xe54b37dc, 0xd80c6bd7, 0xef66a9d6,
  3782  		0xb6d8efd4, 0x81b22dd5, 0x04a462d0, 0x33cea0d1, 0x6a70e6d3,
  3783  		0x5d1a24d2, 0x10fe5ec5, 0x27949cc4, 0x7e2adac6, 0x494018c7,
  3784  		0xcc5657c2, 0xfb3c95c3, 0xa282d3c1, 0x95e811c0, 0xa8af4dcb,
  3785  		0x9fc58fca, 0xc67bc9c8, 0xf1110bc9, 0x740744cc, 0x436d86cd,
  3786  		0x1ad3c0cf, 0x2db902ce, 0x4096af91, 0x77fc6d90, 0x2e422b92,
  3787  		0x1928e993, 0x9c3ea696, 0xab546497, 0xf2ea2295, 0xc580e094,
  3788  		0xf8c7bc9f, 0xcfad7e9e, 0x9613389c, 0xa179fa9d, 0x246fb598,
  3789  		0x13057799, 0x4abb319b, 0x7dd1f39a, 0x3035898d, 0x075f4b8c,
  3790  		0x5ee10d8e, 0x698bcf8f, 0xec9d808a, 0xdbf7428b, 0x82490489,
  3791  		0xb523c688, 0x88649a83, 0xbf0e5882, 0xe6b01e80, 0xd1dadc81,
  3792  		0x54cc9384, 0x63a65185, 0x3a181787, 0x0d72d586, 0xa0d0e2a9,
  3793  		0x97ba20a8, 0xce0466aa, 0xf96ea4ab, 0x7c78ebae, 0x4b1229af,
  3794  		0x12ac6fad, 0x25c6adac, 0x1881f1a7, 0x2feb33a6, 0x765575a4,
  3795  		0x413fb7a5, 0xc429f8a0, 0xf3433aa1, 0xaafd7ca3, 0x9d97bea2,
  3796  		0xd073c4b5, 0xe71906b4, 0xbea740b6, 0x89cd82b7, 0x0cdbcdb2,
  3797  		0x3bb10fb3, 0x620f49b1, 0x55658bb0, 0x6822d7bb, 0x5f4815ba,
  3798  		0x06f653b8, 0x319c91b9, 0xb48adebc, 0x83e01cbd, 0xda5e5abf,
  3799  		0xed3498be,
  3800  	},
  3801  	{
  3802  		0x00000000, 0x6567bcb8, 0x8bc809aa, 0xeeafb512, 0x5797628f,
  3803  		0x32f0de37, 0xdc5f6b25, 0xb938d79d, 0xef28b4c5, 0x8a4f087d,
  3804  		0x64e0bd6f, 0x018701d7, 0xb8bfd64a, 0xddd86af2, 0x3377dfe0,
  3805  		0x56106358, 0x9f571950, 0xfa30a5e8, 0x149f10fa, 0x71f8ac42,
  3806  		0xc8c07bdf, 0xada7c767, 0x43087275, 0x266fcecd, 0x707fad95,
  3807  		0x1518112d, 0xfbb7a43f, 0x9ed01887, 0x27e8cf1a, 0x428f73a2,
  3808  		0xac20c6b0, 0xc9477a08, 0x3eaf32a0, 0x5bc88e18, 0xb5673b0a,
  3809  		0xd00087b2, 0x6938502f, 0x0c5fec97, 0xe2f05985, 0x8797e53d,
  3810  		0xd1878665, 0xb4e03add, 0x5a4f8fcf, 0x3f283377, 0x8610e4ea,
  3811  		0xe3775852, 0x0dd8ed40, 0x68bf51f8, 0xa1f82bf0, 0xc49f9748,
  3812  		0x2a30225a, 0x4f579ee2, 0xf66f497f, 0x9308f5c7, 0x7da740d5,
  3813  		0x18c0fc6d, 0x4ed09f35, 0x2bb7238d, 0xc518969f, 0xa07f2a27,
  3814  		0x1947fdba, 0x7c204102, 0x928ff410, 0xf7e848a8, 0x3d58149b,
  3815  		0x583fa823, 0xb6901d31, 0xd3f7a189, 0x6acf7614, 0x0fa8caac,
  3816  		0xe1077fbe, 0x8460c306, 0xd270a05e, 0xb7171ce6, 0x59b8a9f4,
  3817  		0x3cdf154c, 0x85e7c2d1, 0xe0807e69, 0x0e2fcb7b, 0x6b4877c3,
  3818  		0xa20f0dcb, 0xc768b173, 0x29c70461, 0x4ca0b8d9, 0xf5986f44,
  3819  		0x90ffd3fc, 0x7e5066ee, 0x1b37da56, 0x4d27b90e, 0x284005b6,
  3820  		0xc6efb0a4, 0xa3880c1c, 0x1ab0db81, 0x7fd76739, 0x9178d22b,
  3821  		0xf41f6e93, 0x03f7263b, 0x66909a83, 0x883f2f91, 0xed589329,
  3822  		0x546044b4, 0x3107f80c, 0xdfa84d1e, 0xbacff1a6, 0xecdf92fe,
  3823  		0x89b82e46, 0x67179b54, 0x027027ec, 0xbb48f071, 0xde2f4cc9,
  3824  		0x3080f9db, 0x55e74563, 0x9ca03f6b, 0xf9c783d3, 0x176836c1,
  3825  		0x720f8a79, 0xcb375de4, 0xae50e15c, 0x40ff544e, 0x2598e8f6,
  3826  		0x73888bae, 0x16ef3716, 0xf8408204, 0x9d273ebc, 0x241fe921,
  3827  		0x41785599, 0xafd7e08b, 0xcab05c33, 0x3bb659ed, 0x5ed1e555,
  3828  		0xb07e5047, 0xd519ecff, 0x6c213b62, 0x094687da, 0xe7e932c8,
  3829  		0x828e8e70, 0xd49eed28, 0xb1f95190, 0x5f56e482, 0x3a31583a,
  3830  		0x83098fa7, 0xe66e331f, 0x08c1860d, 0x6da63ab5, 0xa4e140bd,
  3831  		0xc186fc05, 0x2f294917, 0x4a4ef5af, 0xf3762232, 0x96119e8a,
  3832  		0x78be2b98, 0x1dd99720, 0x4bc9f478, 0x2eae48c0, 0xc001fdd2,
  3833  		0xa566416a, 0x1c5e96f7, 0x79392a4f, 0x97969f5d, 0xf2f123e5,
  3834  		0x05196b4d, 0x607ed7f5, 0x8ed162e7, 0xebb6de5f, 0x528e09c2,
  3835  		0x37e9b57a, 0xd9460068, 0xbc21bcd0, 0xea31df88, 0x8f566330,
  3836  		0x61f9d622, 0x049e6a9a, 0xbda6bd07, 0xd8c101bf, 0x366eb4ad,
  3837  		0x53090815, 0x9a4e721d, 0xff29cea5, 0x11867bb7, 0x74e1c70f,
  3838  		0xcdd91092, 0xa8beac2a, 0x46111938, 0x2376a580, 0x7566c6d8,
  3839  		0x10017a60, 0xfeaecf72, 0x9bc973ca, 0x22f1a457, 0x479618ef,
  3840  		0xa939adfd, 0xcc5e1145, 0x06ee4d76, 0x6389f1ce, 0x8d2644dc,
  3841  		0xe841f864, 0x51792ff9, 0x341e9341, 0xdab12653, 0xbfd69aeb,
  3842  		0xe9c6f9b3, 0x8ca1450b, 0x620ef019, 0x07694ca1, 0xbe519b3c,
  3843  		0xdb362784, 0x35999296, 0x50fe2e2e, 0x99b95426, 0xfcdee89e,
  3844  		0x12715d8c, 0x7716e134, 0xce2e36a9, 0xab498a11, 0x45e63f03,
  3845  		0x208183bb, 0x7691e0e3, 0x13f65c5b, 0xfd59e949, 0x983e55f1,
  3846  		0x2106826c, 0x44613ed4, 0xaace8bc6, 0xcfa9377e, 0x38417fd6,
  3847  		0x5d26c36e, 0xb389767c, 0xd6eecac4, 0x6fd61d59, 0x0ab1a1e1,
  3848  		0xe41e14f3, 0x8179a84b, 0xd769cb13, 0xb20e77ab, 0x5ca1c2b9,
  3849  		0x39c67e01, 0x80fea99c, 0xe5991524, 0x0b36a036, 0x6e511c8e,
  3850  		0xa7166686, 0xc271da3e, 0x2cde6f2c, 0x49b9d394, 0xf0810409,
  3851  		0x95e6b8b1, 0x7b490da3, 0x1e2eb11b, 0x483ed243, 0x2d596efb,
  3852  		0xc3f6dbe9, 0xa6916751, 0x1fa9b0cc, 0x7ace0c74, 0x9461b966,
  3853  		0xf10605de,
  3854  	},
  3855  } /* crc32.h:5:25 */
  3856  
  3857  // =========================================================================
  3858  // This function can be used by asm versions of crc32()
  3859  func Xget_crc_table(tls *libc.TLS) uintptr { /* crc32.c:188:19: */
  3860  	return uintptr(uintptr(unsafe.Pointer(&crc_table)))
  3861  }
  3862  
  3863  // =========================================================================
  3864  
  3865  // =========================================================================
  3866  func Xcrc32_z(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:202:23: */
  3867  	bp := tls.Alloc(4)
  3868  	defer tls.Free(4)
  3869  
  3870  	if buf == uintptr(Z_NULL) {
  3871  		return 0
  3872  	}
  3873  
  3874  	if uint32(unsafe.Sizeof(uintptr(0))) == uint32(unsafe.Sizeof(Ptrdiff_t(0))) {
  3875  		// var endian Z_crc_t at bp, 4
  3876  
  3877  		*(*Z_crc_t)(unsafe.Pointer(bp /* endian */)) = Z_crc_t(1)
  3878  		if *(*uint8)(unsafe.Pointer(bp)) != 0 {
  3879  			return crc32_little(tls, crc, buf, len)
  3880  		} else {
  3881  			return crc32_big(tls, crc, buf, len)
  3882  		}
  3883  	}
  3884  	crc = crc ^ 0xffffffff
  3885  	for len >= Z_size_t(8) {
  3886  		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
  3887  		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
  3888  		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
  3889  		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
  3890  		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
  3891  		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
  3892  		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
  3893  		crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
  3894  		len = len - Z_size_t(8)
  3895  	}
  3896  	if len != 0 {
  3897  		for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&len, 1) != 0 {
  3898  			crc = uint32(*(*Z_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&crc_table)) + uintptr((int32(crc)^int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))&0xff)*4))) ^ crc>>8
  3899  		}
  3900  	}
  3901  	return crc ^ 0xffffffff
  3902  }
  3903  
  3904  // =========================================================================
  3905  func Xcrc32(tls *libc.TLS, crc uint32, buf uintptr, len UInt) uint32 { /* crc32.c:237:23: */
  3906  	return Xcrc32_z(tls, crc, buf, len)
  3907  }
  3908  
  3909  //
  3910  //    This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit
  3911  //    integer pointer type. This violates the strict aliasing rule, where a
  3912  //    compiler can assume, for optimization purposes, that two pointers to
  3913  //    fundamentally different types won't ever point to the same memory. This can
  3914  //    manifest as a problem only if one of the pointers is written to. This code
  3915  //    only reads from those pointers. So long as this code remains isolated in
  3916  //    this compilation unit, there won't be a problem. For this reason, this code
  3917  //    should not be copied and pasted into a compilation unit in which other code
  3918  //    writes to the buffer that is passed to these routines.
  3919  //
  3920  
  3921  // =========================================================================
  3922  
  3923  // =========================================================================
  3924  func crc32_little(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:266:21: */
  3925  	var c Z_crc_t
  3926  	var buf4 uintptr
  3927  
  3928  	c = Z_crc_t(crc)
  3929  	c = ^c
  3930  	for len != 0 && Ptrdiff_t(buf)&3 != 0 {
  3931  		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
  3932  		len--
  3933  	}
  3934  
  3935  	buf4 = buf
  3936  	for len >= Z_size_t(32) {
  3937  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3938  		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))
  3939  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3940  		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))
  3941  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3942  		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))
  3943  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3944  		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))
  3945  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3946  		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))
  3947  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3948  		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))
  3949  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3950  		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))
  3951  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3952  		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))
  3953  		len = len - Z_size_t(32)
  3954  	}
  3955  	for len >= Z_size_t(4) {
  3956  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3957  		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))
  3958  		len = len - Z_size_t(4)
  3959  	}
  3960  	buf = buf4
  3961  
  3962  	if len != 0 {
  3963  		for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&len, 1) != 0 {
  3964  			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
  3965  		}
  3966  	}
  3967  	c = ^c
  3968  	return uint32(c)
  3969  }
  3970  
  3971  // =========================================================================
  3972  
  3973  // =========================================================================
  3974  func crc32_big(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:306:21: */
  3975  	var c Z_crc_t
  3976  	var buf4 uintptr
  3977  
  3978  	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
  3979  	c = ^c
  3980  	for len != 0 && Ptrdiff_t(buf)&3 != 0 {
  3981  		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
  3982  		len--
  3983  	}
  3984  
  3985  	buf4 = buf
  3986  	for len >= Z_size_t(32) {
  3987  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3988  		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))
  3989  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3990  		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))
  3991  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3992  		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))
  3993  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3994  		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))
  3995  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3996  		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))
  3997  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3998  		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))
  3999  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4000  		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))
  4001  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4002  		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))
  4003  		len = len - Z_size_t(32)
  4004  	}
  4005  	for len >= Z_size_t(4) {
  4006  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4007  		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))
  4008  		len = len - Z_size_t(4)
  4009  	}
  4010  	buf = buf4
  4011  
  4012  	if len != 0 {
  4013  		for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&len, 1) != 0 {
  4014  			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
  4015  		}
  4016  	}
  4017  	c = ^c
  4018  	return uint32(c>>24&Z_crc_t(0xff) + c>>8&Z_crc_t(0xff00) + c&Z_crc_t(0xff00)<<8 + c&Z_crc_t(0xff)<<24)
  4019  }
  4020  
  4021  // =========================================================================
  4022  func gf2_matrix_times(tls *libc.TLS, mat uintptr, vec uint32) uint32 { /* crc32.c:344:21: */
  4023  	var sum uint32
  4024  
  4025  	sum = uint32(0)
  4026  	for vec != 0 {
  4027  		if vec&uint32(1) != 0 {
  4028  			sum = sum ^ *(*uint32)(unsafe.Pointer(mat))
  4029  		}
  4030  		vec >>= 1
  4031  		mat += 4
  4032  	}
  4033  	return sum
  4034  }
  4035  
  4036  // =========================================================================
  4037  func gf2_matrix_square(tls *libc.TLS, square uintptr, mat uintptr) { /* crc32.c:361:12: */
  4038  	var n int32
  4039  
  4040  	for n = 0; n < GF2_DIM; n++ {
  4041  		*(*uint32)(unsafe.Pointer(square + uintptr(n)*4)) = gf2_matrix_times(tls, mat, *(*uint32)(unsafe.Pointer(mat + uintptr(n)*4)))
  4042  	}
  4043  }
  4044  
  4045  // =========================================================================
  4046  func crc32_combine_(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:372:13: */
  4047  	bp := tls.Alloc(256)
  4048  	defer tls.Free(256)
  4049  
  4050  	var n int32
  4051  	var row uint32
  4052  	// var even [32]uint32 at bp+128, 128
  4053  	// even-power-of-two zeros operator
  4054  	// var odd [32]uint32 at bp, 128
  4055  	// odd-power-of-two zeros operator
  4056  
  4057  	// degenerate case (also disallow negative lengths)
  4058  	if len2 <= int64(0) {
  4059  		return crc1
  4060  	}
  4061  
  4062  	// put operator for one zero bit in odd
  4063  	*(*uint32)(unsafe.Pointer(bp)) = 0xedb88320 // CRC-32 polynomial
  4064  	row = uint32(1)
  4065  	for n = 1; n < GF2_DIM; n++ {
  4066  		*(*uint32)(unsafe.Pointer(bp + uintptr(n)*4)) = row
  4067  		row <<= 1
  4068  	}
  4069  
  4070  	// put operator for two zero bits in even
  4071  	gf2_matrix_square(tls, bp+128, bp)
  4072  
  4073  	// put operator for four zero bits in odd
  4074  	gf2_matrix_square(tls, bp, bp+128)
  4075  
  4076  	// apply len2 zeros to crc1 (first square will put the operator for one
  4077  	//        zero byte, eight zero bits, in even)
  4078  	for __ccgo := true; __ccgo; __ccgo = len2 != int64(0) {
  4079  		// apply zeros operator for this bit of len2
  4080  		gf2_matrix_square(tls, bp+128, bp)
  4081  		if len2&int64(1) != 0 {
  4082  			crc1 = gf2_matrix_times(tls, bp+128, crc1)
  4083  		}
  4084  		len2 >>= 1
  4085  
  4086  		// if no more bits set, then done
  4087  		if len2 == int64(0) {
  4088  			break
  4089  		}
  4090  
  4091  		// another iteration of the loop with odd and even swapped
  4092  		gf2_matrix_square(tls, bp, bp+128)
  4093  		if len2&int64(1) != 0 {
  4094  			crc1 = gf2_matrix_times(tls, bp, crc1)
  4095  		}
  4096  		len2 >>= 1
  4097  
  4098  		// if no more bits set, then done
  4099  	}
  4100  
  4101  	// return combined crc
  4102  	crc1 = crc1 ^ crc2
  4103  	return crc1
  4104  }
  4105  
  4106  // =========================================================================
  4107  func Xcrc32_combine(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:428:15: */
  4108  	return crc32_combine_(tls, crc1, crc2, len2)
  4109  }
  4110  
  4111  func Xcrc32_combine64(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:436:15: */
  4112  	return crc32_combine_(tls, crc1, crc2, len2)
  4113  }
  4114  
  4115  // Reverse the bytes in a 32-bit value
  4116  
  4117  // define NO_GZIP when compiling if you want to disable gzip header and
  4118  //    trailer creation by deflate().  NO_GZIP would be used to avoid linking in
  4119  //    the crc code when it is not needed.  For shared libraries, gzip encoding
  4120  //    should be left enabled.
  4121  
  4122  // ===========================================================================
  4123  // Internal compression state.
  4124  
  4125  // number of length codes, not counting the special END_BLOCK code
  4126  
  4127  // number of literal bytes 0..255
  4128  
  4129  // number of Literal or Length codes, including the END_BLOCK code
  4130  
  4131  // number of distance codes
  4132  
  4133  // number of codes used to transfer the bit lengths
  4134  
  4135  // maximum heap size
  4136  
  4137  // All codes must not exceed MAX_BITS bits
  4138  
  4139  // size of bit buffer in bi_buf
  4140  
  4141  // Stream status
  4142  
  4143  // Data structure describing a single value and its code string.
  4144  type Ct_data_s = struct {
  4145  	Ffc struct{ Ffreq Ush }
  4146  	Fdl struct{ Fdad Ush }
  4147  } /* zlib.h:84:1 */
  4148  
  4149  // Reverse the bytes in a 32-bit value
  4150  
  4151  // define NO_GZIP when compiling if you want to disable gzip header and
  4152  //    trailer creation by deflate().  NO_GZIP would be used to avoid linking in
  4153  //    the crc code when it is not needed.  For shared libraries, gzip encoding
  4154  //    should be left enabled.
  4155  
  4156  // ===========================================================================
  4157  // Internal compression state.
  4158  
  4159  // number of length codes, not counting the special END_BLOCK code
  4160  
  4161  // number of literal bytes 0..255
  4162  
  4163  // number of Literal or Length codes, including the END_BLOCK code
  4164  
  4165  // number of distance codes
  4166  
  4167  // number of codes used to transfer the bit lengths
  4168  
  4169  // maximum heap size
  4170  
  4171  // All codes must not exceed MAX_BITS bits
  4172  
  4173  // size of bit buffer in bi_buf
  4174  
  4175  // Stream status
  4176  
  4177  // Data structure describing a single value and its code string.
  4178  type Ct_data = Ct_data_s /* deflate.h:77:7 */
  4179  
  4180  type Static_tree_desc_s = struct {
  4181  	Fstatic_tree uintptr
  4182  	Fextra_bits  uintptr
  4183  	Fextra_base  int32
  4184  	Felems       int32
  4185  	Fmax_length  int32
  4186  } /* deflate.h:84:9 */
  4187  
  4188  type Tree_desc_s = struct {
  4189  	Fdyn_tree  uintptr
  4190  	Fmax_code  int32
  4191  	Fstat_desc uintptr
  4192  } /* zlib.h:84:1 */
  4193  
  4194  type Tree_desc = Tree_desc_s /* deflate.h:90:7 */
  4195  
  4196  type Pos = Ush     /* deflate.h:92:13 */
  4197  type Posf = Pos    /* deflate.h:93:17 */
  4198  type IPos = uint32 /* deflate.h:94:18 */
  4199  
  4200  // A Pos is an index in the character window. We use short instead of int to
  4201  // save space in the various tables. IPos is used only for parameter passing.
  4202  
  4203  type Deflate_state = Internal_state /* deflate.h:276:7 */
  4204  
  4205  var Xdeflate_copyright = *(*[69]uint8)(unsafe.Pointer(ts + 7)) /* deflate.c:54:12 */
  4206  //
  4207  //   If you use the zlib library in a product, an acknowledgment is welcome
  4208  //   in the documentation of your product. If for some reason you cannot
  4209  //   include such an acknowledgment, I would appreciate that you keep this
  4210  //   copyright string in the executable of your product.
  4211  //
  4212  
  4213  // ===========================================================================
  4214  //  Function prototypes.
  4215  type Block_state = uint32 /* deflate.c:71:3 */
  4216  
  4217  type Compress_func = uintptr /* deflate.c:73:21 */
  4218  
  4219  // ===========================================================================
  4220  // Local data
  4221  
  4222  // Tail of hash chains
  4223  
  4224  // Matches of length 3 are discarded if their distance exceeds TOO_FAR
  4225  
  4226  // Values for max_lazy_match, good_match and max_chain_length, depending on
  4227  // the desired pack level (0..9). The values given below have been tuned to
  4228  // exclude worst case performance for pathological files. Better values may be
  4229  // found for specific files.
  4230  type Config_s = struct {
  4231  	Fgood_length Ush
  4232  	Fmax_lazy    Ush
  4233  	Fnice_length Ush
  4234  	Fmax_chain   Ush
  4235  	Ffunc        Compress_func
  4236  } /* deflate.c:120:9 */
  4237  
  4238  // ===========================================================================
  4239  // Local data
  4240  
  4241  // Tail of hash chains
  4242  
  4243  // Matches of length 3 are discarded if their distance exceeds TOO_FAR
  4244  
  4245  // Values for max_lazy_match, good_match and max_chain_length, depending on
  4246  // the desired pack level (0..9). The values given below have been tuned to
  4247  // exclude worst case performance for pathological files. Better values may be
  4248  // found for specific files.
  4249  type Config = Config_s /* deflate.c:126:3 */
  4250  
  4251  var configuration_table = [10]Config{
  4252  	//      good lazy nice chain
  4253  	/* 0 */ {Ffunc: 0}, // store only
  4254  	/* 1 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(8), Fmax_chain: Ush(4), Ffunc: 0}, // max speed, no lazy matches
  4255  	/* 2 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(5), Fnice_length: Ush(16), Fmax_chain: Ush(8), Ffunc: 0},
  4256  	/* 3 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(6), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0},
  4257  
  4258  	/* 4 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(16), Fmax_chain: Ush(16), Ffunc: 0}, // lazy matches
  4259  	/* 5 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0},
  4260  	/* 6 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(128), Fmax_chain: Ush(128), Ffunc: 0},
  4261  	/* 7 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(32), Fnice_length: Ush(128), Fmax_chain: Ush(256), Ffunc: 0},
  4262  	/* 8 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(128), Fnice_length: Ush(258), Fmax_chain: Ush(1024), Ffunc: 0},
  4263  	/* 9 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(258), Fnice_length: Ush(258), Fmax_chain: Ush(4096), Ffunc: 0}} /* deflate.c:134:20 */
  4264  
  4265  // max compression
  4266  
  4267  // Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
  4268  // For deflate_fast() (levels <= 3) good is ignored and lazy has a different
  4269  // meaning.
  4270  
  4271  // rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH
  4272  
  4273  // ===========================================================================
  4274  // Update a hash value with the given input byte
  4275  // IN  assertion: all calls to UPDATE_HASH are made with consecutive input
  4276  //    characters, so that a running hash key can be computed from the previous
  4277  //    key instead of complete recalculation each time.
  4278  
  4279  // ===========================================================================
  4280  // Insert string str in the dictionary and set match_head to the previous head
  4281  // of the hash chain (the most recent string with same hash key). Return
  4282  // the previous length of the hash chain.
  4283  // If this file is compiled with -DFASTEST, the compression level is forced
  4284  // to 1, and no hash chains are maintained.
  4285  // IN  assertion: all calls to INSERT_STRING are made with consecutive input
  4286  //    characters and the first MIN_MATCH bytes of str are valid (except for
  4287  //    the last MIN_MATCH-1 bytes of the input file).
  4288  
  4289  // ===========================================================================
  4290  // Initialize the hash table (avoiding 64K overflow for 16 bit systems).
  4291  // prev[] will be initialized on the fly.
  4292  
  4293  // ===========================================================================
  4294  // Slide the hash table when sliding the window down (could be avoided with 32
  4295  // bit values at the expense of memory usage). We slide even when level == 0 to
  4296  // keep the hash table consistent if we switch back to level > 0 later.
  4297  func slide_hash(tls *libc.TLS, s uintptr) { /* deflate.c:201:12: */
  4298  	var n uint32
  4299  	var m uint32
  4300  	var p uintptr
  4301  	var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  4302  
  4303  	n = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size
  4304  	p = (*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2
  4305  	for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 {
  4306  		m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2))))
  4307  		*(*Posf)(unsafe.Pointer(p)) = func() uint16 {
  4308  			if m >= wsize {
  4309  				return uint16(m - wsize)
  4310  			}
  4311  			return uint16(NIL)
  4312  		}()
  4313  	}
  4314  	n = wsize
  4315  	p = (*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2
  4316  	for __ccgo1 := true; __ccgo1; __ccgo1 = libc.PreDecUint32(&n, 1) != 0 {
  4317  		m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2))))
  4318  		*(*Posf)(unsafe.Pointer(p)) = func() uint16 {
  4319  			if m >= wsize {
  4320  				return uint16(m - wsize)
  4321  			}
  4322  			return uint16(NIL)
  4323  		}()
  4324  		// If n is not on any hash chain, prev[n] is garbage but
  4325  		// its value will never be used.
  4326  	}
  4327  }
  4328  
  4329  // =========================================================================
  4330  func XdeflateInit_(tls *libc.TLS, strm Z_streamp, level int32, version uintptr, stream_size int32) int32 { /* deflate.c:228:13: */
  4331  	return XdeflateInit2_(tls, strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
  4332  		Z_DEFAULT_STRATEGY, version, stream_size)
  4333  	// To do: ignore strm->next_in if we use it as window
  4334  }
  4335  
  4336  // =========================================================================
  4337  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: */
  4338  	var s uintptr
  4339  	var wrap int32 = 1
  4340  	var overlay uintptr
  4341  	// We overlay pending_buf and d_buf+l_buf. This works since the average
  4342  	// output size for (length,distance) codes is <= 24 bits.
  4343  
  4344  	if version == uintptr(Z_NULL) || int32(*(*uint8)(unsafe.Pointer(version))) != int32(my_version[0]) || uint32(stream_size) != uint32(unsafe.Sizeof(Z_stream{})) {
  4345  		return -6
  4346  	}
  4347  	if strm == uintptr(Z_NULL) {
  4348  		return -2
  4349  	}
  4350  
  4351  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
  4352  	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
  4353  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
  4354  			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
  4355  		}{Xzcalloc}))
  4356  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
  4357  	}
  4358  	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
  4359  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
  4360  			f func(*libc.TLS, Voidpf, Voidpf)
  4361  		}{Xzcfree}))
  4362  	}
  4363  
  4364  	if level == -1 {
  4365  		level = 6
  4366  	}
  4367  
  4368  	if windowBits < 0 { // suppress zlib wrapper
  4369  		wrap = 0
  4370  		windowBits = -windowBits
  4371  	} else if windowBits > 15 {
  4372  		wrap = 2 // write gzip wrapper instead
  4373  		windowBits = windowBits - 16
  4374  	}
  4375  	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 {
  4376  		return -2
  4377  	}
  4378  	if windowBits == 8 {
  4379  		windowBits = 9
  4380  	} // until 256-byte window bug fixed
  4381  	s = (*struct {
  4382  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  4383  	})(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{})))
  4384  	if s == uintptr(Z_NULL) {
  4385  		return -4
  4386  	}
  4387  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = s
  4388  	(*Deflate_state)(unsafe.Pointer(s)).Fstrm = strm
  4389  	(*Deflate_state)(unsafe.Pointer(s)).Fstatus = INIT_STATE // to pass state test in deflateReset()
  4390  
  4391  	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap
  4392  	(*Deflate_state)(unsafe.Pointer(s)).Fgzhead = Gz_headerp(Z_NULL)
  4393  	(*Deflate_state)(unsafe.Pointer(s)).Fw_bits = UInt(windowBits)
  4394  	(*Deflate_state)(unsafe.Pointer(s)).Fw_size = UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fw_bits)
  4395  	(*Deflate_state)(unsafe.Pointer(s)).Fw_mask = (*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(1)
  4396  
  4397  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_bits = UInt(memLevel) + UInt(7)
  4398  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_size = UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits)
  4399  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_mask = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)
  4400  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift = ((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits + UInt(MIN_MATCH) - UInt(1)) / UInt(MIN_MATCH)
  4401  
  4402  	(*Deflate_state)(unsafe.Pointer(s)).Fwindow = (*struct {
  4403  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  4404  	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fw_size, uint32(2)*uint32(unsafe.Sizeof(Byte(0))))
  4405  	(*Deflate_state)(unsafe.Pointer(s)).Fprev = (*struct {
  4406  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  4407  	})(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))))
  4408  	(*Deflate_state)(unsafe.Pointer(s)).Fhead = (*struct {
  4409  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  4410  	})(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))))
  4411  
  4412  	(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg(0) // nothing written to s->window yet
  4413  
  4414  	(*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize = UInt(int32(1) << (memLevel + 6)) // 16K elements by default
  4415  
  4416  	overlay = (*struct {
  4417  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  4418  	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize, uint32(unsafe.Sizeof(Ush(0)))+uint32(2))
  4419  	(*Deflate_state)(unsafe.Pointer(s)).Fpending_buf = overlay
  4420  	(*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size = Ulg((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize) * (uint32(unsafe.Sizeof(Ush(0))) + uint32(2))
  4421  
  4422  	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) {
  4423  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE
  4424  		(*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -4]
  4425  		XdeflateEnd(tls, strm)
  4426  		return -4
  4427  	}
  4428  	(*Deflate_state)(unsafe.Pointer(s)).Fd_buf = overlay + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize/UInt(unsafe.Sizeof(Ush(0))))*2
  4429  	(*Deflate_state)(unsafe.Pointer(s)).Fl_buf = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((uint32(1)+uint32(unsafe.Sizeof(Ush(0))))*(*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)
  4430  
  4431  	(*Deflate_state)(unsafe.Pointer(s)).Flevel = level
  4432  	(*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy
  4433  	(*Deflate_state)(unsafe.Pointer(s)).Fmethod = Byte(method)
  4434  
  4435  	return XdeflateReset(tls, strm)
  4436  }
  4437  
  4438  var my_version = *(*[7]uint8)(unsafe.Pointer(ts)) /* deflate.c:253:23 */
  4439  
  4440  // =========================================================================
  4441  // Check for a valid deflate stream state. Return 0 if ok, 1 if not.
  4442  func deflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:353:11: */
  4443  	var s uintptr
  4444  	if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
  4445  		return 1
  4446  	}
  4447  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4448  	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 {
  4449  		return 1
  4450  	}
  4451  	return 0
  4452  }
  4453  
  4454  // =========================================================================
  4455  func XdeflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* deflate.c:376:13: */
  4456  	var s uintptr
  4457  	var str UInt
  4458  	var n UInt
  4459  	var wrap int32
  4460  	var avail uint32
  4461  	var next uintptr
  4462  
  4463  	if deflateStateCheck(tls, strm) != 0 || dictionary == uintptr(Z_NULL) {
  4464  		return -2
  4465  	}
  4466  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4467  	wrap = (*Deflate_state)(unsafe.Pointer(s)).Fwrap
  4468  	if wrap == 2 || wrap == 1 && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE || (*Deflate_state)(unsafe.Pointer(s)).Flookahead != 0 {
  4469  		return -2
  4470  	}
  4471  
  4472  	// when using zlib wrappers, compute Adler-32 for provided dictionary
  4473  	if wrap == 1 {
  4474  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength)
  4475  	}
  4476  	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = 0 // avoid computing Adler-32 in read_buf
  4477  
  4478  	// if dictionary would fill window, just replace the history
  4479  	if dictLength >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
  4480  		if wrap == 0 { // already empty otherwise
  4481  			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
  4482  			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint32(unsafe.Sizeof(Posf(0))))
  4483  
  4484  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
  4485  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
  4486  			(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  4487  		}
  4488  		dictionary += uintptr(dictLength - (*Deflate_state)(unsafe.Pointer(s)).Fw_size) // use the tail
  4489  		dictLength = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  4490  	}
  4491  
  4492  	// insert dictionary into window and hash
  4493  	avail = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  4494  	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
  4495  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = dictLength
  4496  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary
  4497  	fill_window(tls, s)
  4498  	for (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
  4499  		str = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
  4500  		n = (*Deflate_state)(unsafe.Pointer(s)).Flookahead - UInt(MIN_MATCH-1)
  4501  		for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 {
  4502  			(*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
  4503  			*(*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))
  4504  			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str)
  4505  			str++
  4506  		}
  4507  		(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = str
  4508  		(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(MIN_MATCH - 1)
  4509  		fill_window(tls, s)
  4510  	}
  4511  	*(*UInt)(unsafe.Pointer(s + 108)) += (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  4512  	(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  4513  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  4514  	(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0)
  4515  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+120, UInt(MIN_MATCH-1))
  4516  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  4517  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
  4518  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = avail
  4519  	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap
  4520  	return Z_OK
  4521  }
  4522  
  4523  // =========================================================================
  4524  func XdeflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* deflate.c:445:13: */
  4525  	var s uintptr
  4526  	var len UInt
  4527  
  4528  	if deflateStateCheck(tls, strm) != 0 {
  4529  		return -2
  4530  	}
  4531  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4532  	len = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  4533  	if len > (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
  4534  		len = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  4535  	}
  4536  	if dictionary != uintptr(Z_NULL) && len != 0 {
  4537  		libc.Xmemcpy(tls, dictionary, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)+uintptr((*Deflate_state)(unsafe.Pointer(s)).Flookahead)-uintptr(len), len)
  4538  	}
  4539  	if dictLength != uintptr(Z_NULL) {
  4540  		*(*UInt)(unsafe.Pointer(dictLength)) = len
  4541  	}
  4542  	return Z_OK
  4543  }
  4544  
  4545  // =========================================================================
  4546  func XdeflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:467:13: */
  4547  	var s uintptr
  4548  
  4549  	if deflateStateCheck(tls, strm) != 0 {
  4550  		return -2
  4551  	}
  4552  
  4553  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint32(strm+20, ULong(0))
  4554  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // use zfree if we ever allocate msg dynamically
  4555  	(*Z_stream)(unsafe.Pointer(strm)).Fdata_type = Z_UNKNOWN
  4556  
  4557  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4558  	(*Deflate_state)(unsafe.Pointer(s)).Fpending = Ulg(0)
  4559  	(*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf
  4560  
  4561  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap < 0 {
  4562  		(*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap // was made negative by deflate(..., Z_FINISH);
  4563  	}
  4564  	(*Deflate_state)(unsafe.Pointer(s)).Fstatus = func() int32 {
  4565  		if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
  4566  			return GZIP_STATE
  4567  		}
  4568  		return func() int32 {
  4569  			if (*Deflate_state)(unsafe.Pointer(s)).Fwrap != 0 {
  4570  				return INIT_STATE
  4571  			}
  4572  			return BUSY_STATE
  4573  		}()
  4574  	}()
  4575  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = func() uint32 {
  4576  		if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
  4577  			return Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
  4578  		}
  4579  		return Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
  4580  	}()
  4581  	(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = Z_NO_FLUSH
  4582  
  4583  	X_tr_init(tls, s)
  4584  
  4585  	return Z_OK
  4586  }
  4587  
  4588  // =========================================================================
  4589  func XdeflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:505:13: */
  4590  	var ret int32
  4591  
  4592  	ret = XdeflateResetKeep(tls, strm)
  4593  	if ret == Z_OK {
  4594  		lm_init(tls, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
  4595  	}
  4596  	return ret
  4597  }
  4598  
  4599  // =========================================================================
  4600  func XdeflateSetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* deflate.c:517:13: */
  4601  	if deflateStateCheck(tls, strm) != 0 || (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != 2 {
  4602  		return -2
  4603  	}
  4604  	(*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head
  4605  	return Z_OK
  4606  }
  4607  
  4608  // =========================================================================
  4609  func XdeflatePending(tls *libc.TLS, strm Z_streamp, pending uintptr, bits uintptr) int32 { /* deflate.c:528:13: */
  4610  	if deflateStateCheck(tls, strm) != 0 {
  4611  		return -2
  4612  	}
  4613  	if pending != uintptr(Z_NULL) {
  4614  		*(*uint32)(unsafe.Pointer(pending)) = uint32((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending)
  4615  	}
  4616  	if bits != uintptr(Z_NULL) {
  4617  		*(*int32)(unsafe.Pointer(bits)) = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid
  4618  	}
  4619  	return Z_OK
  4620  }
  4621  
  4622  // =========================================================================
  4623  func XdeflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* deflate.c:542:13: */
  4624  	var s uintptr
  4625  	var put int32
  4626  
  4627  	if deflateStateCheck(tls, strm) != 0 {
  4628  		return -2
  4629  	}
  4630  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4631  	if (*Deflate_state)(unsafe.Pointer(s)).Fd_buf < (*Deflate_state)(unsafe.Pointer(s)).Fpending_out+uintptr(int32(Buf_size+7)>>3) {
  4632  		return -5
  4633  	}
  4634  	for __ccgo := true; __ccgo; __ccgo = bits != 0 {
  4635  		put = Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid
  4636  		if put > bits {
  4637  			put = bits
  4638  		}
  4639  		*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(value & (int32(1)<<put - 1) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
  4640  		*(*int32)(unsafe.Pointer(s + 5820)) += put
  4641  		X_tr_flush_bits(tls, s)
  4642  		value >>= put
  4643  		bits = bits - put
  4644  	}
  4645  	return Z_OK
  4646  }
  4647  
  4648  // =========================================================================
  4649  func XdeflateParams(tls *libc.TLS, strm Z_streamp, level int32, strategy int32) int32 { /* deflate.c:568:13: */
  4650  	var s uintptr
  4651  	var func1 Compress_func
  4652  
  4653  	if deflateStateCheck(tls, strm) != 0 {
  4654  		return -2
  4655  	}
  4656  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4657  
  4658  	if level == -1 {
  4659  		level = 6
  4660  	}
  4661  	if level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED {
  4662  		return -2
  4663  	}
  4664  	func1 = configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc
  4665  
  4666  	if (strategy != (*Deflate_state)(unsafe.Pointer(s)).Fstrategy || func1 != configuration_table[level].Ffunc) && (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water != 0 {
  4667  		// Flush the last buffer:
  4668  		var err int32 = Xdeflate(tls, strm, Z_BLOCK)
  4669  		if err == -2 {
  4670  			return err
  4671  		}
  4672  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  4673  			return -5
  4674  		}
  4675  	}
  4676  	if (*Deflate_state)(unsafe.Pointer(s)).Flevel != level {
  4677  		if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 && (*Deflate_state)(unsafe.Pointer(s)).Fmatches != UInt(0) {
  4678  			if (*Deflate_state)(unsafe.Pointer(s)).Fmatches == UInt(1) {
  4679  				slide_hash(tls, s)
  4680  			} else {
  4681  				*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
  4682  			}
  4683  			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint32(unsafe.Sizeof(Posf(0))))
  4684  
  4685  			(*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(0)
  4686  		}
  4687  		(*Deflate_state)(unsafe.Pointer(s)).Flevel = level
  4688  		(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[level].Fmax_lazy)
  4689  		(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[level].Fgood_length)
  4690  		(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[level].Fnice_length)
  4691  		(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[level].Fmax_chain)
  4692  	}
  4693  	(*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy
  4694  	return Z_OK
  4695  }
  4696  
  4697  // =========================================================================
  4698  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: */
  4699  	var s uintptr
  4700  
  4701  	if deflateStateCheck(tls, strm) != 0 {
  4702  		return -2
  4703  	}
  4704  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4705  	(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(good_length)
  4706  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(max_lazy)
  4707  	(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length
  4708  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(max_chain)
  4709  	return Z_OK
  4710  }
  4711  
  4712  // =========================================================================
  4713  // For the default windowBits of 15 and memLevel of 8, this function returns
  4714  // a close to exact, as well as small, upper bound on the compressed size.
  4715  // They are coded as constants here for a reason--if the #define's are
  4716  // changed, then this function needs to be changed as well.  The return
  4717  // value for 15 and 8 only works for those exact settings.
  4718  //
  4719  // For any setting other than those defaults for windowBits and memLevel,
  4720  // the value returned is a conservative worst case for the maximum expansion
  4721  // resulting from using fixed blocks instead of stored blocks, which deflate
  4722  // can emit on compressed data for some combinations of the parameters.
  4723  //
  4724  // This function could be more sophisticated to provide closer upper bounds for
  4725  // every combination of windowBits and memLevel.  But even the conservative
  4726  // upper bound of about 14% expansion does not seem onerous for output buffer
  4727  // allocation.
  4728  func XdeflateBound(tls *libc.TLS, strm Z_streamp, sourceLen ULong) ULong { /* deflate.c:652:15: */
  4729  	var s uintptr
  4730  	var complen ULong
  4731  	var wraplen ULong
  4732  
  4733  	// conservative upper bound for compressed data
  4734  	complen = sourceLen + (sourceLen+ULong(7))>>3 + (sourceLen+ULong(63))>>6 + ULong(5)
  4735  
  4736  	// if can't get parameters, return conservative bound plus zlib wrapper
  4737  	if deflateStateCheck(tls, strm) != 0 {
  4738  		return complen + ULong(6)
  4739  	}
  4740  
  4741  	// compute wrapper length
  4742  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4743  	switch (*Deflate_state)(unsafe.Pointer(s)).Fwrap {
  4744  	case 0: // raw deflate
  4745  		wraplen = ULong(0)
  4746  		break
  4747  	case 1: // zlib wrapper
  4748  		wraplen = ULong(6 + func() int32 {
  4749  			if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != 0 {
  4750  				return 4
  4751  			}
  4752  			return 0
  4753  		}())
  4754  		break
  4755  	case 2: // gzip wrapper
  4756  		wraplen = ULong(18)
  4757  		if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(Z_NULL) { // user-supplied gzip header
  4758  			var str uintptr
  4759  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
  4760  				wraplen = wraplen + ULong(UInt(2)+(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len)
  4761  			}
  4762  			str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname
  4763  			if str != uintptr(Z_NULL) {
  4764  				for __ccgo := true; __ccgo; __ccgo = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 {
  4765  					wraplen++
  4766  				}
  4767  			}
  4768  			str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment
  4769  			if str != uintptr(Z_NULL) {
  4770  				for __ccgo1 := true; __ccgo1; __ccgo1 = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 {
  4771  					wraplen++
  4772  				}
  4773  			}
  4774  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  4775  				wraplen = wraplen + ULong(2)
  4776  			}
  4777  		}
  4778  		break
  4779  	default: // for compiler happiness
  4780  		wraplen = ULong(6)
  4781  	}
  4782  
  4783  	// if not default parameters, return conservative bound
  4784  	if (*Deflate_state)(unsafe.Pointer(s)).Fw_bits != UInt(15) || (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits != UInt(8+7) {
  4785  		return complen + wraplen
  4786  	}
  4787  
  4788  	// default settings: return tight bound for that case
  4789  	return sourceLen + sourceLen>>12 + sourceLen>>14 + sourceLen>>25 + ULong(13) - ULong(6) + wraplen
  4790  }
  4791  
  4792  // =========================================================================
  4793  // Put a short in the pending buffer. The 16-bit value is put in MSB order.
  4794  // IN assertion: the stream state is correct and there is enough room in
  4795  // pending_buf.
  4796  func putShortMSB(tls *libc.TLS, s uintptr, b UInt) { /* deflate.c:716:12: */
  4797  	{
  4798  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte(b >> 8)
  4799  	}
  4800  
  4801  	{
  4802  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte(b & UInt(0xff))
  4803  	}
  4804  
  4805  }
  4806  
  4807  // =========================================================================
  4808  // Flush as much pending output as possible. All deflate() output, except for
  4809  // some deflate_stored() output, goes through this function so some
  4810  // applications may wish to modify it to avoid allocating a large
  4811  // strm->next_out buffer and copying into it. (See also read_buf()).
  4812  func flush_pending(tls *libc.TLS, strm Z_streamp) { /* deflate.c:730:12: */
  4813  	var len uint32
  4814  	var s uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4815  
  4816  	X_tr_flush_bits(tls, s)
  4817  	len = uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending)
  4818  	if len > (*Z_stream)(unsafe.Pointer(strm)).Favail_out {
  4819  		len = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  4820  	}
  4821  	if len == uint32(0) {
  4822  		return
  4823  	}
  4824  
  4825  	libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fpending_out, len)
  4826  	*(*uintptr)(unsafe.Pointer(strm + 12)) += uintptr(len)
  4827  	*(*uintptr)(unsafe.Pointer(s + 16)) += uintptr(len)
  4828  	*(*ULong)(unsafe.Pointer(strm + 20)) += ULong(len)
  4829  	*(*UInt)(unsafe.Pointer(strm + 16)) -= len
  4830  	*(*Ulg)(unsafe.Pointer(s + 20)) -= Ulg(len)
  4831  	if (*Deflate_state)(unsafe.Pointer(s)).Fpending == Ulg(0) {
  4832  		(*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf
  4833  	}
  4834  }
  4835  
  4836  // ===========================================================================
  4837  // Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1].
  4838  
  4839  // =========================================================================
  4840  func Xdeflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* deflate.c:763:13: */
  4841  	var old_flush int32 // value of flush param for previous deflate call
  4842  	var s uintptr
  4843  
  4844  	if deflateStateCheck(tls, strm) != 0 || flush > Z_BLOCK || flush < 0 {
  4845  		return -2
  4846  	}
  4847  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4848  
  4849  	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 {
  4850  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -2]; return -2 }()
  4851  	}
  4852  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  4853  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }()
  4854  	}
  4855  
  4856  	old_flush = (*Deflate_state)(unsafe.Pointer(s)).Flast_flush
  4857  	(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = flush
  4858  
  4859  	// Flush as much pending output as possible
  4860  	if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  4861  		flush_pending(tls, strm)
  4862  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  4863  			// Since avail_out is 0, deflate will be called again with
  4864  			// more output space, but possibly with both pending and
  4865  			// avail_in equal to zero. There won't be anything to do,
  4866  			// but this is not an error situation so make sure we
  4867  			// return OK instead of BUF_ERROR at next call of deflate:
  4868  			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  4869  			return Z_OK
  4870  		}
  4871  
  4872  		// Make sure there is something to do and avoid duplicate consecutive
  4873  		// flushes. For repeated and useless calls with Z_FINISH, we keep
  4874  		// returning Z_STREAM_END instead of Z_BUF_ERROR.
  4875  	} else if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && flush*2-func() int32 {
  4876  		if flush > 4 {
  4877  			return 9
  4878  		}
  4879  		return 0
  4880  	}() <= old_flush*2-func() int32 {
  4881  		if old_flush > 4 {
  4882  			return 9
  4883  		}
  4884  		return 0
  4885  	}() && flush != Z_FINISH {
  4886  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }()
  4887  	}
  4888  
  4889  	// User must not provide more input after the first FINISH:
  4890  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE && (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0) {
  4891  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }()
  4892  	}
  4893  
  4894  	// Write the header
  4895  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == INIT_STATE {
  4896  		// zlib header
  4897  		var header UInt = (UInt(Z_DEFLATED) + ((*Deflate_state)(unsafe.Pointer(s)).Fw_bits-UInt(8))<<4) << 8
  4898  		var level_flags UInt
  4899  
  4900  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 {
  4901  			level_flags = UInt(0)
  4902  		} else if (*Deflate_state)(unsafe.Pointer(s)).Flevel < 6 {
  4903  			level_flags = UInt(1)
  4904  		} else if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 6 {
  4905  			level_flags = UInt(2)
  4906  		} else {
  4907  			level_flags = UInt(3)
  4908  		}
  4909  		header = header | level_flags<<6
  4910  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) {
  4911  			header = header | UInt(PRESET_DICT)
  4912  		}
  4913  		header = header + (UInt(31) - header%UInt(31))
  4914  
  4915  		putShortMSB(tls, s, header)
  4916  
  4917  		// Save the adler32 of the preset dictionary:
  4918  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) {
  4919  			putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler>>16))
  4920  			putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler&ULong(0xffff)))
  4921  		}
  4922  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
  4923  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE
  4924  
  4925  		// Compression must start with an empty pending buffer
  4926  		flush_pending(tls, strm)
  4927  		if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  4928  			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  4929  			return Z_OK
  4930  		}
  4931  	}
  4932  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == GZIP_STATE {
  4933  		// gzip header
  4934  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
  4935  		{
  4936  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(31)
  4937  		}
  4938  
  4939  		{
  4940  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(139)
  4941  		}
  4942  
  4943  		{
  4944  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(8)
  4945  		}
  4946  
  4947  		if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(Z_NULL) {
  4948  			{
  4949  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  4950  			}
  4951  
  4952  			{
  4953  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  4954  			}
  4955  
  4956  			{
  4957  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  4958  			}
  4959  
  4960  			{
  4961  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  4962  			}
  4963  
  4964  			{
  4965  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  4966  			}
  4967  
  4968  			{
  4969  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 {
  4970  					if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 {
  4971  						return uint8(2)
  4972  					}
  4973  					return func() uint8 {
  4974  						if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 {
  4975  							return uint8(4)
  4976  						}
  4977  						return uint8(0)
  4978  					}()
  4979  				}()
  4980  			}
  4981  
  4982  			{
  4983  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(OS_CODE)
  4984  			}
  4985  
  4986  			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE
  4987  
  4988  			// Compression must start with an empty pending buffer
  4989  			flush_pending(tls, strm)
  4990  			if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  4991  				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  4992  				return Z_OK
  4993  			}
  4994  		} else {
  4995  			{
  4996  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(func() int32 {
  4997  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 {
  4998  						return 1
  4999  					}
  5000  					return 0
  5001  				}() + func() int32 {
  5002  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  5003  						return 2
  5004  					}
  5005  					return 0
  5006  				}() + func() int32 {
  5007  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(Z_NULL) {
  5008  						return 0
  5009  					}
  5010  					return 4
  5011  				}() + func() int32 {
  5012  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(Z_NULL) {
  5013  						return 0
  5014  					}
  5015  					return 8
  5016  				}() + func() int32 {
  5017  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(Z_NULL) {
  5018  						return 0
  5019  					}
  5020  					return 16
  5021  				}())
  5022  			}
  5023  
  5024  			{
  5025  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime & ULong(0xff))
  5026  			}
  5027  
  5028  			{
  5029  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 8 & ULong(0xff))
  5030  			}
  5031  
  5032  			{
  5033  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 16 & ULong(0xff))
  5034  			}
  5035  
  5036  			{
  5037  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 24 & ULong(0xff))
  5038  			}
  5039  
  5040  			{
  5041  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 {
  5042  					if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 {
  5043  						return uint8(2)
  5044  					}
  5045  					return func() uint8 {
  5046  						if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 {
  5047  							return uint8(4)
  5048  						}
  5049  						return uint8(0)
  5050  					}()
  5051  				}()
  5052  			}
  5053  
  5054  			{
  5055  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fos & 0xff)
  5056  			}
  5057  
  5058  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
  5059  				{
  5060  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len & UInt(0xff))
  5061  				}
  5062  
  5063  				{
  5064  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len >> 8 & UInt(0xff))
  5065  				}
  5066  
  5067  			}
  5068  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  5069  				(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf,
  5070  					uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending))
  5071  			}
  5072  			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0)
  5073  			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = EXTRA_STATE
  5074  		}
  5075  	}
  5076  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == EXTRA_STATE {
  5077  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
  5078  			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
  5079  			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)
  5080  			for (*Deflate_state)(unsafe.Pointer(s)).Fpending+Ulg(left) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  5081  				var copy UInt = UInt((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fpending)
  5082  				libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending),
  5083  					(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex), copy)
  5084  				(*Deflate_state)(unsafe.Pointer(s)).Fpending = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size
  5085  				for __ccgo := true; __ccgo; __ccgo = 0 != 0 {
  5086  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5087  						(*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))
  5088  					}
  5089  				}
  5090  				*(*Ulg)(unsafe.Pointer(s + 32)) += Ulg(copy)
  5091  				flush_pending(tls, strm)
  5092  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5093  					(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5094  					return Z_OK
  5095  				}
  5096  				beg = Ulg(0)
  5097  				left = left - copy
  5098  			}
  5099  			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending),
  5100  				(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex), left)
  5101  			*(*Ulg)(unsafe.Pointer(s + 20)) += Ulg(left)
  5102  			for __ccgo1 := true; __ccgo1; __ccgo1 = 0 != 0 {
  5103  				if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5104  					(*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))
  5105  				}
  5106  			}
  5107  			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0)
  5108  		}
  5109  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = NAME_STATE
  5110  	}
  5111  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == NAME_STATE {
  5112  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(Z_NULL) {
  5113  			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
  5114  			var val int32
  5115  			for __ccgo2 := true; __ccgo2; __ccgo2 = val != 0 {
  5116  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  5117  					for __ccgo3 := true; __ccgo3; __ccgo3 = 0 != 0 {
  5118  						if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5119  							(*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))
  5120  						}
  5121  					}
  5122  					flush_pending(tls, strm)
  5123  					if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5124  						(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5125  						return Z_OK
  5126  					}
  5127  					beg = Ulg(0)
  5128  				}
  5129  				val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1)))))
  5130  				{
  5131  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val)
  5132  				}
  5133  
  5134  			}
  5135  			for __ccgo4 := true; __ccgo4; __ccgo4 = 0 != 0 {
  5136  				if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5137  					(*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))
  5138  				}
  5139  			}
  5140  			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0)
  5141  		}
  5142  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = COMMENT_STATE
  5143  	}
  5144  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == COMMENT_STATE {
  5145  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(Z_NULL) {
  5146  			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
  5147  			var val int32
  5148  			for __ccgo5 := true; __ccgo5; __ccgo5 = val != 0 {
  5149  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  5150  					for __ccgo6 := true; __ccgo6; __ccgo6 = 0 != 0 {
  5151  						if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5152  							(*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))
  5153  						}
  5154  					}
  5155  					flush_pending(tls, strm)
  5156  					if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5157  						(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5158  						return Z_OK
  5159  					}
  5160  					beg = Ulg(0)
  5161  				}
  5162  				val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1)))))
  5163  				{
  5164  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val)
  5165  				}
  5166  
  5167  			}
  5168  			for __ccgo7 := true; __ccgo7; __ccgo7 = 0 != 0 {
  5169  				if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5170  					(*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))
  5171  				}
  5172  			}
  5173  		}
  5174  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = HCRC_STATE
  5175  	}
  5176  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == HCRC_STATE {
  5177  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  5178  			if (*Deflate_state)(unsafe.Pointer(s)).Fpending+Ulg(2) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  5179  				flush_pending(tls, strm)
  5180  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5181  					(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5182  					return Z_OK
  5183  				}
  5184  			}
  5185  			{
  5186  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & ULong(0xff))
  5187  			}
  5188  
  5189  			{
  5190  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8 & ULong(0xff))
  5191  			}
  5192  
  5193  			(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
  5194  		}
  5195  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE
  5196  
  5197  		// Compression must start with an empty pending buffer
  5198  		flush_pending(tls, strm)
  5199  		if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5200  			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5201  			return Z_OK
  5202  		}
  5203  	}
  5204  
  5205  	// Start a new block or continue the current one.
  5206  	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 {
  5207  		var bstate Block_state
  5208  
  5209  		if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 {
  5210  			bstate = deflate_stored(tls, s, flush)
  5211  		} else {
  5212  			if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_HUFFMAN_ONLY {
  5213  				bstate = deflate_huff(tls, s, flush)
  5214  			} else {
  5215  				if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_RLE {
  5216  					bstate = deflate_rle(tls, s, flush)
  5217  				} else {
  5218  					bstate = (*struct {
  5219  						f func(*libc.TLS, uintptr, int32) Block_state
  5220  					})(unsafe.Pointer(&struct{ uintptr }{configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc})).f(tls, s, flush)
  5221  				}
  5222  			}
  5223  		}
  5224  
  5225  		if bstate == Finish_started || bstate == Finish_done {
  5226  			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE
  5227  		}
  5228  		if bstate == Need_more || bstate == Finish_started {
  5229  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  5230  				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR next call, see above
  5231  			}
  5232  			return Z_OK
  5233  			// If flush != Z_NO_FLUSH && avail_out == 0, the next call
  5234  			// of deflate should use the same flush parameter to make sure
  5235  			// that the flush is complete. So we don't have to output an
  5236  			// empty block here, this will be done at next call. This also
  5237  			// ensures that for a very small output buffer, we emit at most
  5238  			// one empty block.
  5239  		}
  5240  		if bstate == Block_done {
  5241  			if flush == Z_PARTIAL_FLUSH {
  5242  				X_tr_align(tls, s)
  5243  			} else if flush != Z_BLOCK { // FULL_FLUSH or SYNC_FLUSH
  5244  				X_tr_stored_block(tls, s, uintptr(0), uint32(0), 0)
  5245  				// For a full flush, this empty block will be recognized
  5246  				// as a special marker by inflate_sync().
  5247  				if flush == Z_FULL_FLUSH {
  5248  					*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
  5249  					libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint32(unsafe.Sizeof(Posf(0))))
  5250  					// forget history
  5251  					if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  5252  						(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
  5253  						(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
  5254  						(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  5255  					}
  5256  				}
  5257  			}
  5258  			flush_pending(tls, strm)
  5259  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  5260  				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR at next call, see above
  5261  				return Z_OK
  5262  			}
  5263  		}
  5264  	}
  5265  
  5266  	if flush != Z_FINISH {
  5267  		return Z_OK
  5268  	}
  5269  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap <= 0 {
  5270  		return Z_STREAM_END
  5271  	}
  5272  
  5273  	// Write the trailer
  5274  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
  5275  		{
  5276  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & ULong(0xff))
  5277  		}
  5278  
  5279  		{
  5280  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8 & ULong(0xff))
  5281  		}
  5282  
  5283  		{
  5284  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16 & ULong(0xff))
  5285  		}
  5286  
  5287  		{
  5288  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 24 & ULong(0xff))
  5289  		}
  5290  
  5291  		{
  5292  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in & ULong(0xff))
  5293  		}
  5294  
  5295  		{
  5296  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 8 & ULong(0xff))
  5297  		}
  5298  
  5299  		{
  5300  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 16 & ULong(0xff))
  5301  		}
  5302  
  5303  		{
  5304  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 24 & ULong(0xff))
  5305  		}
  5306  
  5307  	} else {
  5308  		putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler>>16))
  5309  		putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler&ULong(0xffff)))
  5310  	}
  5311  	flush_pending(tls, strm)
  5312  	// If avail_out is zero, the application will call deflate again
  5313  	// to flush the rest.
  5314  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap > 0 {
  5315  		(*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap
  5316  	} // write the trailer only once!
  5317  	if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5318  		return Z_OK
  5319  	}
  5320  	return Z_STREAM_END
  5321  }
  5322  
  5323  // =========================================================================
  5324  func XdeflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:1076:13: */
  5325  	var status int32
  5326  
  5327  	if deflateStateCheck(tls, strm) != 0 {
  5328  		return -2
  5329  	}
  5330  
  5331  	status = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus
  5332  
  5333  	/* Deallocate in reverse order of allocations: */
  5334  	{
  5335  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 {
  5336  			(*struct {
  5337  				f func(*libc.TLS, Voidpf, Voidpf)
  5338  			})(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)
  5339  		}
  5340  	}
  5341  
  5342  	{
  5343  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 {
  5344  			(*struct {
  5345  				f func(*libc.TLS, Voidpf, Voidpf)
  5346  			})(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)
  5347  		}
  5348  	}
  5349  
  5350  	{
  5351  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 {
  5352  			(*struct {
  5353  				f func(*libc.TLS, Voidpf, Voidpf)
  5354  			})(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)
  5355  		}
  5356  	}
  5357  
  5358  	{
  5359  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 {
  5360  			(*struct {
  5361  				f func(*libc.TLS, Voidpf, Voidpf)
  5362  			})(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)
  5363  		}
  5364  	}
  5365  
  5366  	(*struct {
  5367  		f func(*libc.TLS, Voidpf, Voidpf)
  5368  	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
  5369  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
  5370  
  5371  	if status == BUSY_STATE {
  5372  		return -3
  5373  	}
  5374  	return Z_OK
  5375  }
  5376  
  5377  // =========================================================================
  5378  // Copy the source state to the destination state.
  5379  // To simplify the source, this is not supported for 16-bit MSDOS (which
  5380  // doesn't have enough memory anyway to duplicate compression states).
  5381  func XdeflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* deflate.c:1102:13: */
  5382  	var ds uintptr
  5383  	var ss uintptr
  5384  	var overlay uintptr
  5385  
  5386  	if deflateStateCheck(tls, source) != 0 || dest == uintptr(Z_NULL) {
  5387  		return -2
  5388  	}
  5389  
  5390  	ss = (*Z_stream)(unsafe.Pointer(source)).Fstate
  5391  
  5392  	libc.Xmemcpy(tls, dest, source, uint32(unsafe.Sizeof(Z_stream{})))
  5393  
  5394  	ds = (*struct {
  5395  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  5396  	})(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{})))
  5397  	if ds == uintptr(Z_NULL) {
  5398  		return -4
  5399  	}
  5400  	(*Z_stream)(unsafe.Pointer(dest)).Fstate = ds
  5401  	libc.Xmemcpy(tls, ds, ss, uint32(unsafe.Sizeof(Deflate_state{})))
  5402  	(*Deflate_state)(unsafe.Pointer(ds)).Fstrm = dest
  5403  
  5404  	(*Deflate_state)(unsafe.Pointer(ds)).Fwindow = (*struct {
  5405  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  5406  	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fw_size, uint32(2)*uint32(unsafe.Sizeof(Byte(0))))
  5407  	(*Deflate_state)(unsafe.Pointer(ds)).Fprev = (*struct {
  5408  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  5409  	})(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))))
  5410  	(*Deflate_state)(unsafe.Pointer(ds)).Fhead = (*struct {
  5411  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  5412  	})(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))))
  5413  	overlay = (*struct {
  5414  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  5415  	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(dest)).Fzalloc})).f(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize, uint32(unsafe.Sizeof(Ush(0)))+uint32(2))
  5416  	(*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf = overlay
  5417  
  5418  	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) {
  5419  		XdeflateEnd(tls, dest)
  5420  		return -4
  5421  	}
  5422  	// following zmemcpy do not work for 16-bit MSDOS
  5423  	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fwindow, (*Deflate_state)(unsafe.Pointer(ss)).Fwindow, (*Deflate_state)(unsafe.Pointer(ds)).Fw_size*UInt(2)*UInt(unsafe.Sizeof(Byte(0))))
  5424  	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fprev, (*Deflate_state)(unsafe.Pointer(ss)).Fprev, (*Deflate_state)(unsafe.Pointer(ds)).Fw_size*UInt(unsafe.Sizeof(Pos(0))))
  5425  	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fhead, (*Deflate_state)(unsafe.Pointer(ss)).Fhead, (*Deflate_state)(unsafe.Pointer(ds)).Fhash_size*UInt(unsafe.Sizeof(Pos(0))))
  5426  	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf, (*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf, UInt((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf_size))
  5427  
  5428  	(*Deflate_state)(unsafe.Pointer(ds)).Fpending_out = (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr((int32((*Deflate_state)(unsafe.Pointer(ss)).Fpending_out)-int32((*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf))/1)
  5429  	(*Deflate_state)(unsafe.Pointer(ds)).Fd_buf = overlay + uintptr((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize/UInt(unsafe.Sizeof(Ush(0))))*2
  5430  	(*Deflate_state)(unsafe.Pointer(ds)).Fl_buf = (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr((uint32(1)+uint32(unsafe.Sizeof(Ush(0))))*(*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize)
  5431  
  5432  	(*Deflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 148   /* &.dyn_ltree */
  5433  	(*Deflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2440  /* &.dyn_dtree */
  5434  	(*Deflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2684 /* &.bl_tree */
  5435  
  5436  	return Z_OK
  5437  }
  5438  
  5439  // ===========================================================================
  5440  // Read a new buffer from the current input stream, update the adler32
  5441  // and total number of bytes read.  All deflate() input goes through
  5442  // this function so some applications may wish to modify it to avoid
  5443  // allocating a large strm->next_in buffer and copying from it.
  5444  // (See also flush_pending()).
  5445  func read_buf(tls *libc.TLS, strm Z_streamp, buf uintptr, size uint32) uint32 { /* deflate.c:1164:16: */
  5446  	var len uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  5447  
  5448  	if len > size {
  5449  		len = size
  5450  	}
  5451  	if len == uint32(0) {
  5452  		return uint32(0)
  5453  	}
  5454  
  5455  	*(*UInt)(unsafe.Pointer(strm + 4)) -= len
  5456  
  5457  	libc.Xmemcpy(tls, buf, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, len)
  5458  	if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 1 {
  5459  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len)
  5460  	} else if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 2 {
  5461  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len)
  5462  	}
  5463  	*(*uintptr)(unsafe.Pointer(strm)) += uintptr(len)
  5464  	*(*ULong)(unsafe.Pointer(strm + 8)) += ULong(len)
  5465  
  5466  	return len
  5467  }
  5468  
  5469  // ===========================================================================
  5470  // Initialize the "longest match" routines for a new zlib stream
  5471  func lm_init(tls *libc.TLS, s uintptr) { /* deflate.c:1194:12: */
  5472  	(*Deflate_state)(unsafe.Pointer(s)).Fwindow_size = Ulg(2) * Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)
  5473  
  5474  	*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
  5475  	libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint32(unsafe.Sizeof(Posf(0))))
  5476  
  5477  	// Set the default configuration parameters:
  5478  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy)
  5479  	(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length)
  5480  	(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length)
  5481  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain)
  5482  
  5483  	(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
  5484  	(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
  5485  	(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0)
  5486  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  5487  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+120, UInt(MIN_MATCH-1))
  5488  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  5489  	(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(0)
  5490  }
  5491  
  5492  // ===========================================================================
  5493  // Set match_start to the longest match starting at the given string and
  5494  // return its length. Matches shorter or equal to prev_length are discarded,
  5495  // in which case the result is equal to prev_length and match_start is
  5496  // garbage.
  5497  // IN assertions: cur_match is the head of the hash chain for the current
  5498  //   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
  5499  // OUT assertion: the match length is not greater than s->lookahead.
  5500  // For 80x86 and 680x0, an optimized version will be provided in match.asm or
  5501  // match.S. The code will be functionally equivalent.
  5502  func longest_match(tls *libc.TLS, s uintptr, cur_match IPos) UInt { /* deflate.c:1236:12: */
  5503  	var chain_length uint32 = (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length                                         // max hash chain length
  5504  	var scan uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) // current string
  5505  	var match uintptr                                                                                                       // matched string
  5506  	var len int32                                                                                                           // length of current match
  5507  	var best_len int32 = int32((*Deflate_state)(unsafe.Pointer(s)).Fprev_length)                                            // best match length so far
  5508  	var nice_match int32 = (*Deflate_state)(unsafe.Pointer(s)).Fnice_match                                                  // stop if match long enough
  5509  	var limit IPos
  5510  	if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > (*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1) {
  5511  		limit = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(MAX_MATCH+MIN_MATCH+1))
  5512  	} else {
  5513  		limit = uint32(NIL)
  5514  	}
  5515  	// Stop when cur_match becomes <= limit. To simplify the code,
  5516  	// we prevent matches with the string of window index 0.
  5517  	var prev uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fprev
  5518  	var wmask UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_mask
  5519  
  5520  	var strend uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(MAX_MATCH)
  5521  	var scan_end1 Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len-1)))
  5522  	var scan_end Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len)))
  5523  
  5524  	// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
  5525  	// It is easy to get rid of this optimization if necessary.
  5526  
  5527  	// Do not waste too much time if we already have a good match:
  5528  	if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Deflate_state)(unsafe.Pointer(s)).Fgood_match {
  5529  		chain_length >>= 2
  5530  	}
  5531  	// Do not look for matches beyond the end of the input. This is necessary
  5532  	// to make deflate deterministic.
  5533  	if UInt(nice_match) > (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
  5534  		nice_match = int32((*Deflate_state)(unsafe.Pointer(s)).Flookahead)
  5535  	}
  5536  
  5537  	for __ccgo := true; __ccgo; __ccgo = libc.AssignUint32(&cur_match, IPos(*(*Posf)(unsafe.Pointer(prev + uintptr(cur_match&wmask)*2)))) > limit &&
  5538  		libc.PreDecUint32(&chain_length, 1) != uint32(0) {
  5539  
  5540  		match = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(cur_match)
  5541  
  5542  		// Skip to next match if the match length cannot increase
  5543  		// or if the match length is less than 2.  Note that the checks below
  5544  		// for insufficient lookahead only occur occasionally for performance
  5545  		// reasons.  Therefore uninitialized memory will be accessed, and
  5546  		// conditional jumps will be made that depend on those values.
  5547  		// However the length of the match is limited to the lookahead, so
  5548  		// the output of deflate is not affected by the uninitialized values.
  5549  
  5550  		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))) {
  5551  			continue
  5552  		}
  5553  
  5554  		// The check at best_len-1 can be removed because it will be made
  5555  		// again later. (This heuristic is not always a win.)
  5556  		// It is not necessary to compare scan[2] and match[2] since they
  5557  		// are always equal when the other bytes match, given that
  5558  		// the hash keys are equal and that HASH_BITS >= 8.
  5559  		scan += uintptr(2)
  5560  		match++
  5561  
  5562  		// We check for insufficient lookahead only every 8th comparison;
  5563  		// the 256th check will be made at strstart+258.
  5564  		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 {
  5565  		}
  5566  
  5567  		len = MAX_MATCH - (int32(strend)-int32(scan))/1
  5568  		scan = strend - uintptr(MAX_MATCH)
  5569  
  5570  		if len > best_len {
  5571  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match
  5572  			best_len = len
  5573  			if len >= nice_match {
  5574  				break
  5575  			}
  5576  			scan_end1 = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len-1)))
  5577  			scan_end = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len)))
  5578  		}
  5579  	}
  5580  
  5581  	if UInt(best_len) <= (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
  5582  		return UInt(best_len)
  5583  	}
  5584  	return (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  5585  }
  5586  
  5587  // ===========================================================================
  5588  // Fill the window when the lookahead becomes insufficient.
  5589  // Updates strstart and lookahead.
  5590  //
  5591  // IN assertion: lookahead < MIN_LOOKAHEAD
  5592  // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
  5593  //    At least one byte has been read, or avail_in == 0; reads are
  5594  //    performed for at least two bytes (required for the zip translate_eol
  5595  //    option -- not supported here).
  5596  func fill_window(tls *libc.TLS, s uintptr) { /* deflate.c:1482:12: */
  5597  	var n uint32
  5598  	var more uint32 // Amount of free space at the end of the window.
  5599  	var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5600  
  5601  	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) {
  5602  		more = uint32((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead) - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))
  5603  
  5604  		// Deal with !@#$% 64K limit:
  5605  		if uint32(unsafe.Sizeof(int32(0))) <= uint32(2) {
  5606  			if more == uint32(0) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart == UInt(0) && (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  5607  				more = wsize
  5608  
  5609  			} else if more == libc.Uint32(libc.Uint32FromInt32(-1)) {
  5610  				// Very unlikely, but possible on 16 bit machine if
  5611  				// strstart == 0 && lookahead == 1 (input done a byte at time)
  5612  				more--
  5613  			}
  5614  		}
  5615  
  5616  		// If the window is almost full and there is insufficient lookahead,
  5617  		// move the upper half to the lower one to make room in the upper half.
  5618  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart >= wsize+((*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1)) {
  5619  
  5620  			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(wsize), wsize-more)
  5621  			*(*UInt)(unsafe.Pointer(s + 112)) -= wsize
  5622  			*(*UInt)(unsafe.Pointer(s + 108)) -= wsize // we now have strstart >= MAX_DIST
  5623  			*(*int32)(unsafe.Pointer(s + 92)) -= int32(wsize)
  5624  			slide_hash(tls, s)
  5625  			more = more + wsize
  5626  		}
  5627  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) {
  5628  			break
  5629  		}
  5630  
  5631  		// If there was no sliding:
  5632  		//    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
  5633  		//    more == window_size - lookahead - strstart
  5634  		// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
  5635  		// => more >= window_size - 2*WSIZE + 2
  5636  		// In the BIG_MEM or MMAP case (not yet supported),
  5637  		//   window_size == input_size + MIN_LOOKAHEAD  &&
  5638  		//   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
  5639  		// Otherwise, window_size == 2*WSIZE so more >= 2.
  5640  		// If there was sliding, more >= WSIZE. So in all cases, more >= 2.
  5641  
  5642  		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)
  5643  		*(*UInt)(unsafe.Pointer(s + 116)) += n
  5644  
  5645  		// Initialize the hash value now that we have some input:
  5646  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead+(*Deflate_state)(unsafe.Pointer(s)).Finsert >= UInt(MIN_MATCH) {
  5647  			var str UInt = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Finsert
  5648  			(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str))))
  5649  			(*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
  5650  			for (*Deflate_state)(unsafe.Pointer(s)).Finsert != 0 {
  5651  				(*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
  5652  				*(*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))
  5653  				*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str)
  5654  				str++
  5655  				(*Deflate_state)(unsafe.Pointer(s)).Finsert--
  5656  				if (*Deflate_state)(unsafe.Pointer(s)).Flookahead+(*Deflate_state)(unsafe.Pointer(s)).Finsert < UInt(MIN_MATCH) {
  5657  					break
  5658  				}
  5659  			}
  5660  		}
  5661  		// If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
  5662  		// but this is not important since only literal bytes will be emitted.
  5663  
  5664  	}
  5665  
  5666  	// If the WIN_INIT bytes after the end of the current data have never been
  5667  	// written, then zero those bytes in order to avoid memory check reports of
  5668  	// the use of uninitialized (or uninitialised as Julian writes) bytes by
  5669  	// the longest match routines.  Update the high water mark for the next
  5670  	// time through here.  WIN_INIT is set to MAX_MATCH since the longest match
  5671  	// routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
  5672  	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size {
  5673  		var curr Ulg = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead)
  5674  		var init1 Ulg
  5675  
  5676  		if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr {
  5677  			// Previous high water mark below current data -- zero WIN_INIT
  5678  			// bytes or up to end of window, whichever is less.
  5679  			init1 = (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - curr
  5680  			if init1 > Ulg(MAX_MATCH) {
  5681  				init1 = Ulg(MAX_MATCH)
  5682  			}
  5683  			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(curr), 0, uint32(init1))
  5684  			(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = curr + init1
  5685  		} else if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr+Ulg(MAX_MATCH) {
  5686  			// High water mark at or above current data, but below current data
  5687  			// plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
  5688  			// to end of window, whichever is less.
  5689  			init1 = curr + Ulg(MAX_MATCH) - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water
  5690  			if init1 > (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size-(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water {
  5691  				init1 = (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water
  5692  			}
  5693  			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water), 0, uint32(init1))
  5694  			*(*Ulg)(unsafe.Pointer(s + 5824)) += init1
  5695  		}
  5696  	}
  5697  
  5698  }
  5699  
  5700  // ===========================================================================
  5701  // Flush the current block, with given end-of-file flag.
  5702  // IN assertion: strstart is set to the end of the current match.
  5703  
  5704  // Same but force premature exit if necessary.
  5705  
  5706  // Maximum stored block length in deflate format (not including header).
  5707  
  5708  // Minimum of a and b.
  5709  
  5710  // ===========================================================================
  5711  // Copy without compression as much as possible from the input stream, return
  5712  // the current block state.
  5713  //
  5714  // In case deflateParams() is used to later switch to a non-zero compression
  5715  // level, s->matches (otherwise unused when storing) keeps track of the number
  5716  // of hash table slides to perform. If s->matches is 1, then one hash table
  5717  // slide will be done when switching. If s->matches is 2, the maximum value
  5718  // allowed here, then the hash table will be cleared, since two or more slides
  5719  // is the same as a clear.
  5720  //
  5721  // deflate_stored() is written to minimize the number of times an input byte is
  5722  // copied. It is most efficient with large input and output buffers, which
  5723  // maximizes the opportunites to have a single copy from next_in to next_out.
  5724  func deflate_stored(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1643:19: */
  5725  	// Smallest worthy block size when not flushing or finishing. By default
  5726  	// this is 32K. This can be as small as 507 bytes for memLevel == 1. For
  5727  	// large input and output buffers, the stored block size will be larger.
  5728  	var min_block uint32 = func() uint32 {
  5729  		if (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size-Ulg(5) > Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size) {
  5730  			return (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5731  		}
  5732  		return uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(5))
  5733  	}()
  5734  
  5735  	// Copy as many min_block or larger stored blocks directly to next_out as
  5736  	// possible. If flushing, copy the remaining available input to next_out as
  5737  	// stored blocks, if there is enough space.
  5738  	var len uint32
  5739  	var left uint32
  5740  	var have uint32
  5741  	var last uint32 = uint32(0)
  5742  	var used uint32 = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
  5743  	for __ccgo := true; __ccgo; __ccgo = last == uint32(0) {
  5744  		// Set len to the maximum size block that we can copy directly with the
  5745  		// available input data and output space. Set left to how much of that
  5746  		// would be copied from what's left in the window.
  5747  		len = uint32(MAX_STORED)                                                                      // maximum deflate stored block length
  5748  		have = uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)                      // number of header bytes
  5749  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { // need room for header
  5750  			break
  5751  		}
  5752  		// maximum stored block length that will fit in avail_out:
  5753  		have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have
  5754  		left = uint32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) // bytes left in window
  5755  		if Ulg(len) > Ulg(left)+Ulg((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) {
  5756  			len = left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
  5757  		} // limit len to the input
  5758  		if len > have {
  5759  			len = have
  5760  		} // limit len to the output
  5761  
  5762  		// If the stored block would be less than min_block in length, or if
  5763  		// unable to copy all of the available input when flushing, then try
  5764  		// copying to the window and the pending buffer instead. Also don't
  5765  		// write an empty block when flushing -- deflate() does that.
  5766  		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) {
  5767  			break
  5768  		}
  5769  
  5770  		// Make a dummy stored block in pending to get the header bytes,
  5771  		// including any pending bits. This also updates the debugging counts.
  5772  		if flush == Z_FINISH && len == left+(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in {
  5773  			last = uint32(1)
  5774  		} else {
  5775  			last = uint32(0)
  5776  		}
  5777  		X_tr_stored_block(tls, s, uintptr(0), uint32(0), int32(last))
  5778  
  5779  		// Replace the lengths in the dummy stored block with len.
  5780  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(4)))) = Bytef(len)
  5781  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(3)))) = Bytef(len >> 8)
  5782  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(2)))) = Bytef(^len)
  5783  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(1)))) = Bytef(^len >> 8)
  5784  
  5785  		// Write the stored block header bytes.
  5786  		flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  5787  
  5788  		// Copy uncompressed bytes from the window to next_out.
  5789  		if left != 0 {
  5790  			if left > len {
  5791  				left = len
  5792  			}
  5793  			libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start), left)
  5794  			*(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 12)) += uintptr(left)
  5795  			*(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 16)) -= left
  5796  			*(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 20)) += ULong(left)
  5797  			*(*int32)(unsafe.Pointer(s + 92)) += int32(uint32(left))
  5798  			len = len - left
  5799  		}
  5800  
  5801  		// Copy uncompressed bytes directly from next_in to next_out, updating
  5802  		// the check value.
  5803  		if len != 0 {
  5804  			read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len)
  5805  			*(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 12)) += uintptr(len)
  5806  			*(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 16)) -= len
  5807  			*(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 20)) += ULong(len)
  5808  		}
  5809  	}
  5810  
  5811  	// Update the sliding window with the last s->w_size bytes of the copied
  5812  	// data, or append all of the copied data to the existing window if less
  5813  	// than s->w_size bytes were copied. Also update the number of bytes to
  5814  	// insert in the hash tables, in the event that deflateParams() switches to
  5815  	// a non-zero compression level.
  5816  	used = used - (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in // number of input bytes directly copied
  5817  	if used != 0 {
  5818  		// If any input was used, then no unused input remains in the window,
  5819  		// therefore s->block_start == s->strstart.
  5820  		if used >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { // supplant the previous history
  5821  			(*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(2) // clear hash
  5822  			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in-uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size), (*Deflate_state)(unsafe.Pointer(s)).Fw_size)
  5823  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5824  		} else {
  5825  			if (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size-Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) <= Ulg(used) {
  5826  				// Slide the window down.
  5827  				*(*UInt)(unsafe.Pointer(s + 108)) -= (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5828  				libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size), (*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  5829  				if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) {
  5830  					(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
  5831  				} // add a pending slide_hash()
  5832  			}
  5833  			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart), (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in-uintptr(used), used)
  5834  			*(*UInt)(unsafe.Pointer(s + 108)) += used
  5835  		}
  5836  		(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  5837  		*(*UInt)(unsafe.Pointer(s + 5812)) += func() uint32 {
  5838  			if used > (*Deflate_state)(unsafe.Pointer(s)).Fw_size-(*Deflate_state)(unsafe.Pointer(s)).Finsert {
  5839  				return (*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert
  5840  			}
  5841  			return used
  5842  		}()
  5843  	}
  5844  	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) {
  5845  		(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  5846  	}
  5847  
  5848  	// If the last block was written to next_out, then done.
  5849  	if last != 0 {
  5850  		return Finish_done
  5851  	}
  5852  
  5853  	// If flushing and all input has been consumed, then done.
  5854  	if flush != Z_NO_FLUSH && flush != Z_FINISH && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) && int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) == (*Deflate_state)(unsafe.Pointer(s)).Fblock_start {
  5855  		return Block_done
  5856  	}
  5857  
  5858  	// Fill the window with any remaining input.
  5859  	have = uint32((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - Ulg(1))
  5860  	if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in > have && (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= int32((*Deflate_state)(unsafe.Pointer(s)).Fw_size) {
  5861  		// Slide the window down.
  5862  		*(*int32)(unsafe.Pointer(s + 92)) -= int32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fw_size))
  5863  		*(*UInt)(unsafe.Pointer(s + 108)) -= (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5864  		libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size), (*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  5865  		if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) {
  5866  			(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
  5867  		} // add a pending slide_hash()
  5868  		have = have + (*Deflate_state)(unsafe.Pointer(s)).Fw_size // more space now
  5869  	}
  5870  	if have > (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in {
  5871  		have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
  5872  	}
  5873  	if have != 0 {
  5874  		read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart), have)
  5875  		*(*UInt)(unsafe.Pointer(s + 108)) += have
  5876  	}
  5877  	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) {
  5878  		(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  5879  	}
  5880  
  5881  	// There was not enough avail_out to write a complete worthy or flushed
  5882  	// stored block to next_out. Write a stored block to pending instead, if we
  5883  	// have enough input for a worthy block, or if flushing and there is enough
  5884  	// room for the remaining input as a stored block in the pending buffer.
  5885  	have = uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3) // number of header bytes
  5886  	// maximum stored block length that will fit in pending:
  5887  	have = func() uint32 {
  5888  		if (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size-Ulg(have) > Ulg(MAX_STORED) {
  5889  			return uint32(MAX_STORED)
  5890  		}
  5891  		return uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have))
  5892  	}()
  5893  	min_block = func() uint32 {
  5894  		if have > (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
  5895  			return (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5896  		}
  5897  		return have
  5898  	}()
  5899  	left = uint32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  5900  	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 {
  5901  		len = func() uint32 {
  5902  			if left > have {
  5903  				return have
  5904  			}
  5905  			return left
  5906  		}()
  5907  		if flush == Z_FINISH && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) && len == left {
  5908  			last = uint32(1)
  5909  		} else {
  5910  			last = uint32(0)
  5911  		}
  5912  		X_tr_stored_block(tls, s, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start), uint32(len), int32(last))
  5913  		*(*int32)(unsafe.Pointer(s + 92)) += int32(uint32(len))
  5914  		flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  5915  	}
  5916  
  5917  	// We've done all we can with the available input and output.
  5918  	if last != 0 {
  5919  		return Finish_started
  5920  	}
  5921  	return Need_more
  5922  }
  5923  
  5924  // ===========================================================================
  5925  // Compress as much as possible from the input stream, return the current
  5926  // block state.
  5927  // This function does not perform lazy evaluation of matches and inserts
  5928  // new strings in the dictionary only for unmatched strings or for short
  5929  // matches. It is used only for the fast compression options.
  5930  func deflate_fast(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1824:19: */
  5931  	var hash_head IPos // head of the hash chain
  5932  	var bflush int32   // set if current block must be flushed
  5933  
  5934  	for {
  5935  		// Make sure that we always have enough lookahead, except
  5936  		// at the end of the input file. We need MAX_MATCH bytes
  5937  		// for the next match, plus MIN_MATCH bytes to insert the
  5938  		// string following the next match.
  5939  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) {
  5940  			fill_window(tls, s)
  5941  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && flush == Z_NO_FLUSH {
  5942  				return Need_more
  5943  			}
  5944  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  5945  				break
  5946  			} // flush the current block
  5947  		}
  5948  
  5949  		// Insert the string window[strstart .. strstart+2] in the
  5950  		// dictionary, and set hash_head to the head of the hash chain:
  5951  		hash_head = IPos(NIL)
  5952  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
  5953  			(*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
  5954  			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))))
  5955  			*(*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)
  5956  		}
  5957  
  5958  		// Find the longest match, discarding those <= prev_length.
  5959  		// At this point we have always match_length < MIN_MATCH
  5960  		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) {
  5961  			// To simplify the code, we prevent matches with the string
  5962  			// of window index 0 (in particular we have to avoid a match
  5963  			// of the string with itself at the start of the input file).
  5964  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head)
  5965  			// longest_match() sets match_start
  5966  		}
  5967  		if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) {
  5968  
  5969  			{
  5970  				var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))
  5971  				var dist Ush = Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start)
  5972  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
  5973  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
  5974  				dist--
  5975  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++
  5976  				*(*Ush)(unsafe.Pointer(s + 2440 + uintptr(func() int32 {
  5977  					if int32(dist) < 256 {
  5978  						return int32(X_dist_code[dist])
  5979  					}
  5980  					return int32(X_dist_code[256+int32(dist)>>7])
  5981  				}())*4))++
  5982  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  5983  			}
  5984  
  5985  			*(*UInt)(unsafe.Pointer(s + 116)) -= (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  5986  
  5987  			// Insert new strings in the hash table only if the match length
  5988  			// is not too large. This saves time but degrades compression.
  5989  			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) {
  5990  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length-- // string at strstart already in table
  5991  				for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length, 1) != UInt(0) {
  5992  					(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  5993  					(*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
  5994  					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))))
  5995  					*(*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)
  5996  					// strstart never exceeds WSIZE-MAX_MATCH, so there are
  5997  					// always MIN_MATCH bytes ahead.
  5998  				}
  5999  				(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6000  			} else {
  6001  				*(*UInt)(unsafe.Pointer(s + 108)) += (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  6002  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  6003  				(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))))
  6004  				(*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
  6005  				// If lookahead < MIN_MATCH, ins_h is garbage, but it does not
  6006  				// matter since it will be recomputed at next deflate call.
  6007  			}
  6008  		} else {
  6009  			// No match, output a literal byte
  6010  
  6011  			{
  6012  				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
  6013  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  6014  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  6015  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(cc)*4))++
  6016  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6017  			}
  6018  
  6019  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  6020  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6021  		}
  6022  		if bflush != 0 {
  6023  			{
  6024  				X_tr_flush_block(tls, s, func() uintptr {
  6025  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6026  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6027  					}
  6028  					return uintptr(Z_NULL)
  6029  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6030  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6031  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6032  			}
  6033  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6034  				if 0 != 0 {
  6035  					return Finish_started
  6036  				}
  6037  				return Need_more
  6038  			}
  6039  		}
  6040  
  6041  	}
  6042  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 {
  6043  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < UInt(MIN_MATCH-1) {
  6044  			return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
  6045  		}
  6046  		return uint32(MIN_MATCH - 1)
  6047  	}()
  6048  	if flush == Z_FINISH {
  6049  		{
  6050  			{
  6051  				X_tr_flush_block(tls, s, func() uintptr {
  6052  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6053  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6054  					}
  6055  					return uintptr(Z_NULL)
  6056  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
  6057  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6058  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6059  			}
  6060  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6061  				if 1 != 0 {
  6062  					return Finish_started
  6063  				}
  6064  				return Need_more
  6065  			}
  6066  		}
  6067  
  6068  		return Finish_done
  6069  	}
  6070  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  6071  		{
  6072  			X_tr_flush_block(tls, s, func() uintptr {
  6073  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6074  					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6075  				}
  6076  				return uintptr(Z_NULL)
  6077  			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6078  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6079  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6080  		}
  6081  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6082  			if 0 != 0 {
  6083  				return Finish_started
  6084  			}
  6085  			return Need_more
  6086  		}
  6087  	}
  6088  
  6089  	return Block_done
  6090  }
  6091  
  6092  // ===========================================================================
  6093  // Same as above, but achieves better compression. We use a lazy
  6094  // evaluation for matches: a match is finally adopted only if there is
  6095  // no better match at the next window position.
  6096  func deflate_slow(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1926:19: */
  6097  	var hash_head IPos // head of hash chain
  6098  	var bflush int32   // set if current block must be flushed
  6099  
  6100  	// Process the input block.
  6101  	for {
  6102  		// Make sure that we always have enough lookahead, except
  6103  		// at the end of the input file. We need MAX_MATCH bytes
  6104  		// for the next match, plus MIN_MATCH bytes to insert the
  6105  		// string following the next match.
  6106  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) {
  6107  			fill_window(tls, s)
  6108  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && flush == Z_NO_FLUSH {
  6109  				return Need_more
  6110  			}
  6111  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  6112  				break
  6113  			} // flush the current block
  6114  		}
  6115  
  6116  		// Insert the string window[strstart .. strstart+2] in the
  6117  		// dictionary, and set hash_head to the head of the hash chain:
  6118  		hash_head = IPos(NIL)
  6119  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
  6120  			(*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
  6121  			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))))
  6122  			*(*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)
  6123  		}
  6124  
  6125  		// Find the longest match, discarding those <= prev_length.
  6126  		(*Deflate_state)(unsafe.Pointer(s)).Fprev_length = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  6127  		(*Deflate_state)(unsafe.Pointer(s)).Fprev_match = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start
  6128  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1)
  6129  
  6130  		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) {
  6131  			// To simplify the code, we prevent matches with the string
  6132  			// of window index 0 (in particular we have to avoid a match
  6133  			// of the string with itself at the start of the input file).
  6134  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head)
  6135  			// longest_match() sets match_start
  6136  
  6137  			if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= UInt(5) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FILTERED ||
  6138  				(*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)) {
  6139  
  6140  				// If prev_match is also MIN_MATCH, match_start is garbage
  6141  				// but we will ignore the current match anyway.
  6142  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1)
  6143  			}
  6144  		}
  6145  		// If there was a match at the previous step and the current
  6146  		// match is not better, output the previous match:
  6147  		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 {
  6148  			var max_insert UInt = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead - UInt(MIN_MATCH)
  6149  			// Do not insert strings in hash table beyond this.
  6150  
  6151  			{
  6152  				var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(MIN_MATCH))
  6153  				var dist Ush = Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1) - (*Deflate_state)(unsafe.Pointer(s)).Fprev_match)
  6154  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
  6155  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
  6156  				dist--
  6157  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++
  6158  				*(*Ush)(unsafe.Pointer(s + 2440 + uintptr(func() int32 {
  6159  					if int32(dist) < 256 {
  6160  						return int32(X_dist_code[dist])
  6161  					}
  6162  					return int32(X_dist_code[256+int32(dist)>>7])
  6163  				}())*4))++
  6164  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6165  			}
  6166  
  6167  			// Insert in hash table all strings up to the end of the match.
  6168  			// strstart-1 and strstart are already inserted. If there is not
  6169  			// enough lookahead, the last two strings are not inserted in
  6170  			// the hash table.
  6171  			*(*UInt)(unsafe.Pointer(s + 116)) -= (*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(1)
  6172  			*(*UInt)(unsafe.Pointer(s + 120)) -= UInt(2)
  6173  			for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fprev_length, 1) != UInt(0) {
  6174  				if libc.PreIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fstrstart, 1) <= max_insert {
  6175  					(*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
  6176  					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))))
  6177  					*(*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)
  6178  				}
  6179  			}
  6180  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  6181  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1)
  6182  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6183  
  6184  			if bflush != 0 {
  6185  				{
  6186  					X_tr_flush_block(tls, s, func() uintptr {
  6187  						if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6188  							return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6189  						}
  6190  						return uintptr(Z_NULL)
  6191  					}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6192  					(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6193  					flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6194  				}
  6195  				if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6196  					if 0 != 0 {
  6197  						return Finish_started
  6198  					}
  6199  					return Need_more
  6200  				}
  6201  			}
  6202  
  6203  		} else if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 {
  6204  			// If there was no match at the previous position, output a
  6205  			// single literal. If there was a match but the current match
  6206  			// is longer, truncate the previous match to a single literal.
  6207  
  6208  			{
  6209  				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart-UInt(1))))
  6210  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  6211  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  6212  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(cc)*4))++
  6213  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6214  			}
  6215  
  6216  			if bflush != 0 {
  6217  				{
  6218  					X_tr_flush_block(tls, s, func() uintptr {
  6219  						if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6220  							return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6221  						}
  6222  						return uintptr(Z_NULL)
  6223  					}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6224  					(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6225  					flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6226  				}
  6227  
  6228  			}
  6229  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6230  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  6231  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6232  				return Need_more
  6233  			}
  6234  		} else {
  6235  			// There is no previous match to compare with, wait for
  6236  			// the next step to decide.
  6237  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 1
  6238  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6239  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  6240  		}
  6241  	}
  6242  
  6243  	if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 {
  6244  
  6245  		{
  6246  			var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart-UInt(1))))
  6247  			*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  6248  			*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  6249  			*(*Ush)(unsafe.Pointer(s + 148 + uintptr(cc)*4))++
  6250  			bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6251  		}
  6252  
  6253  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  6254  	}
  6255  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 {
  6256  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < UInt(MIN_MATCH-1) {
  6257  			return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
  6258  		}
  6259  		return uint32(MIN_MATCH - 1)
  6260  	}()
  6261  	if flush == Z_FINISH {
  6262  		{
  6263  			{
  6264  				X_tr_flush_block(tls, s, func() uintptr {
  6265  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6266  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6267  					}
  6268  					return uintptr(Z_NULL)
  6269  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
  6270  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6271  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6272  			}
  6273  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6274  				if 1 != 0 {
  6275  					return Finish_started
  6276  				}
  6277  				return Need_more
  6278  			}
  6279  		}
  6280  
  6281  		return Finish_done
  6282  	}
  6283  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  6284  		{
  6285  			X_tr_flush_block(tls, s, func() uintptr {
  6286  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6287  					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6288  				}
  6289  				return uintptr(Z_NULL)
  6290  			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6291  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6292  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6293  		}
  6294  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6295  			if 0 != 0 {
  6296  				return Finish_started
  6297  			}
  6298  			return Need_more
  6299  		}
  6300  	}
  6301  
  6302  	return Block_done
  6303  }
  6304  
  6305  // ===========================================================================
  6306  // For Z_RLE, simply look for runs of bytes, generate matches only of distance
  6307  // one.  Do not maintain a hash table.  (It will be regenerated if this run of
  6308  // deflate switches away from Z_RLE.)
  6309  func deflate_rle(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2057:19: */
  6310  	var bflush int32 // set if current block must be flushed
  6311  	var prev UInt    // byte at distance one to match
  6312  	var scan uintptr
  6313  	var strend uintptr // scan goes up to strend for length of run
  6314  
  6315  	for {
  6316  		// Make sure that we always have enough lookahead, except
  6317  		// at the end of the input file. We need MAX_MATCH bytes
  6318  		// for the longest run, plus one for the unrolled loop.
  6319  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) {
  6320  			fill_window(tls, s)
  6321  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) && flush == Z_NO_FLUSH {
  6322  				return Need_more
  6323  			}
  6324  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  6325  				break
  6326  			} // flush the current block
  6327  		}
  6328  
  6329  		// See how many times the previous byte repeats
  6330  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  6331  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > UInt(0) {
  6332  			scan = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uintptr(1)
  6333  			prev = UInt(*(*Bytef)(unsafe.Pointer(scan)))
  6334  			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)))) {
  6335  				strend = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(MAX_MATCH)
  6336  				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 {
  6337  				}
  6338  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MAX_MATCH) - UInt((int32(strend)-int32(scan))/1)
  6339  				if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
  6340  					(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  6341  				}
  6342  			}
  6343  
  6344  		}
  6345  
  6346  		// Emit match if have run of MIN_MATCH or longer, else emit literal
  6347  		if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) {
  6348  
  6349  			{
  6350  				var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))
  6351  				var dist Ush = Ush(1)
  6352  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
  6353  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
  6354  				dist--
  6355  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++
  6356  				*(*Ush)(unsafe.Pointer(s + 2440 + uintptr(func() int32 {
  6357  					if int32(dist) < 256 {
  6358  						return int32(X_dist_code[dist])
  6359  					}
  6360  					return int32(X_dist_code[256+int32(dist)>>7])
  6361  				}())*4))++
  6362  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6363  			}
  6364  
  6365  			*(*UInt)(unsafe.Pointer(s + 116)) -= (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  6366  			*(*UInt)(unsafe.Pointer(s + 108)) += (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  6367  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  6368  		} else {
  6369  			// No match, output a literal byte
  6370  
  6371  			{
  6372  				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
  6373  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  6374  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  6375  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(cc)*4))++
  6376  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6377  			}
  6378  
  6379  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  6380  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6381  		}
  6382  		if bflush != 0 {
  6383  			{
  6384  				X_tr_flush_block(tls, s, func() uintptr {
  6385  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6386  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6387  					}
  6388  					return uintptr(Z_NULL)
  6389  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6390  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6391  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6392  			}
  6393  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6394  				if 0 != 0 {
  6395  					return Finish_started
  6396  				}
  6397  				return Need_more
  6398  			}
  6399  		}
  6400  
  6401  	}
  6402  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  6403  	if flush == Z_FINISH {
  6404  		{
  6405  			{
  6406  				X_tr_flush_block(tls, s, func() uintptr {
  6407  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6408  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6409  					}
  6410  					return uintptr(Z_NULL)
  6411  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
  6412  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6413  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6414  			}
  6415  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6416  				if 1 != 0 {
  6417  					return Finish_started
  6418  				}
  6419  				return Need_more
  6420  			}
  6421  		}
  6422  
  6423  		return Finish_done
  6424  	}
  6425  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  6426  		{
  6427  			X_tr_flush_block(tls, s, func() uintptr {
  6428  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6429  					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6430  				}
  6431  				return uintptr(Z_NULL)
  6432  			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6433  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6434  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6435  		}
  6436  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6437  			if 0 != 0 {
  6438  				return Finish_started
  6439  			}
  6440  			return Need_more
  6441  		}
  6442  	}
  6443  
  6444  	return Block_done
  6445  }
  6446  
  6447  // ===========================================================================
  6448  // For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.
  6449  // (It will be regenerated if this run of deflate switches away from Huffman.)
  6450  func deflate_huff(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2130:19: */
  6451  	var bflush int32 // set if current block must be flushed
  6452  
  6453  	for {
  6454  		// Make sure that we have a literal to write.
  6455  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  6456  			fill_window(tls, s)
  6457  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  6458  				if flush == Z_NO_FLUSH {
  6459  					return Need_more
  6460  				}
  6461  				break // flush the current block
  6462  			}
  6463  		}
  6464  
  6465  		// Output a literal byte
  6466  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  6467  
  6468  		{
  6469  			var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
  6470  			*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  6471  			*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  6472  			*(*Ush)(unsafe.Pointer(s + 148 + uintptr(cc)*4))++
  6473  			bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6474  		}
  6475  
  6476  		(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  6477  		(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6478  		if bflush != 0 {
  6479  			{
  6480  				X_tr_flush_block(tls, s, func() uintptr {
  6481  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6482  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6483  					}
  6484  					return uintptr(Z_NULL)
  6485  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6486  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6487  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6488  			}
  6489  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6490  				if 0 != 0 {
  6491  					return Finish_started
  6492  				}
  6493  				return Need_more
  6494  			}
  6495  		}
  6496  
  6497  	}
  6498  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  6499  	if flush == Z_FINISH {
  6500  		{
  6501  			{
  6502  				X_tr_flush_block(tls, s, func() uintptr {
  6503  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6504  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6505  					}
  6506  					return uintptr(Z_NULL)
  6507  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
  6508  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6509  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6510  			}
  6511  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6512  				if 1 != 0 {
  6513  					return Finish_started
  6514  				}
  6515  				return Need_more
  6516  			}
  6517  		}
  6518  
  6519  		return Finish_done
  6520  	}
  6521  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  6522  		{
  6523  			X_tr_flush_block(tls, s, func() uintptr {
  6524  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6525  					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6526  				}
  6527  				return uintptr(Z_NULL)
  6528  			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6529  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6530  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6531  		}
  6532  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6533  			if 0 != 0 {
  6534  				return Finish_started
  6535  			}
  6536  			return Need_more
  6537  		}
  6538  	}
  6539  
  6540  	return Block_done
  6541  }
  6542  
  6543  // compatibility w/GNU headers
  6544  
  6545  // When the following macro is defined, the system uses 64-bit inode numbers.
  6546  // Programs can use this to avoid including <sys/param.h>, with its associated
  6547  // namespace pollution.
  6548  
  6549  type Fpos_t = X__off_t /* stdio.h:47:18 */
  6550  
  6551  // NB: to fit things in six character monocase externals, the stdio
  6552  // code uses the prefix `__s' for stdio objects, typically followed
  6553  // by a three-character attempt at a mnemonic.
  6554  
  6555  // stdio buffers
  6556  type X__sbuf = struct {
  6557  	F_base uintptr
  6558  	F_size int32
  6559  } /* stdio.h:91:1 */
  6560  
  6561  // stdio state variables.
  6562  //
  6563  // The following always hold:
  6564  //
  6565  //	if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
  6566  //		_lbfsize is -_bf._size, else _lbfsize is 0
  6567  //	if _flags&__SRD, _w is 0
  6568  //	if _flags&__SWR, _r is 0
  6569  //
  6570  // This ensures that the getc and putc macros (or inline functions) never
  6571  // try to write or read from a file that is in `read' or `write' mode.
  6572  // (Moreover, they can, and do, automatically switch from read mode to
  6573  // write mode, and back, on "r+" and "w+" files.)
  6574  //
  6575  // _lbfsize is used only to make the inline line-buffered output stream
  6576  // code as compact as possible.
  6577  //
  6578  // _ub, _up, and _ur are used when ungetc() pushes back more characters
  6579  // than fit in the current _bf, or when ungetc() pushes back a character
  6580  // that does not match the previous one in _bf.  When this happens,
  6581  // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
  6582  // _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
  6583  //
  6584  // Certain members of __sFILE are accessed directly via macros or
  6585  // inline functions.  To preserve ABI compat, these members must not
  6586  // be disturbed.  These members are marked below with (*).
  6587  type X__sFILE = struct {
  6588  	F_p     uintptr
  6589  	F_r     int32
  6590  	F_w     int32
  6591  	F_flags int16
  6592  	F_file  int16
  6593  	F_bf    struct {
  6594  		F_base uintptr
  6595  		F_size int32
  6596  	}
  6597  	F_lbfsize int32
  6598  	F_cookie  uintptr
  6599  	F_close   uintptr
  6600  	F_read    uintptr
  6601  	F_seek    uintptr
  6602  	F_write   uintptr
  6603  	F_ub      struct {
  6604  		F_base uintptr
  6605  		F_size int32
  6606  	}
  6607  	F_up   uintptr
  6608  	F_ur   int32
  6609  	F_ubuf [3]uint8
  6610  	F_nbuf [1]uint8
  6611  	F_lb   struct {
  6612  		F_base uintptr
  6613  		F_size int32
  6614  	}
  6615  	F_blksize     int32
  6616  	F_offset      Fpos_t
  6617  	F_fl_mutex    uintptr
  6618  	F_fl_owner    uintptr
  6619  	F_fl_count    int32
  6620  	F_orientation int32
  6621  	F_mbstate     X__mbstate_t
  6622  	F_flags2      int32
  6623  	F__ccgo_pad1  [4]byte
  6624  } /* stdio.h:124:1 */
  6625  
  6626  type FILE = X__sFILE /* stdio.h:165:24 */
  6627  type Cookie_io_functions_t = struct {
  6628  	Fread  uintptr
  6629  	Fwrite uintptr
  6630  	Fseek  uintptr
  6631  	Fclose uintptr
  6632  } /* stdio.h:428:3 */
  6633  
  6634  // -
  6635  // SPDX-License-Identifier: BSD-3-Clause
  6636  //
  6637  // Copyright (c) 1988, 1993
  6638  //	The Regents of the University of California.  All rights reserved.
  6639  //
  6640  // Redistribution and use in source and binary forms, with or without
  6641  // modification, are permitted provided that the following conditions
  6642  // are met:
  6643  // 1. Redistributions of source code must retain the above copyright
  6644  //    notice, this list of conditions and the following disclaimer.
  6645  // 2. Redistributions in binary form must reproduce the above copyright
  6646  //    notice, this list of conditions and the following disclaimer in the
  6647  //    documentation and/or other materials provided with the distribution.
  6648  // 3. Neither the name of the University nor the names of its contributors
  6649  //    may be used to endorse or promote products derived from this software
  6650  //    without specific prior written permission.
  6651  //
  6652  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6653  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6654  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6655  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  6656  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6657  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6658  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6659  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6660  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6661  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6662  // SUCH DAMAGE.
  6663  //
  6664  //	@(#)limits.h	8.2 (Berkeley) 1/4/94
  6665  // $FreeBSD$
  6666  
  6667  // -
  6668  // SPDX-License-Identifier: BSD-3-Clause
  6669  //
  6670  // Copyright (c) 1983, 1990, 1993
  6671  //	The Regents of the University of California.  All rights reserved.
  6672  // (c) UNIX System Laboratories, Inc.
  6673  // All or some portions of this file are derived from material licensed
  6674  // to the University of California by American Telephone and Telegraph
  6675  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  6676  // the permission of UNIX System Laboratories, Inc.
  6677  //
  6678  // Redistribution and use in source and binary forms, with or without
  6679  // modification, are permitted provided that the following conditions
  6680  // are met:
  6681  // 1. Redistributions of source code must retain the above copyright
  6682  //    notice, this list of conditions and the following disclaimer.
  6683  // 2. Redistributions in binary form must reproduce the above copyright
  6684  //    notice, this list of conditions and the following disclaimer in the
  6685  //    documentation and/or other materials provided with the distribution.
  6686  // 3. Neither the name of the University nor the names of its contributors
  6687  //    may be used to endorse or promote products derived from this software
  6688  //    without specific prior written permission.
  6689  //
  6690  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6691  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6692  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6693  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  6694  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6695  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6696  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6697  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6698  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6699  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6700  // SUCH DAMAGE.
  6701  //
  6702  //	@(#)fcntl.h	8.3 (Berkeley) 1/21/94
  6703  // $FreeBSD$
  6704  
  6705  // This file includes the definitions for open and fcntl
  6706  // described by POSIX for <fcntl.h>; it also includes
  6707  // related kernel definitions.
  6708  
  6709  // -
  6710  // SPDX-License-Identifier: BSD-3-Clause
  6711  //
  6712  // Copyright (c) 1991, 1993
  6713  //	The Regents of the University of California.  All rights reserved.
  6714  //
  6715  // This code is derived from software contributed to Berkeley by
  6716  // Berkeley Software Design, Inc.
  6717  //
  6718  // Redistribution and use in source and binary forms, with or without
  6719  // modification, are permitted provided that the following conditions
  6720  // are met:
  6721  // 1. Redistributions of source code must retain the above copyright
  6722  //    notice, this list of conditions and the following disclaimer.
  6723  // 2. Redistributions in binary form must reproduce the above copyright
  6724  //    notice, this list of conditions and the following disclaimer in the
  6725  //    documentation and/or other materials provided with the distribution.
  6726  // 3. Neither the name of the University nor the names of its contributors
  6727  //    may be used to endorse or promote products derived from this software
  6728  //    without specific prior written permission.
  6729  //
  6730  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6731  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6732  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6733  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  6734  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6735  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6736  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6737  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6738  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6739  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6740  // SUCH DAMAGE.
  6741  //
  6742  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  6743  // $FreeBSD$
  6744  
  6745  // -
  6746  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  6747  //
  6748  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  6749  // All rights reserved.
  6750  //
  6751  // Redistribution and use in source and binary forms, with or without
  6752  // modification, are permitted provided that the following conditions
  6753  // are met:
  6754  // 1. Redistributions of source code must retain the above copyright
  6755  //    notice, this list of conditions and the following disclaimer.
  6756  // 2. Redistributions in binary form must reproduce the above copyright
  6757  //    notice, this list of conditions and the following disclaimer in the
  6758  //    documentation and/or other materials provided with the distribution.
  6759  //
  6760  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  6761  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6762  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6763  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  6764  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6765  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6766  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6767  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6768  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6769  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6770  // SUCH DAMAGE.
  6771  //
  6772  // $FreeBSD$
  6773  
  6774  // File status flags: these are used by open(2), fcntl(2).
  6775  // They are also used (indirectly) in the kernel file structure f_flags,
  6776  // which is a superset of the open/fcntl flags.  Open flags and f_flags
  6777  // are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
  6778  // Open/fcntl flags begin with O_; kernel-internal flags begin with F.
  6779  // open-only flags
  6780  
  6781  // Kernel encoding of open mode; separate read and write bits that are
  6782  // independently testable: 1 greater than the above.
  6783  //
  6784  // XXX
  6785  // FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
  6786  // which was documented to use FREAD/FWRITE, continues to work.
  6787  
  6788  // Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY.
  6789  
  6790  // Attempt to bypass buffer cache
  6791  
  6792  // Defined by POSIX 1003.1-2008; BSD default, but reserve for future use.
  6793  
  6794  // XXX missing O_RSYNC.
  6795  
  6796  // The O_* flags used to have only F* names, which were used in the kernel
  6797  // and by fcntl.  We retain the F* names for the kernel f_flag field
  6798  // and for backward compatibility for fcntl.  These flags are deprecated.
  6799  
  6800  // Historically, we ran out of bits in f_flag (which was once a short).
  6801  // However, the flag bits not set in FMASK are only meaningful in the
  6802  // initial open syscall.  Those bits were thus given a
  6803  // different meaning for fcntl(2).
  6804  // Read ahead
  6805  
  6806  // Magic value that specify the use of the current working directory
  6807  // to determine the target of relative file paths in the openat() and
  6808  // similar syscalls.
  6809  
  6810  // Miscellaneous flags for the *at() syscalls.
  6811  /* #define AT_UNUSED1		0x1000 */ // Was AT_BENEATH
  6812  
  6813  // Constants used for fcntl(2)
  6814  
  6815  // command values
  6816  
  6817  // Seals (F_ADD_SEALS, F_GET_SEALS).
  6818  
  6819  // file descriptor flags (F_GETFD, F_SETFD)
  6820  
  6821  // record locking flags (F_GETLK, F_SETLK, F_SETLKW)
  6822  
  6823  // Advisory file segment locking data type -
  6824  // information passed to system by user
  6825  type Flock = struct {
  6826  	Fl_start     Off_t
  6827  	Fl_len       Off_t
  6828  	Fl_pid       Pid_t
  6829  	Fl_type      int16
  6830  	Fl_whence    int16
  6831  	Fl_sysid     int32
  6832  	F__ccgo_pad1 [4]byte
  6833  } /* fcntl.h:306:1 */
  6834  
  6835  // Old advisory file segment locking data type,
  6836  // before adding l_sysid.
  6837  type X__oflock = struct {
  6838  	Fl_start  Off_t
  6839  	Fl_len    Off_t
  6840  	Fl_pid    Pid_t
  6841  	Fl_type   int16
  6842  	Fl_whence int16
  6843  } /* fcntl.h:320:1 */
  6844  
  6845  // default memLevel
  6846  
  6847  // default i/o buffer size -- double this for output when reading (this and
  6848  //    twice this must be able to fit in an unsigned type)
  6849  
  6850  // gzip modes, also provide a little integrity check on the passed structure
  6851  
  6852  // values for gz_state how
  6853  
  6854  // internal gzip file state data structure
  6855  type Gz_state = struct {
  6856  	Fx           GzFile_s
  6857  	Fmode        int32
  6858  	Ffd          int32
  6859  	Fpath        uintptr
  6860  	Fsize        uint32
  6861  	Fwant        uint32
  6862  	Fin          uintptr
  6863  	Fout         uintptr
  6864  	Fdirect      int32
  6865  	Fhow         int32
  6866  	F__ccgo_pad1 [4]byte
  6867  	Fstart       Off_t
  6868  	Feof         int32
  6869  	Fpast        int32
  6870  	Flevel       int32
  6871  	Fstrategy    int32
  6872  	Fskip        Off_t
  6873  	Fseek        int32
  6874  	Ferr         int32
  6875  	Fmsg         uintptr
  6876  	Fstrm        Z_stream
  6877  	F__ccgo_pad2 [4]byte
  6878  }                        /* gzguts.h:201:3 */
  6879  type Gz_statep = uintptr /* gzguts.h:202:22 */
  6880  
  6881  // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
  6882  //    value -- needed when comparing unsigned to z_off64_t, which is signed
  6883  //    (possible z_off64_t types off_t, off64_t, and long are all signed)
  6884  
  6885  // gzclose() is in a separate file so that it is linked in only if it is used.
  6886  //    That way the other gzclose functions can be used instead to avoid linking in
  6887  //    unneeded compression or decompression routines.
  6888  func Xgzclose(tls *libc.TLS, file GzFile) int32 { /* gzclose.c:11:13: */
  6889  	var state Gz_statep
  6890  
  6891  	if file == uintptr(0) {
  6892  		return -2
  6893  	}
  6894  	state = file
  6895  
  6896  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  6897  		return Xgzclose_r(tls, file)
  6898  	}
  6899  	return Xgzclose_w(tls, file)
  6900  }
  6901  
  6902  // Reset gzip file state
  6903  func gz_reset(tls *libc.TLS, state Gz_statep) { /* gzlib.c:75:12: */
  6904  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)  // no output data available
  6905  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // for reading ...
  6906  		(*Gz_state)(unsafe.Pointer(state)).Feof = 0    // not at end of file
  6907  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0   // have not read past end yet
  6908  		(*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK // look for gzip header
  6909  	}
  6910  	(*Gz_state)(unsafe.Pointer(state)).Fseek = 0                 // no seek request pending
  6911  	Xgz_error(tls, state, Z_OK, uintptr(0))                      // clear error
  6912  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos = int64(0)        // no uncompressed data yet
  6913  	(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) // no input data yet
  6914  }
  6915  
  6916  // Open a gzip file either by name or file descriptor.
  6917  func gz_open(tls *libc.TLS, path uintptr, fd int32, mode uintptr) GzFile { /* gzlib.c:91:14: */
  6918  	bp := tls.Alloc(16)
  6919  	defer tls.Free(16)
  6920  
  6921  	var state Gz_statep
  6922  	var len Z_size_t
  6923  	var oflag int32
  6924  	var cloexec int32 = 0
  6925  	var exclusive int32 = 0
  6926  
  6927  	// check input
  6928  	if path == uintptr(0) {
  6929  		return uintptr(0)
  6930  	}
  6931  
  6932  	// allocate gzFile structure to return
  6933  	state = libc.Xmalloc(tls, uint32(unsafe.Sizeof(Gz_state{})))
  6934  	if state == uintptr(0) {
  6935  		return uintptr(0)
  6936  	}
  6937  	(*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0)         // no buffers allocated yet
  6938  	(*Gz_state)(unsafe.Pointer(state)).Fwant = uint32(GZBUFSIZE) // requested buffer size
  6939  	(*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0)         // no error message yet
  6940  
  6941  	// interpret mode
  6942  	(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_NONE
  6943  	(*Gz_state)(unsafe.Pointer(state)).Flevel = -1
  6944  	(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_DEFAULT_STRATEGY
  6945  	(*Gz_state)(unsafe.Pointer(state)).Fdirect = 0
  6946  	for *(*uint8)(unsafe.Pointer(mode)) != 0 {
  6947  		if int32(*(*uint8)(unsafe.Pointer(mode))) >= '0' && int32(*(*uint8)(unsafe.Pointer(mode))) <= '9' {
  6948  			(*Gz_state)(unsafe.Pointer(state)).Flevel = int32(*(*uint8)(unsafe.Pointer(mode))) - '0'
  6949  		} else {
  6950  			switch int32(*(*uint8)(unsafe.Pointer(mode))) {
  6951  			case 'r':
  6952  				(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_READ
  6953  				break
  6954  				fallthrough
  6955  			case 'w':
  6956  				(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE
  6957  				break
  6958  				fallthrough
  6959  			case 'a':
  6960  				(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_APPEND
  6961  				break
  6962  				fallthrough
  6963  			case '+': // can't read and write at the same time
  6964  				libc.Xfree(tls, state)
  6965  				return uintptr(0)
  6966  				fallthrough
  6967  			case 'b': // ignore -- will request binary anyway
  6968  				break
  6969  				fallthrough
  6970  			case 'e':
  6971  				cloexec = 1
  6972  				break
  6973  				fallthrough
  6974  			case 'x':
  6975  				exclusive = 1
  6976  				break
  6977  				fallthrough
  6978  			case 'f':
  6979  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FILTERED
  6980  				break
  6981  				fallthrough
  6982  			case 'h':
  6983  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_HUFFMAN_ONLY
  6984  				break
  6985  				fallthrough
  6986  			case 'R':
  6987  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_RLE
  6988  				break
  6989  				fallthrough
  6990  			case 'F':
  6991  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FIXED
  6992  				break
  6993  				fallthrough
  6994  			case 'T':
  6995  				(*Gz_state)(unsafe.Pointer(state)).Fdirect = 1
  6996  				break
  6997  				fallthrough
  6998  			default: // could consider as an error, but just ignore
  6999  
  7000  			}
  7001  		}
  7002  		mode++
  7003  	}
  7004  
  7005  	// must provide an "r", "w", or "a"
  7006  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_NONE {
  7007  		libc.Xfree(tls, state)
  7008  		return uintptr(0)
  7009  	}
  7010  
  7011  	// can't force transparent read
  7012  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7013  		if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 {
  7014  			libc.Xfree(tls, state)
  7015  			return uintptr(0)
  7016  		}
  7017  		(*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 // for empty file
  7018  	}
  7019  
  7020  	// save the path name for error messages
  7021  	len = libc.Xstrlen(tls, path)
  7022  	(*Gz_state)(unsafe.Pointer(state)).Fpath = libc.Xmalloc(tls, len+Z_size_t(1))
  7023  	if (*Gz_state)(unsafe.Pointer(state)).Fpath == uintptr(0) {
  7024  		libc.Xfree(tls, state)
  7025  		return uintptr(0)
  7026  	}
  7027  	libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath, len+Z_size_t(1), ts+76, libc.VaList(bp, path))
  7028  
  7029  	// compute the flags for open()
  7030  	oflag = func() int32 {
  7031  		if cloexec != 0 {
  7032  			return O_CLOEXEC
  7033  		}
  7034  		return 0
  7035  	}() | func() int32 {
  7036  		if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7037  			return O_RDONLY
  7038  		}
  7039  		return O_WRONLY | O_CREAT | func() int32 {
  7040  			if exclusive != 0 {
  7041  				return O_EXCL
  7042  			}
  7043  			return 0
  7044  		}() | func() int32 {
  7045  			if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_WRITE {
  7046  				return O_TRUNC
  7047  			}
  7048  			return O_APPEND
  7049  		}()
  7050  	}()
  7051  
  7052  	// open the file with the appropriate flags (or just use fd)
  7053  	(*Gz_state)(unsafe.Pointer(state)).Ffd = func() int32 {
  7054  		if fd > -1 {
  7055  			return fd
  7056  		}
  7057  		return libc.Xopen(tls, path, oflag, libc.VaList(bp+8, 0666))
  7058  	}()
  7059  	if (*Gz_state)(unsafe.Pointer(state)).Ffd == -1 {
  7060  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)
  7061  		libc.Xfree(tls, state)
  7062  		return uintptr(0)
  7063  	}
  7064  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_APPEND {
  7065  		libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_END) // so gzoffset() is correct
  7066  		(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE                          // simplify later checks
  7067  	}
  7068  
  7069  	// save the current position for rewinding (only if reading)
  7070  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7071  		(*Gz_state)(unsafe.Pointer(state)).Fstart = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR)
  7072  		if (*Gz_state)(unsafe.Pointer(state)).Fstart == int64(-1) {
  7073  			(*Gz_state)(unsafe.Pointer(state)).Fstart = int64(0)
  7074  		}
  7075  	}
  7076  
  7077  	// initialize stream
  7078  	gz_reset(tls, state)
  7079  
  7080  	// return stream
  7081  	return state
  7082  }
  7083  
  7084  // -- see zlib.h --
  7085  func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:270:16: */
  7086  	return gz_open(tls, path, -1, mode)
  7087  }
  7088  
  7089  // -- see zlib.h --
  7090  func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:278:16: */
  7091  	return gz_open(tls, path, -1, mode)
  7092  }
  7093  
  7094  // -- see zlib.h --
  7095  func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) GzFile { /* gzlib.c:286:16: */
  7096  	bp := tls.Alloc(8)
  7097  	defer tls.Free(8)
  7098  
  7099  	var path uintptr // identifier for error messages
  7100  	var gz GzFile
  7101  
  7102  	if fd == -1 || libc.AssignUintptr(&path, libc.Xmalloc(tls, uint32(7)+uint32(3)*uint32(unsafe.Sizeof(int32(0))))) == uintptr(0) {
  7103  		return uintptr(0)
  7104  	}
  7105  	libc.Xsnprintf(tls, path, uint32(7)+uint32(3)*uint32(unsafe.Sizeof(int32(0))), ts+79, libc.VaList(bp, fd))
  7106  	gz = gz_open(tls, path, fd, mode)
  7107  	libc.Xfree(tls, path)
  7108  	return gz
  7109  }
  7110  
  7111  // -- see zlib.h --
  7112  
  7113  // -- see zlib.h --
  7114  func Xgzbuffer(tls *libc.TLS, file GzFile, size uint32) int32 { /* gzlib.c:316:13: */
  7115  	var state Gz_statep
  7116  
  7117  	// get internal structure and check integrity
  7118  	if file == uintptr(0) {
  7119  		return -1
  7120  	}
  7121  	state = file
  7122  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7123  		return -1
  7124  	}
  7125  
  7126  	// make sure we haven't already allocated memory
  7127  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != uint32(0) {
  7128  		return -1
  7129  	}
  7130  
  7131  	// check and set requested size
  7132  	if size<<1 < size {
  7133  		return -1
  7134  	} // need to be able to double it
  7135  	if size < uint32(2) {
  7136  		size = uint32(2)
  7137  	} // need two bytes to check magic header
  7138  	(*Gz_state)(unsafe.Pointer(state)).Fwant = size
  7139  	return 0
  7140  }
  7141  
  7142  // -- see zlib.h --
  7143  func Xgzrewind(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:343:13: */
  7144  	var state Gz_statep
  7145  
  7146  	// get internal structure
  7147  	if file == uintptr(0) {
  7148  		return -1
  7149  	}
  7150  	state = file
  7151  
  7152  	// check that we're reading and that there's no error
  7153  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7154  		return -1
  7155  	}
  7156  
  7157  	// back up and start over
  7158  	if libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fstart, SEEK_SET) == int64(-1) {
  7159  		return -1
  7160  	}
  7161  	gz_reset(tls, state)
  7162  	return 0
  7163  }
  7164  
  7165  // -- see zlib.h --
  7166  func Xgzseek64(tls *libc.TLS, file GzFile, offset Off_t, whence int32) Off_t { /* gzlib.c:366:19: */
  7167  	var n uint32
  7168  	var ret Off_t
  7169  	var state Gz_statep
  7170  
  7171  	// get internal structure and check integrity
  7172  	if file == uintptr(0) {
  7173  		return int64(-1)
  7174  	}
  7175  	state = file
  7176  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7177  		return int64(-1)
  7178  	}
  7179  
  7180  	// check that there's no error
  7181  	if (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7182  		return int64(-1)
  7183  	}
  7184  
  7185  	// can only seek from start or relative to current position
  7186  	if whence != SEEK_SET && whence != SEEK_CUR {
  7187  		return int64(-1)
  7188  	}
  7189  
  7190  	// normalize offset to a SEEK_CUR specification
  7191  	if whence == SEEK_SET {
  7192  		offset = offset - (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos
  7193  	} else if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  7194  		offset = offset + (*Gz_state)(unsafe.Pointer(state)).Fskip
  7195  	}
  7196  	(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  7197  
  7198  	// if within raw area while reading, just go there
  7199  	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) {
  7200  		ret = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, offset-Off_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave), SEEK_CUR)
  7201  		if ret == int64(-1) {
  7202  			return int64(-1)
  7203  		}
  7204  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  7205  		(*Gz_state)(unsafe.Pointer(state)).Feof = 0
  7206  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  7207  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  7208  		Xgz_error(tls, state, Z_OK, uintptr(0))
  7209  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0)
  7210  		*(*Off_t)(unsafe.Pointer(state + 8)) += offset
  7211  		return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos
  7212  	}
  7213  
  7214  	// calculate skip amount, rewinding if needed for back seek when reading
  7215  	if offset < int64(0) {
  7216  		if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { // writing -- can't go backwards
  7217  			return int64(-1)
  7218  		}
  7219  		offset = offset + (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos
  7220  		if offset < int64(0) { // before start of file!
  7221  			return int64(-1)
  7222  		}
  7223  		if Xgzrewind(tls, file) == -1 { // rewind, then skip to offset
  7224  			return int64(-1)
  7225  		}
  7226  	}
  7227  
  7228  	// if reading, skip what's in output buffer (one less gzgetc() check)
  7229  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7230  		if uint32(unsafe.Sizeof(int32(0))) == uint32(unsafe.Sizeof(Off_t(0))) && (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > uint32(0x7fffffff) || Off_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > offset {
  7231  			n = uint32(offset)
  7232  		} else {
  7233  			n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  7234  		}
  7235  		*(*uint32)(unsafe.Pointer(state)) -= n
  7236  		*(*uintptr)(unsafe.Pointer(state + 4)) += uintptr(n)
  7237  		*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(n)
  7238  		offset = offset - Off_t(n)
  7239  	}
  7240  
  7241  	// request skip (if not zero)
  7242  	if offset != 0 {
  7243  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 1
  7244  		(*Gz_state)(unsafe.Pointer(state)).Fskip = offset
  7245  	}
  7246  	return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + offset
  7247  }
  7248  
  7249  // -- see zlib.h --
  7250  func Xgzseek(tls *libc.TLS, file GzFile, offset Off_t, whence int32) Off_t { /* gzlib.c:443:17: */
  7251  	var ret Off_t
  7252  
  7253  	ret = Xgzseek64(tls, file, offset, whence)
  7254  	if ret == ret {
  7255  		return ret
  7256  	}
  7257  	return int64(-1)
  7258  }
  7259  
  7260  // -- see zlib.h --
  7261  func Xgztell64(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:455:19: */
  7262  	var state Gz_statep
  7263  
  7264  	// get internal structure and check integrity
  7265  	if file == uintptr(0) {
  7266  		return int64(-1)
  7267  	}
  7268  	state = file
  7269  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7270  		return int64(-1)
  7271  	}
  7272  
  7273  	// return position
  7274  	return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + func() int64 {
  7275  		if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  7276  			return (*Gz_state)(unsafe.Pointer(state)).Fskip
  7277  		}
  7278  		return int64(0)
  7279  	}()
  7280  }
  7281  
  7282  // -- see zlib.h --
  7283  func Xgztell(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:472:17: */
  7284  	var ret Off_t
  7285  
  7286  	ret = Xgztell64(tls, file)
  7287  	if ret == ret {
  7288  		return ret
  7289  	}
  7290  	return int64(-1)
  7291  }
  7292  
  7293  // -- see zlib.h --
  7294  func Xgzoffset64(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:482:19: */
  7295  	var offset Off_t
  7296  	var state Gz_statep
  7297  
  7298  	// get internal structure and check integrity
  7299  	if file == uintptr(0) {
  7300  		return int64(-1)
  7301  	}
  7302  	state = file
  7303  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7304  		return int64(-1)
  7305  	}
  7306  
  7307  	// compute and return effective offset in file
  7308  	offset = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR)
  7309  	if offset == int64(-1) {
  7310  		return int64(-1)
  7311  	}
  7312  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // reading
  7313  		offset = offset - Off_t((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in)
  7314  	} // don't count buffered input
  7315  	return offset
  7316  }
  7317  
  7318  // -- see zlib.h --
  7319  func Xgzoffset(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:505:17: */
  7320  	var ret Off_t
  7321  
  7322  	ret = Xgzoffset64(tls, file)
  7323  	if ret == ret {
  7324  		return ret
  7325  	}
  7326  	return int64(-1)
  7327  }
  7328  
  7329  // -- see zlib.h --
  7330  func Xgzeof(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:515:13: */
  7331  	var state Gz_statep
  7332  
  7333  	// get internal structure and check integrity
  7334  	if file == uintptr(0) {
  7335  		return 0
  7336  	}
  7337  	state = file
  7338  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7339  		return 0
  7340  	}
  7341  
  7342  	// return end-of-file state
  7343  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7344  		return (*Gz_state)(unsafe.Pointer(state)).Fpast
  7345  	}
  7346  	return 0
  7347  }
  7348  
  7349  // -- see zlib.h --
  7350  func Xgzerror(tls *libc.TLS, file GzFile, errnum uintptr) uintptr { /* gzlib.c:532:12: */
  7351  	var state Gz_statep
  7352  
  7353  	// get internal structure and check integrity
  7354  	if file == uintptr(0) {
  7355  		return uintptr(0)
  7356  	}
  7357  	state = file
  7358  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7359  		return uintptr(0)
  7360  	}
  7361  
  7362  	// return error information
  7363  	if errnum != uintptr(0) {
  7364  		*(*int32)(unsafe.Pointer(errnum)) = (*Gz_state)(unsafe.Pointer(state)).Ferr
  7365  	}
  7366  	if (*Gz_state)(unsafe.Pointer(state)).Ferr == -4 {
  7367  		return ts + 87 /* "out of memory" */
  7368  	}
  7369  	return func() uintptr {
  7370  		if (*Gz_state)(unsafe.Pointer(state)).Fmsg == uintptr(0) {
  7371  			return ts + 101
  7372  		}
  7373  		return (*Gz_state)(unsafe.Pointer(state)).Fmsg
  7374  	}()
  7375  }
  7376  
  7377  // -- see zlib.h --
  7378  func Xgzclearerr(tls *libc.TLS, file GzFile) { /* gzlib.c:553:14: */
  7379  	var state Gz_statep
  7380  
  7381  	// get internal structure and check integrity
  7382  	if file == uintptr(0) {
  7383  		return
  7384  	}
  7385  	state = file
  7386  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7387  		return
  7388  	}
  7389  
  7390  	// clear error and end-of-file
  7391  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7392  		(*Gz_state)(unsafe.Pointer(state)).Feof = 0
  7393  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  7394  	}
  7395  	Xgz_error(tls, state, Z_OK, uintptr(0))
  7396  }
  7397  
  7398  // Create an error message in allocated memory and set state->err and
  7399  //    state->msg accordingly.  Free any previous error message already there.  Do
  7400  //    not try to free or allocate space if the error is Z_MEM_ERROR (out of
  7401  //    memory).  Simply save the error message as a static string.  If there is an
  7402  //    allocation failure constructing the error message, then convert the error to
  7403  //    out of memory.
  7404  func Xgz_error(tls *libc.TLS, state Gz_statep, err int32, msg uintptr) { /* gzlib.c:579:20: */
  7405  	bp := tls.Alloc(24)
  7406  	defer tls.Free(24)
  7407  
  7408  	// free previously allocated message and clear
  7409  	if (*Gz_state)(unsafe.Pointer(state)).Fmsg != uintptr(0) {
  7410  		if (*Gz_state)(unsafe.Pointer(state)).Ferr != -4 {
  7411  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg)
  7412  		}
  7413  		(*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0)
  7414  	}
  7415  
  7416  	// if fatal, set state->x.have to 0 so that the gzgetc() macro fails
  7417  	if err != Z_OK && err != -5 {
  7418  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  7419  	}
  7420  
  7421  	// set error code, and if no message, then done
  7422  	(*Gz_state)(unsafe.Pointer(state)).Ferr = err
  7423  	if msg == uintptr(0) {
  7424  		return
  7425  	}
  7426  
  7427  	// for an out of memory error, return literal string when requested
  7428  	if err == -4 {
  7429  		return
  7430  	}
  7431  
  7432  	// construct error message with path
  7433  	if libc.AssignPtrUintptr(state+96, libc.Xmalloc(tls, libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg)+Size_t(3))) == uintptr(0) {
  7434  		(*Gz_state)(unsafe.Pointer(state)).Ferr = -4
  7435  		return
  7436  	}
  7437  	libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg, libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg)+Size_t(3),
  7438  		ts+102, libc.VaList(bp, (*Gz_state)(unsafe.Pointer(state)).Fpath, ts+109, msg))
  7439  }
  7440  
  7441  // Use read() to load a buffer -- return -1 on error, otherwise 0.  Read from
  7442  //    state->fd, and update state->eof, state->err, and state->msg as appropriate.
  7443  //    This function needs to loop on read(), since read() is not guaranteed to
  7444  //    read the number of bytes requested, depending on the type of descriptor.
  7445  func gz_load(tls *libc.TLS, state Gz_statep, buf uintptr, len uint32, have uintptr) int32 { /* gzread.c:21:11: */
  7446  	var ret int32
  7447  	var get uint32
  7448  	var max uint32 = uint32(libc.Uint32(libc.Uint32FromInt32(-1)))>>2 + uint32(1)
  7449  
  7450  	*(*uint32)(unsafe.Pointer(have)) = uint32(0)
  7451  	for __ccgo := true; __ccgo; __ccgo = *(*uint32)(unsafe.Pointer(have)) < len {
  7452  		get = len - *(*uint32)(unsafe.Pointer(have))
  7453  		if get > max {
  7454  			get = max
  7455  		}
  7456  		ret = libc.Xread(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, buf+uintptr(*(*uint32)(unsafe.Pointer(have))), get)
  7457  		if ret <= 0 {
  7458  			break
  7459  		}
  7460  		*(*uint32)(unsafe.Pointer(have)) += uint32(ret)
  7461  	}
  7462  	if ret < 0 {
  7463  		Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__error(tls)))))
  7464  		return -1
  7465  	}
  7466  	if ret == 0 {
  7467  		(*Gz_state)(unsafe.Pointer(state)).Feof = 1
  7468  	}
  7469  	return 0
  7470  }
  7471  
  7472  // Load up input buffer and set eof flag if last data loaded -- return -1 on
  7473  //    error, 0 otherwise.  Note that the eof flag is set when the end of the input
  7474  //    file is reached, even though there may be unused data in the buffer.  Once
  7475  //    that data has been used, no more attempts will be made to read the file.
  7476  //    If strm->avail_in != 0, then the current data is moved to the beginning of
  7477  //    the input buffer, and then the remainder of the buffer is loaded with the
  7478  //    available data from the input file.
  7479  func gz_avail(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:56:11: */
  7480  	bp := tls.Alloc(4)
  7481  	defer tls.Free(4)
  7482  
  7483  	// var got uint32 at bp, 4
  7484  
  7485  	var strm Z_streamp = state + 100
  7486  
  7487  	if (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7488  		return -1
  7489  	}
  7490  	if (*Gz_state)(unsafe.Pointer(state)).Feof == 0 {
  7491  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { // copy what's there to the start
  7492  			var p uintptr = (*Gz_state)(unsafe.Pointer(state)).Fin
  7493  			var q uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
  7494  			var n uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  7495  			for __ccgo := true; __ccgo; __ccgo = libc.PreDecUint32(&n, 1) != 0 {
  7496  				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1)))
  7497  			}
  7498  		}
  7499  		if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in),
  7500  			(*Gz_state)(unsafe.Pointer(state)).Fsize-(*Z_stream)(unsafe.Pointer(strm)).Favail_in, bp) == -1 {
  7501  			return -1
  7502  		}
  7503  		*(*UInt)(unsafe.Pointer(strm + 4)) += *(*uint32)(unsafe.Pointer(bp))
  7504  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  7505  	}
  7506  	return 0
  7507  }
  7508  
  7509  // Look for gzip header, set up for inflate or copy.  state->x.have must be 0.
  7510  //    If this is the first time in, allocate required memory.  state->how will be
  7511  //    left unchanged if there is no more input data available, will be set to COPY
  7512  //    if there is no gzip header and direct copying will be performed, or it will
  7513  //    be set to GZIP for decompression.  If direct copying, then leftover input
  7514  //    data from the input buffer will be copied to the output buffer.  In that
  7515  //    case, all further file reads will be directly to either the output buffer or
  7516  //    a user buffer.  If decompressing, the inflate state will be initialized.
  7517  //    gz_look() will return 0 on success or -1 on failure.
  7518  func gz_look(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:91:11: */
  7519  	var strm Z_streamp = state + 100
  7520  
  7521  	// allocate read buffers and inflate memory
  7522  	if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) {
  7523  		// allocate buffers
  7524  		(*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, (*Gz_state)(unsafe.Pointer(state)).Fwant)
  7525  		(*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, (*Gz_state)(unsafe.Pointer(state)).Fwant<<1)
  7526  		if (*Gz_state)(unsafe.Pointer(state)).Fin == uintptr(0) || (*Gz_state)(unsafe.Pointer(state)).Fout == uintptr(0) {
  7527  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  7528  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  7529  			Xgz_error(tls, state, -4, ts+87)
  7530  			return -1
  7531  		}
  7532  		(*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant
  7533  
  7534  		// allocate inflate memory
  7535  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzalloc = Alloc_func(Z_NULL)
  7536  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzfree = Free_func(Z_NULL)
  7537  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fopaque = Voidpf(Z_NULL)
  7538  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0)
  7539  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = uintptr(Z_NULL)
  7540  		if XinflateInit2_(tls, state+100, 15+16, ts, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK { // gunzip
  7541  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  7542  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  7543  			(*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0)
  7544  			Xgz_error(tls, state, -4, ts+87)
  7545  			return -1
  7546  		}
  7547  	}
  7548  
  7549  	// get at least the magic bytes in the input buffer
  7550  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in < UInt(2) {
  7551  		if gz_avail(tls, state) == -1 {
  7552  			return -1
  7553  		}
  7554  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
  7555  			return 0
  7556  		}
  7557  	}
  7558  
  7559  	// look for gzip magic bytes -- if there, do gzip decoding (note: there is
  7560  	//        a logical dilemma here when considering the case of a partially written
  7561  	//        gzip file, to wit, if a single 31 byte is written, then we cannot tell
  7562  	//        whether this is a single-byte file, or just a partially written gzip
  7563  	//        file -- for here we assume that if a gzip file is being written, then
  7564  	//        the header will be written in a single operation, so that reading a
  7565  	//        single byte is sufficient indication that it is not a gzip file)
  7566  	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 {
  7567  		XinflateReset(tls, strm)
  7568  		(*Gz_state)(unsafe.Pointer(state)).Fhow = /* GZIP */ 2
  7569  		(*Gz_state)(unsafe.Pointer(state)).Fdirect = 0
  7570  		return 0
  7571  	}
  7572  
  7573  	// no gzip header -- if we were decoding gzip before, then this is trailing
  7574  	//        garbage.  Ignore the trailing garbage and finish.
  7575  	if (*Gz_state)(unsafe.Pointer(state)).Fdirect == 0 {
  7576  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0)
  7577  		(*Gz_state)(unsafe.Pointer(state)).Feof = 1
  7578  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  7579  		return 0
  7580  	}
  7581  
  7582  	// doing raw i/o, copy any leftover input to output -- this assumes that
  7583  	//        the output buffer is larger than the input buffer, which also assures
  7584  	//        space for gzungetc()
  7585  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout
  7586  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 {
  7587  		libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in)
  7588  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  7589  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0)
  7590  	}
  7591  	(*Gz_state)(unsafe.Pointer(state)).Fhow = COPY1
  7592  	(*Gz_state)(unsafe.Pointer(state)).Fdirect = 1
  7593  	return 0
  7594  }
  7595  
  7596  // Decompress from input to the provided next_out and avail_out in the state.
  7597  //    On return, state->x.have and state->x.next point to the just decompressed
  7598  //    data.  If the gzip stream completes, state->how is reset to LOOK to look for
  7599  //    the next gzip stream or raw data, once state->x.have is depleted.  Returns 0
  7600  //    on success, -1 on failure.
  7601  func gz_decomp(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:175:11: */
  7602  	var ret int32 = Z_OK
  7603  	var had uint32
  7604  	var strm Z_streamp = state + 100
  7605  
  7606  	// fill output buffer up to end of deflate stream
  7607  	had = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  7608  	for __ccgo := true; __ccgo; __ccgo = (*Z_stream)(unsafe.Pointer(strm)).Favail_out != 0 && ret != Z_STREAM_END {
  7609  		// get more input for inflate()
  7610  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && gz_avail(tls, state) == -1 {
  7611  			return -1
  7612  		}
  7613  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
  7614  			Xgz_error(tls, state, -5, ts+112)
  7615  			break
  7616  		}
  7617  
  7618  		// decompress and handle errors
  7619  		ret = Xinflate(tls, strm, Z_NO_FLUSH)
  7620  		if ret == -2 || ret == Z_NEED_DICT {
  7621  			Xgz_error(tls, state, -2,
  7622  				ts+135)
  7623  			return -1
  7624  		}
  7625  		if ret == -4 {
  7626  			Xgz_error(tls, state, -4, ts+87)
  7627  			return -1
  7628  		}
  7629  		if ret == -3 { // deflate stream invalid
  7630  			Xgz_error(tls, state, -3,
  7631  				func() uintptr {
  7632  					if (*Z_stream)(unsafe.Pointer(strm)).Fmsg == uintptr(0) {
  7633  						return ts + 174 /* "compressed data ..." */
  7634  					}
  7635  					return (*Z_stream)(unsafe.Pointer(strm)).Fmsg
  7636  				}())
  7637  			return -1
  7638  		}
  7639  	}
  7640  
  7641  	// update available output
  7642  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = had - (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  7643  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)
  7644  
  7645  	// if the gzip stream completed successfully, look for another
  7646  	if ret == Z_STREAM_END {
  7647  		(*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK
  7648  	}
  7649  
  7650  	// good decompression
  7651  	return 0
  7652  }
  7653  
  7654  // Fetch data and put it in the output buffer.  Assumes state->x.have is 0.
  7655  //    Data is either copied from the input file or decompressed from the input
  7656  //    file depending on state->how.  If state->how is LOOK, then a gzip header is
  7657  //    looked for to determine whether to copy or decompress.  Returns -1 on error,
  7658  //    otherwise 0.  gz_fetch() will leave state->how as COPY or GZIP unless the
  7659  //    end of the input file has been reached and all data has been processed.
  7660  func gz_fetch(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:229:11: */
  7661  	var strm Z_streamp = state + 100
  7662  
  7663  	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) {
  7664  		switch (*Gz_state)(unsafe.Pointer(state)).Fhow {
  7665  		case LOOK: // -> LOOK, COPY (only if never GZIP), or GZIP
  7666  			if gz_look(tls, state) == -1 {
  7667  				return -1
  7668  			}
  7669  			if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK {
  7670  				return 0
  7671  			}
  7672  			break
  7673  		case COPY1: // -> COPY
  7674  			if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fout, (*Gz_state)(unsafe.Pointer(state)).Fsize<<1, state) ==
  7675  				-1 {
  7676  				return -1
  7677  			}
  7678  			(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout
  7679  			return 0
  7680  		case /* GZIP */ 2: // -> GZIP or LOOK (if end of gzip stream)
  7681  			(*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize << 1
  7682  			(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout
  7683  			if gz_decomp(tls, state) == -1 {
  7684  				return -1
  7685  			}
  7686  		}
  7687  	}
  7688  	return 0
  7689  }
  7690  
  7691  // Skip len uncompressed bytes of output.  Return -1 on error, 0 on success.
  7692  func gz_skip(tls *libc.TLS, state Gz_statep, len Off_t) int32 { /* gzread.c:259:11: */
  7693  	var n uint32
  7694  
  7695  	// skip over len bytes or reach end-of-file, whichever comes first
  7696  	for len != 0 {
  7697  		// skip over whatever is in output buffer
  7698  		if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 {
  7699  			if uint32(unsafe.Sizeof(int32(0))) == uint32(unsafe.Sizeof(Off_t(0))) && (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > uint32(0x7fffffff) || Off_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > len {
  7700  				n = uint32(len)
  7701  			} else {
  7702  				n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  7703  			}
  7704  			*(*uint32)(unsafe.Pointer(state)) -= n
  7705  			*(*uintptr)(unsafe.Pointer(state + 4)) += uintptr(n)
  7706  			*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(n)
  7707  			len = len - Off_t(n)
  7708  		} else if (*Gz_state)(unsafe.Pointer(state)).Feof != 0 && (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) {
  7709  			break
  7710  		} else {
  7711  			// get more output, looking for header if required
  7712  			if gz_fetch(tls, state) == -1 {
  7713  				return -1
  7714  			}
  7715  		}
  7716  	}
  7717  	return 0
  7718  }
  7719  
  7720  // Read len bytes into buf from file, or less than len up to the end of the
  7721  //    input.  Return the number of bytes read.  If zero is returned, either the
  7722  //    end of file was reached, or there was an error.  state->err must be
  7723  //    consulted in that case to determine which.
  7724  func gz_read(tls *libc.TLS, state Gz_statep, buf Voidp, len Z_size_t) Z_size_t { /* gzread.c:294:16: */
  7725  	bp := tls.Alloc(4)
  7726  	defer tls.Free(4)
  7727  
  7728  	var got Z_size_t
  7729  	// var n uint32 at bp, 4
  7730  
  7731  	// if len is zero, avoid unnecessary operations
  7732  	if len == Z_size_t(0) {
  7733  		return Z_size_t(0)
  7734  	}
  7735  
  7736  	// process a skip request
  7737  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  7738  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  7739  		if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  7740  			return Z_size_t(0)
  7741  		}
  7742  	}
  7743  
  7744  	// get len bytes to buf, or less than len if at the end
  7745  	got = Z_size_t(0)
  7746  	for __ccgo := true; __ccgo; __ccgo = len != 0 {
  7747  		// set n to the maximum amount of len that fits in an unsigned int
  7748  		*(*uint32)(unsafe.Pointer(bp /* n */)) = libc.Uint32FromInt32(-1)
  7749  		if *(*uint32)(unsafe.Pointer(bp)) > len {
  7750  			*(*uint32)(unsafe.Pointer(bp /* n */)) = len
  7751  		}
  7752  
  7753  		// first just try copying data from the output buffer
  7754  		if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 {
  7755  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave < *(*uint32)(unsafe.Pointer(bp)) {
  7756  				*(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  7757  			}
  7758  			libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, *(*uint32)(unsafe.Pointer(bp /* n */)))
  7759  			*(*uintptr)(unsafe.Pointer(state + 4)) += uintptr(*(*uint32)(unsafe.Pointer(bp)))
  7760  			*(*uint32)(unsafe.Pointer(state)) -= *(*uint32)(unsafe.Pointer(bp))
  7761  		} else if (*Gz_state)(unsafe.Pointer(state)).Feof != 0 && (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) {
  7762  			(*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // tried to read past end
  7763  			break
  7764  		} else if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK || *(*uint32)(unsafe.Pointer(bp)) < (*Gz_state)(unsafe.Pointer(state)).Fsize<<1 {
  7765  			// get more output, looking for header if required
  7766  			if gz_fetch(tls, state) == -1 {
  7767  				return Z_size_t(0)
  7768  			}
  7769  			continue // no progress yet -- go back to copy above
  7770  			// the copy above assures that we will leave with space in the
  7771  			//                output buffer, allowing at least one gzungetc() to succeed
  7772  		} else if (*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1 { // read directly
  7773  			if gz_load(tls, state, buf, *(*uint32)(unsafe.Pointer(bp)), bp) == -1 {
  7774  				return Z_size_t(0)
  7775  			}
  7776  		} else { // state->how == GZIP
  7777  			(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_out = *(*uint32)(unsafe.Pointer(bp /* n */))
  7778  			(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_out = buf
  7779  			if gz_decomp(tls, state) == -1 {
  7780  				return Z_size_t(0)
  7781  			}
  7782  			*(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  7783  			(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  7784  		}
  7785  
  7786  		// update progress
  7787  		len = len - *(*uint32)(unsafe.Pointer(bp))
  7788  		buf = buf + uintptr(*(*uint32)(unsafe.Pointer(bp)))
  7789  		got = got + *(*uint32)(unsafe.Pointer(bp))
  7790  		*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(*(*uint32)(unsafe.Pointer(bp)))
  7791  	}
  7792  
  7793  	// return number of bytes read into user buffer
  7794  	return got
  7795  }
  7796  
  7797  // -- see zlib.h --
  7798  func Xgzread(tls *libc.TLS, file GzFile, buf Voidp, len uint32) int32 { /* gzread.c:375:13: */
  7799  	var state Gz_statep
  7800  
  7801  	// get internal structure
  7802  	if file == uintptr(0) {
  7803  		return -1
  7804  	}
  7805  	state = file
  7806  
  7807  	// check that we're reading and that there's no (serious) error
  7808  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7809  		return -1
  7810  	}
  7811  
  7812  	// since an int is returned, make sure len fits in one, otherwise return
  7813  	//        with an error (this avoids a flaw in the interface)
  7814  	if int32(len) < 0 {
  7815  		Xgz_error(tls, state, -2, ts+196)
  7816  		return -1
  7817  	}
  7818  
  7819  	// read len or fewer bytes to buf
  7820  	len = gz_read(tls, state, buf, len)
  7821  
  7822  	// check for an error
  7823  	if len == uint32(0) && (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7824  		return -1
  7825  	}
  7826  
  7827  	// return the number of bytes read (this is assured to fit in an int)
  7828  	return int32(len)
  7829  }
  7830  
  7831  // -- see zlib.h --
  7832  func Xgzfread(tls *libc.TLS, buf Voidp, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzread.c:411:18: */
  7833  	var len Z_size_t
  7834  	var state Gz_statep
  7835  
  7836  	// get internal structure
  7837  	if file == uintptr(0) {
  7838  		return Z_size_t(0)
  7839  	}
  7840  	state = file
  7841  
  7842  	// check that we're reading and that there's no (serious) error
  7843  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7844  		return Z_size_t(0)
  7845  	}
  7846  
  7847  	// compute bytes to read -- error on overflow
  7848  	len = nitems * size
  7849  	if size != 0 && len/size != nitems {
  7850  		Xgz_error(tls, state, -2, ts+227)
  7851  		return Z_size_t(0)
  7852  	}
  7853  
  7854  	// read len or fewer bytes to buf, return the number of full items read
  7855  	if len != 0 {
  7856  		return gz_read(tls, state, buf, len) / size
  7857  	}
  7858  	return uint32(0)
  7859  }
  7860  
  7861  // -- see zlib.h --
  7862  func Xgzgetc(tls *libc.TLS, file GzFile) int32 { /* gzread.c:447:13: */
  7863  	bp := tls.Alloc(1)
  7864  	defer tls.Free(1)
  7865  
  7866  	var ret int32
  7867  	// var buf [1]uint8 at bp, 1
  7868  
  7869  	var state Gz_statep
  7870  
  7871  	// get internal structure
  7872  	if file == uintptr(0) {
  7873  		return -1
  7874  	}
  7875  	state = file
  7876  
  7877  	// check that we're reading and that there's no (serious) error
  7878  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7879  		return -1
  7880  	}
  7881  
  7882  	// try output buffer (no need to check for skip request)
  7883  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 {
  7884  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave--
  7885  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++
  7886  		return int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, 1))))
  7887  	}
  7888  
  7889  	// nothing there -- try gz_read()
  7890  	ret = int32(gz_read(tls, state, bp, uint32(1)))
  7891  	if ret < 1 {
  7892  		return -1
  7893  	}
  7894  	return int32(*(*uint8)(unsafe.Pointer(bp)))
  7895  }
  7896  
  7897  func Xgzgetc_(tls *libc.TLS, file GzFile) int32 { /* gzread.c:476:13: */
  7898  	return Xgzgetc(tls, file)
  7899  }
  7900  
  7901  // -- see zlib.h --
  7902  func Xgzungetc(tls *libc.TLS, c int32, file GzFile) int32 { /* gzread.c:483:13: */
  7903  	var state Gz_statep
  7904  
  7905  	// get internal structure
  7906  	if file == uintptr(0) {
  7907  		return -1
  7908  	}
  7909  	state = file
  7910  
  7911  	// check that we're reading and that there's no (serious) error
  7912  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7913  		return -1
  7914  	}
  7915  
  7916  	// process a skip request
  7917  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  7918  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  7919  		if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  7920  			return -1
  7921  		}
  7922  	}
  7923  
  7924  	// can't push EOF
  7925  	if c < 0 {
  7926  		return -1
  7927  	}
  7928  
  7929  	// if output buffer empty, put byte at end (allows more pushing)
  7930  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) {
  7931  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(1)
  7932  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize<<1) - uintptr(1)
  7933  		*(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c)
  7934  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos--
  7935  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  7936  		return c
  7937  	}
  7938  
  7939  	// if no room, give up (must have already done a gzungetc())
  7940  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == (*Gz_state)(unsafe.Pointer(state)).Fsize<<1 {
  7941  		Xgz_error(tls, state, -3, ts+260)
  7942  		return -1
  7943  	}
  7944  
  7945  	// slide output data if needed and insert byte before existing data
  7946  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext == (*Gz_state)(unsafe.Pointer(state)).Fout {
  7947  		var src uintptr = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)
  7948  		var dest uintptr = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize<<1)
  7949  		for src > (*Gz_state)(unsafe.Pointer(state)).Fout {
  7950  			*(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&dest, 1))) = *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&src, 1)))
  7951  		}
  7952  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = dest
  7953  	}
  7954  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave++
  7955  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext--
  7956  	*(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c)
  7957  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos--
  7958  	(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  7959  	return c
  7960  }
  7961  
  7962  // -- see zlib.h --
  7963  func Xgzgets(tls *libc.TLS, file GzFile, buf uintptr, len int32) uintptr { /* gzread.c:543:6: */
  7964  	var left uint32
  7965  	var n uint32
  7966  	var str uintptr
  7967  	var eol uintptr
  7968  	var state Gz_statep
  7969  
  7970  	// check parameters and get internal structure
  7971  	if file == uintptr(0) || buf == uintptr(0) || len < 1 {
  7972  		return uintptr(0)
  7973  	}
  7974  	state = file
  7975  
  7976  	// check that we're reading and that there's no (serious) error
  7977  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7978  		return uintptr(0)
  7979  	}
  7980  
  7981  	// process a skip request
  7982  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  7983  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  7984  		if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  7985  			return uintptr(0)
  7986  		}
  7987  	}
  7988  
  7989  	// copy output bytes up to new line or len - 1, whichever comes first --
  7990  	//        append a terminating zero to the string (we don't check for a zero in
  7991  	//        the contents, let the user worry about that)
  7992  	str = buf
  7993  	left = uint32(len) - uint32(1)
  7994  	if left != 0 {
  7995  		for __ccgo := true; __ccgo; __ccgo = left != 0 && eol == uintptr(0) {
  7996  			// assure that something is in the output buffer
  7997  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) && gz_fetch(tls, state) == -1 {
  7998  				return uintptr(0)
  7999  			} // error
  8000  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { // end of file
  8001  				(*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // read past end
  8002  				break                                        // return what we have
  8003  			}
  8004  
  8005  			// look for end-of-line in current output buffer
  8006  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > left {
  8007  				n = left
  8008  			} else {
  8009  				n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  8010  			}
  8011  			eol = libc.Xmemchr(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, '\n', n)
  8012  			if eol != uintptr(0) {
  8013  				n = uint32((int32(eol)-int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext))/1) + uint32(1)
  8014  			}
  8015  
  8016  			// copy through end-of-line, or remainder if not found
  8017  			libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, n)
  8018  			*(*uint32)(unsafe.Pointer(state)) -= n
  8019  			*(*uintptr)(unsafe.Pointer(state + 4)) += uintptr(n)
  8020  			*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(n)
  8021  			left = left - n
  8022  			buf += uintptr(n)
  8023  		}
  8024  	}
  8025  
  8026  	// return terminated string, or if nothing, end of file
  8027  	if buf == str {
  8028  		return uintptr(0)
  8029  	}
  8030  	*(*uint8)(unsafe.Pointer(buf)) = uint8(0)
  8031  	return str
  8032  }
  8033  
  8034  // -- see zlib.h --
  8035  func Xgzdirect(tls *libc.TLS, file GzFile) int32 { /* gzread.c:607:13: */
  8036  	var state Gz_statep
  8037  
  8038  	// get internal structure
  8039  	if file == uintptr(0) {
  8040  		return 0
  8041  	}
  8042  	state = file
  8043  
  8044  	// if the state is not known, but we can find out, then do so (this is
  8045  	//        mainly for right after a gzopen() or gzdopen())
  8046  	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) {
  8047  		gz_look(tls, state)
  8048  	}
  8049  
  8050  	// return 1 if transparent, 0 if processing a gzip stream
  8051  	return (*Gz_state)(unsafe.Pointer(state)).Fdirect
  8052  }
  8053  
  8054  // -- see zlib.h --
  8055  func Xgzclose_r(tls *libc.TLS, file GzFile) int32 { /* gzread.c:627:13: */
  8056  	var ret int32
  8057  	var err int32
  8058  	var state Gz_statep
  8059  
  8060  	// get internal structure
  8061  	if file == uintptr(0) {
  8062  		return -2
  8063  	}
  8064  	state = file
  8065  
  8066  	// check that we're reading
  8067  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ {
  8068  		return -2
  8069  	}
  8070  
  8071  	// free memory and close file
  8072  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
  8073  		XinflateEnd(tls, state+100)
  8074  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  8075  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  8076  	}
  8077  	if (*Gz_state)(unsafe.Pointer(state)).Ferr == -5 {
  8078  		err = -5
  8079  	} else {
  8080  		err = Z_OK
  8081  	}
  8082  	Xgz_error(tls, state, Z_OK, uintptr(0))
  8083  	libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)
  8084  	ret = libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd)
  8085  	libc.Xfree(tls, state)
  8086  	if ret != 0 {
  8087  		return -1
  8088  	}
  8089  	return err
  8090  }
  8091  
  8092  // Initialize state for writing a gzip file.  Mark initialization by setting
  8093  //    state->size to non-zero.  Return -1 on a memory allocation failure, or 0 on
  8094  //    success.
  8095  func gz_init(tls *libc.TLS, state Gz_statep) int32 { /* gzwrite.c:17:11: */
  8096  	var ret int32
  8097  	var strm Z_streamp = state + 100
  8098  
  8099  	// allocate input buffer (double size for gzprintf)
  8100  	(*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, (*Gz_state)(unsafe.Pointer(state)).Fwant<<1)
  8101  	if (*Gz_state)(unsafe.Pointer(state)).Fin == uintptr(0) {
  8102  		Xgz_error(tls, state, -4, ts+87)
  8103  		return -1
  8104  	}
  8105  
  8106  	// only need output buffer and deflate state if compressing
  8107  	if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) {
  8108  		// allocate output buffer
  8109  		(*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, (*Gz_state)(unsafe.Pointer(state)).Fwant)
  8110  		if (*Gz_state)(unsafe.Pointer(state)).Fout == uintptr(0) {
  8111  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  8112  			Xgz_error(tls, state, -4, ts+87)
  8113  			return -1
  8114  		}
  8115  
  8116  		// allocate deflate memory, set up for gzip compression
  8117  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = Alloc_func(Z_NULL)
  8118  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = Free_func(Z_NULL)
  8119  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = Voidpf(Z_NULL)
  8120  		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{})))
  8121  		if ret != Z_OK {
  8122  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  8123  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  8124  			Xgz_error(tls, state, -4, ts+87)
  8125  			return -1
  8126  		}
  8127  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = uintptr(0)
  8128  	}
  8129  
  8130  	// mark state as initialized
  8131  	(*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant
  8132  
  8133  	// initialize write buffer if compressing
  8134  	if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) {
  8135  		(*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize
  8136  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout
  8137  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
  8138  	}
  8139  	return 0
  8140  }
  8141  
  8142  // Compress whatever is at avail_in and next_in and write to the output file.
  8143  //    Return -1 if there is an error writing to the output file or if gz_init()
  8144  //    fails to allocate memory, otherwise 0.  flush is assumed to be a valid
  8145  //    deflate() flush value.  If flush is Z_FINISH, then the deflate() state is
  8146  //    reset to start a new gzip stream.  If gz->direct is true, then simply write
  8147  //    to the output file without compressing, and ignore flush.
  8148  func gz_comp(tls *libc.TLS, state Gz_statep, flush int32) int32 { /* gzwrite.c:73:11: */
  8149  	var ret int32
  8150  	var writ int32
  8151  	var have uint32
  8152  	var put uint32
  8153  	var max uint32 = uint32(libc.Uint32(libc.Uint32FromInt32(-1)))>>2 + uint32(1)
  8154  	var strm Z_streamp = state + 100
  8155  
  8156  	// allocate memory if this is the first time through
  8157  	if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 {
  8158  		return -1
  8159  	}
  8160  
  8161  	// write directly if requested
  8162  	if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 {
  8163  		for (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 {
  8164  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_in > max {
  8165  				put = max
  8166  			} else {
  8167  				put = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  8168  			}
  8169  			writ = libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, put)
  8170  			if writ < 0 {
  8171  				Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__error(tls)))))
  8172  				return -1
  8173  			}
  8174  			*(*UInt)(unsafe.Pointer(strm + 4)) -= uint32(writ)
  8175  			*(*uintptr)(unsafe.Pointer(strm)) += uintptr(writ)
  8176  		}
  8177  		return 0
  8178  	}
  8179  
  8180  	// run deflate() on provided input until it produces no more output
  8181  	ret = Z_OK
  8182  	for __ccgo := true; __ccgo; __ccgo = have != 0 {
  8183  		// write out current buffer contents if full, or if flushing, but if
  8184  		//            doing Z_FINISH then don't write until we get to Z_STREAM_END
  8185  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) || flush != Z_NO_FLUSH && (flush != Z_FINISH || ret == Z_STREAM_END) {
  8186  			for (*Z_stream)(unsafe.Pointer(strm)).Fnext_out > (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext {
  8187  				if (int32((*Z_stream)(unsafe.Pointer(strm)).Fnext_out)-int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext))/1 > int32(max) {
  8188  					put = max
  8189  				} else {
  8190  					put = uint32((int32((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)
  8191  				}
  8192  				writ = libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, put)
  8193  				if writ < 0 {
  8194  					Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__error(tls)))))
  8195  					return -1
  8196  				}
  8197  				*(*uintptr)(unsafe.Pointer(state + 4)) += uintptr(writ)
  8198  			}
  8199  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  8200  				(*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize
  8201  				(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout
  8202  				(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout
  8203  			}
  8204  		}
  8205  
  8206  		// compress
  8207  		have = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  8208  		ret = Xdeflate(tls, strm, flush)
  8209  		if ret == -2 {
  8210  			Xgz_error(tls, state, -2,
  8211  				ts+291)
  8212  			return -1
  8213  		}
  8214  		have = have - (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  8215  	}
  8216  
  8217  	// if that completed a deflate stream, allow another to start
  8218  	if flush == Z_FINISH {
  8219  		XdeflateReset(tls, strm)
  8220  	}
  8221  
  8222  	// all done, no errors
  8223  	return 0
  8224  }
  8225  
  8226  // Compress len zeros to output.  Return -1 on a write error or memory
  8227  //    allocation failure by gz_comp(), or 0 on success.
  8228  func gz_zero(tls *libc.TLS, state Gz_statep, len Off_t) int32 { /* gzwrite.c:145:11: */
  8229  	var first int32
  8230  	var n uint32
  8231  	var strm Z_streamp = state + 100
  8232  
  8233  	// consume whatever's left in the input buffer
  8234  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8235  		return -1
  8236  	}
  8237  
  8238  	// compress len zeros (len guaranteed > 0)
  8239  	first = 1
  8240  	for len != 0 {
  8241  		if uint32(unsafe.Sizeof(int32(0))) == uint32(unsafe.Sizeof(Off_t(0))) && (*Gz_state)(unsafe.Pointer(state)).Fsize > uint32(0x7fffffff) || Off_t((*Gz_state)(unsafe.Pointer(state)).Fsize) > len {
  8242  			n = uint32(len)
  8243  		} else {
  8244  			n = (*Gz_state)(unsafe.Pointer(state)).Fsize
  8245  		}
  8246  		if first != 0 {
  8247  			libc.Xmemset(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, 0, n)
  8248  			first = 0
  8249  		}
  8250  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = n
  8251  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  8252  		*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(n)
  8253  		if gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8254  			return -1
  8255  		}
  8256  		len = len - Off_t(n)
  8257  	}
  8258  	return 0
  8259  }
  8260  
  8261  // Write len bytes from buf to file.  Return the number of bytes written.  If
  8262  //    the returned value is less than len, then there was an error.
  8263  func gz_write(tls *libc.TLS, state Gz_statep, buf Voidpc, len Z_size_t) Z_size_t { /* gzwrite.c:178:16: */
  8264  	var put Z_size_t = len
  8265  
  8266  	// if len is zero, avoid unnecessary operations
  8267  	if len == Z_size_t(0) {
  8268  		return Z_size_t(0)
  8269  	}
  8270  
  8271  	// allocate memory if this is the first time through
  8272  	if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 {
  8273  		return Z_size_t(0)
  8274  	}
  8275  
  8276  	// check for seek request
  8277  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8278  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8279  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8280  			return Z_size_t(0)
  8281  		}
  8282  	}
  8283  
  8284  	// for small len, copy to input buffer, otherwise compress directly
  8285  	if len < (*Gz_state)(unsafe.Pointer(state)).Fsize {
  8286  		// copy to input buffer, compress when full
  8287  		for __ccgo := true; __ccgo; __ccgo = len != 0 {
  8288  			var have uint32
  8289  			var copy uint32
  8290  
  8291  			if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) {
  8292  				(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  8293  			}
  8294  			have = uint32((int32((*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in+uintptr((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in)) - int32((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1)
  8295  			copy = (*Gz_state)(unsafe.Pointer(state)).Fsize - have
  8296  			if copy > len {
  8297  				copy = len
  8298  			}
  8299  			libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr(have), buf, copy)
  8300  			*(*UInt)(unsafe.Pointer(state + 100 + 4)) += copy
  8301  			*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(copy)
  8302  			buf = buf + uintptr(copy)
  8303  			len = len - copy
  8304  			if len != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8305  				return Z_size_t(0)
  8306  			}
  8307  		}
  8308  	} else {
  8309  		// consume whatever's left in the input buffer
  8310  		if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8311  			return Z_size_t(0)
  8312  		}
  8313  
  8314  		// directly compress user buffer to file
  8315  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = buf
  8316  		for __ccgo1 := true; __ccgo1; __ccgo1 = len != 0 {
  8317  			var n uint32 = libc.Uint32(libc.Uint32FromInt32(-1))
  8318  			if n > len {
  8319  				n = len
  8320  			}
  8321  			(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = n
  8322  			*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(n)
  8323  			if gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8324  				return Z_size_t(0)
  8325  			}
  8326  			len = len - n
  8327  		}
  8328  	}
  8329  
  8330  	// input was all buffered or compressed
  8331  	return put
  8332  }
  8333  
  8334  // -- see zlib.h --
  8335  func Xgzwrite(tls *libc.TLS, file GzFile, buf Voidpc, len uint32) int32 { /* gzwrite.c:246:13: */
  8336  	var state Gz_statep
  8337  
  8338  	// get internal structure
  8339  	if file == uintptr(0) {
  8340  		return 0
  8341  	}
  8342  	state = file
  8343  
  8344  	// check that we're writing and that there's no error
  8345  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8346  		return 0
  8347  	}
  8348  
  8349  	// since an int is returned, make sure len fits in one, otherwise return
  8350  	//        with an error (this avoids a flaw in the interface)
  8351  	if int32(len) < 0 {
  8352  		Xgz_error(tls, state, -3, ts+330)
  8353  		return 0
  8354  	}
  8355  
  8356  	// write len bytes from buf (the return value will fit in an int)
  8357  	return int32(gz_write(tls, state, buf, len))
  8358  }
  8359  
  8360  // -- see zlib.h --
  8361  func Xgzfwrite(tls *libc.TLS, buf Voidpc, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzwrite.c:274:18: */
  8362  	var len Z_size_t
  8363  	var state Gz_statep
  8364  
  8365  	// get internal structure
  8366  	if file == uintptr(0) {
  8367  		return Z_size_t(0)
  8368  	}
  8369  	state = file
  8370  
  8371  	// check that we're writing and that there's no error
  8372  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8373  		return Z_size_t(0)
  8374  	}
  8375  
  8376  	// compute bytes to read -- error on overflow
  8377  	len = nitems * size
  8378  	if size != 0 && len/size != nitems {
  8379  		Xgz_error(tls, state, -2, ts+227)
  8380  		return Z_size_t(0)
  8381  	}
  8382  
  8383  	// write len bytes to buf, return the number of full items written
  8384  	if len != 0 {
  8385  		return gz_write(tls, state, buf, len) / size
  8386  	}
  8387  	return uint32(0)
  8388  }
  8389  
  8390  // -- see zlib.h --
  8391  func Xgzputc(tls *libc.TLS, file GzFile, c int32) int32 { /* gzwrite.c:304:13: */
  8392  	bp := tls.Alloc(1)
  8393  	defer tls.Free(1)
  8394  
  8395  	var have uint32
  8396  	// var buf [1]uint8 at bp, 1
  8397  
  8398  	var state Gz_statep
  8399  	var strm Z_streamp
  8400  
  8401  	// get internal structure
  8402  	if file == uintptr(0) {
  8403  		return -1
  8404  	}
  8405  	state = file
  8406  	strm = state + 100
  8407  
  8408  	// check that we're writing and that there's no error
  8409  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8410  		return -1
  8411  	}
  8412  
  8413  	// check for seek request
  8414  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8415  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8416  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8417  			return -1
  8418  		}
  8419  	}
  8420  
  8421  	// try writing to input buffer for speed (state->size == 0 if buffer not
  8422  	//        initialized)
  8423  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
  8424  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
  8425  			(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  8426  		}
  8427  		have = uint32((int32((*Z_stream)(unsafe.Pointer(strm)).Fnext_in+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in)) - int32((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1)
  8428  		if have < (*Gz_state)(unsafe.Pointer(state)).Fsize {
  8429  			*(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have))) = uint8(c)
  8430  			(*Z_stream)(unsafe.Pointer(strm)).Favail_in++
  8431  			(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++
  8432  			return c & 0xff
  8433  		}
  8434  	}
  8435  
  8436  	// no room in buffer or not initialized, use gz_write()
  8437  	*(*uint8)(unsafe.Pointer(bp)) = uint8(c)
  8438  	if gz_write(tls, state, bp, uint32(1)) != Z_size_t(1) {
  8439  		return -1
  8440  	}
  8441  	return c & 0xff
  8442  }
  8443  
  8444  // -- see zlib.h --
  8445  func Xgzputs(tls *libc.TLS, file GzFile, str uintptr) int32 { /* gzwrite.c:352:13: */
  8446  	var ret int32
  8447  	var len Z_size_t
  8448  	var state Gz_statep
  8449  
  8450  	// get internal structure
  8451  	if file == uintptr(0) {
  8452  		return -1
  8453  	}
  8454  	state = file
  8455  
  8456  	// check that we're writing and that there's no error
  8457  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8458  		return -1
  8459  	}
  8460  
  8461  	// write string
  8462  	len = libc.Xstrlen(tls, str)
  8463  	ret = int32(gz_write(tls, state, str, len))
  8464  	if ret == 0 && len != Z_size_t(0) {
  8465  		return -1
  8466  	}
  8467  	return ret
  8468  }
  8469  
  8470  // -
  8471  // SPDX-License-Identifier: BSD-2-Clause
  8472  //
  8473  // Copyright (c) 2017 Poul-Henning Kamp.  All rights reserved.
  8474  //
  8475  // Redistribution and use in source and binary forms, with or without
  8476  // modification, are permitted provided that the following conditions
  8477  // are met:
  8478  // 1. Redistributions of source code must retain the above copyright
  8479  //    notice, this list of conditions and the following disclaimer.
  8480  // 2. Redistributions in binary form must reproduce the above copyright
  8481  //    notice, this list of conditions and the following disclaimer in the
  8482  //    documentation and/or other materials provided with the distribution.
  8483  //
  8484  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  8485  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  8486  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  8487  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  8488  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  8489  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  8490  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  8491  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  8492  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  8493  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  8494  // SUCH DAMAGE.
  8495  //
  8496  // $FreeBSD$
  8497  
  8498  // -- see zlib.h --
  8499  func Xgzvprintf(tls *libc.TLS, file GzFile, format uintptr, va Va_list) int32 { /* gzwrite.c:379:15: */
  8500  	var len int32
  8501  	var left uint32
  8502  	var next uintptr
  8503  	var state Gz_statep
  8504  	var strm Z_streamp
  8505  
  8506  	// get internal structure
  8507  	if file == uintptr(0) {
  8508  		return -2
  8509  	}
  8510  	state = file
  8511  	strm = state + 100
  8512  
  8513  	// check that we're writing and that there's no error
  8514  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8515  		return -2
  8516  	}
  8517  
  8518  	// make sure we have some buffer space
  8519  	if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 {
  8520  		return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8521  	}
  8522  
  8523  	// check for seek request
  8524  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8525  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8526  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8527  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8528  		}
  8529  	}
  8530  
  8531  	// do the printf() into the input buffer, put length in len -- the input
  8532  	//        buffer is double-sized just for this function, so there is guaranteed to
  8533  	//        be state->size bytes available after the current contents
  8534  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
  8535  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  8536  	}
  8537  	next = (*Gz_state)(unsafe.Pointer(state)).Fin + uintptr((int32((*Z_stream)(unsafe.Pointer(strm)).Fnext_in)-int32((*Gz_state)(unsafe.Pointer(state)).Fin))/1) + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in)
  8538  	*(*uint8)(unsafe.Pointer(next + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize-uint32(1)))) = uint8(0)
  8539  	len = libc.Xvsnprintf(tls, next, (*Gz_state)(unsafe.Pointer(state)).Fsize, format, va)
  8540  
  8541  	// check that printf() results fit in buffer
  8542  	if len == 0 || uint32(len) >= (*Gz_state)(unsafe.Pointer(state)).Fsize || int32(*(*uint8)(unsafe.Pointer(next + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize-uint32(1))))) != 0 {
  8543  		return 0
  8544  	}
  8545  
  8546  	// update buffer and position, compress first half if past that
  8547  	*(*UInt)(unsafe.Pointer(strm + 4)) += uint32(len)
  8548  	*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(len)
  8549  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in >= (*Gz_state)(unsafe.Pointer(state)).Fsize {
  8550  		left = (*Z_stream)(unsafe.Pointer(strm)).Favail_in - (*Gz_state)(unsafe.Pointer(state)).Fsize
  8551  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = (*Gz_state)(unsafe.Pointer(state)).Fsize
  8552  		if gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8553  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8554  		}
  8555  		libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize), left)
  8556  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  8557  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = left
  8558  	}
  8559  	return len
  8560  }
  8561  
  8562  func Xgzprintf(tls *libc.TLS, file GzFile, format uintptr, va uintptr) int32 { /* gzwrite.c:451:15: */
  8563  	var va1 Va_list
  8564  	_ = va1
  8565  	var ret int32
  8566  
  8567  	va1 = va
  8568  	ret = Xgzvprintf(tls, file, format, va1)
  8569  	_ = va1
  8570  	return ret
  8571  }
  8572  
  8573  // -- see zlib.h --
  8574  func Xgzflush(tls *libc.TLS, file GzFile, flush int32) int32 { /* gzwrite.c:553:13: */
  8575  	var state Gz_statep
  8576  
  8577  	// get internal structure
  8578  	if file == uintptr(0) {
  8579  		return -2
  8580  	}
  8581  	state = file
  8582  
  8583  	// check that we're writing and that there's no error
  8584  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8585  		return -2
  8586  	}
  8587  
  8588  	// check flush parameter
  8589  	if flush < 0 || flush > Z_FINISH {
  8590  		return -2
  8591  	}
  8592  
  8593  	// check for seek request
  8594  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8595  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8596  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8597  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8598  		}
  8599  	}
  8600  
  8601  	// compress remaining data with requested flush
  8602  	gz_comp(tls, state, flush)
  8603  	return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8604  }
  8605  
  8606  // -- see zlib.h --
  8607  func Xgzsetparams(tls *libc.TLS, file GzFile, level int32, strategy int32) int32 { /* gzwrite.c:585:13: */
  8608  	var state Gz_statep
  8609  	var strm Z_streamp
  8610  
  8611  	// get internal structure
  8612  	if file == uintptr(0) {
  8613  		return -2
  8614  	}
  8615  	state = file
  8616  	strm = state + 100
  8617  
  8618  	// check that we're writing and that there's no error
  8619  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8620  		return -2
  8621  	}
  8622  
  8623  	// if no change is requested, then do nothing
  8624  	if level == (*Gz_state)(unsafe.Pointer(state)).Flevel && strategy == (*Gz_state)(unsafe.Pointer(state)).Fstrategy {
  8625  		return Z_OK
  8626  	}
  8627  
  8628  	// check for seek request
  8629  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8630  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8631  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8632  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8633  		}
  8634  	}
  8635  
  8636  	// change compression parameters for subsequent input
  8637  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
  8638  		// flush previous input with previous parameters before changing
  8639  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 && gz_comp(tls, state, Z_BLOCK) == -1 {
  8640  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8641  		}
  8642  		XdeflateParams(tls, strm, level, strategy)
  8643  	}
  8644  	(*Gz_state)(unsafe.Pointer(state)).Flevel = level
  8645  	(*Gz_state)(unsafe.Pointer(state)).Fstrategy = strategy
  8646  	return Z_OK
  8647  }
  8648  
  8649  // -- see zlib.h --
  8650  func Xgzclose_w(tls *libc.TLS, file GzFile) int32 { /* gzwrite.c:627:13: */
  8651  	var ret int32 = Z_OK
  8652  	var state Gz_statep
  8653  
  8654  	// get internal structure
  8655  	if file == uintptr(0) {
  8656  		return -2
  8657  	}
  8658  	state = file
  8659  
  8660  	// check that we're writing
  8661  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  8662  		return -2
  8663  	}
  8664  
  8665  	// check for seek request
  8666  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8667  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8668  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8669  			ret = (*Gz_state)(unsafe.Pointer(state)).Ferr
  8670  		}
  8671  	}
  8672  
  8673  	// flush, free memory, and close file
  8674  	if gz_comp(tls, state, Z_FINISH) == -1 {
  8675  		ret = (*Gz_state)(unsafe.Pointer(state)).Ferr
  8676  	}
  8677  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
  8678  		if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) {
  8679  			XdeflateEnd(tls, state+100)
  8680  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  8681  		}
  8682  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  8683  	}
  8684  	Xgz_error(tls, state, Z_OK, uintptr(0))
  8685  	libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)
  8686  	if libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) == -1 {
  8687  		ret = -1
  8688  	}
  8689  	libc.Xfree(tls, state)
  8690  	return ret
  8691  }
  8692  
  8693  // Reverse the bytes in a 32-bit value
  8694  
  8695  // inftrees.h -- header to use inftrees.c
  8696  // Copyright (C) 1995-2005, 2010 Mark Adler
  8697  // For conditions of distribution and use, see copyright notice in zlib.h
  8698  
  8699  // WARNING: this file should *not* be used by applications. It is
  8700  //    part of the implementation of the compression library and is
  8701  //    subject to change. Applications should only use zlib.h.
  8702  //
  8703  
  8704  // Structure for decoding tables.  Each entry provides either the
  8705  //    information needed to do the operation requested by the code that
  8706  //    indexed that table entry, or it provides a pointer to another
  8707  //    table that indexes more bits of the code.  op indicates whether
  8708  //    the entry is a pointer to another table, a literal, a length or
  8709  //    distance, an end-of-block, or an invalid code.  For a table
  8710  //    pointer, the low four bits of op is the number of index bits of
  8711  //    that table.  For a length or distance, the low four bits of op
  8712  //    is the number of extra bits to get after the code.  bits is
  8713  //    the number of bits in this code or part of the code to drop off
  8714  //    of the bit buffer.  val is the actual byte to output in the case
  8715  //    of a literal, the base length or distance, or the offset from
  8716  //    the current table to the next table.  Each entry is four bytes.
  8717  type Code = struct {
  8718  	Fop   uint8
  8719  	Fbits uint8
  8720  	Fval  uint16
  8721  } /* inftrees.h:28:3 */
  8722  
  8723  // op values as set by inflate_table():
  8724  //     00000000 - literal
  8725  //     0000tttt - table link, tttt != 0 is the number of table index bits
  8726  //     0001eeee - length or distance, eeee is the number of extra bits
  8727  //     01100000 - end of block
  8728  //     01000000 - invalid code
  8729  //
  8730  
  8731  // Maximum size of the dynamic table.  The maximum number of code structures is
  8732  //    1444, which is the sum of 852 for literal/length codes and 592 for distance
  8733  //    codes.  These values were found by exhaustive searches using the program
  8734  //    examples/enough.c found in the zlib distribtution.  The arguments to that
  8735  //    program are the number of symbols, the initial root table size, and the
  8736  //    maximum bit length of a code.  "enough 286 9 15" for literal/length codes
  8737  //    returns returns 852, and "enough 30 6 15" for distance codes returns 592.
  8738  //    The initial root table size (9 or 6) is found in the fifth argument of the
  8739  //    inflate_table() calls in inflate.c and infback.c.  If the root table size is
  8740  //    changed, then these maximum sizes would be need to be recalculated and
  8741  //    updated.
  8742  
  8743  // Type of code to build for inflate_table()
  8744  type Codetype = uint32 /* inftrees.h:58:3 */
  8745  // inflate.h -- internal inflate state definition
  8746  // Copyright (C) 1995-2016 Mark Adler
  8747  // For conditions of distribution and use, see copyright notice in zlib.h
  8748  
  8749  // WARNING: this file should *not* be used by applications. It is
  8750  //    part of the implementation of the compression library and is
  8751  //    subject to change. Applications should only use zlib.h.
  8752  //
  8753  
  8754  // define NO_GZIP when compiling if you want to disable gzip header and
  8755  //    trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
  8756  //    the crc code when it is not needed.  For shared libraries, gzip decoding
  8757  //    should be left enabled.
  8758  
  8759  // Possible inflate modes between inflate() calls
  8760  type Inflate_mode = uint32 /* inflate.h:53:3 */
  8761  
  8762  //
  8763  //     State transitions between above modes -
  8764  //
  8765  //     (most modes can go to BAD or MEM on error -- not shown for clarity)
  8766  //
  8767  //     Process header:
  8768  //         HEAD -> (gzip) or (zlib) or (raw)
  8769  //         (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT ->
  8770  //                   HCRC -> TYPE
  8771  //         (zlib) -> DICTID or TYPE
  8772  //         DICTID -> DICT -> TYPE
  8773  //         (raw) -> TYPEDO
  8774  //     Read deflate blocks:
  8775  //             TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK
  8776  //             STORED -> COPY_ -> COPY -> TYPE
  8777  //             TABLE -> LENLENS -> CODELENS -> LEN_
  8778  //             LEN_ -> LEN
  8779  //     Read deflate codes in fixed or dynamic block:
  8780  //                 LEN -> LENEXT or LIT or TYPE
  8781  //                 LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
  8782  //                 LIT -> LEN
  8783  //     Process trailer:
  8784  //         CHECK -> LENGTH -> DONE
  8785  //
  8786  
  8787  // State maintained between inflate() calls -- approximately 7K bytes, not
  8788  //    including the allocated sliding window, which is up to 32K bytes.
  8789  type Inflate_state = struct {
  8790  	Fstrm     Z_streamp
  8791  	Fmode     Inflate_mode
  8792  	Flast     int32
  8793  	Fwrap     int32
  8794  	Fhavedict int32
  8795  	Fflags    int32
  8796  	Fdmax     uint32
  8797  	Fcheck    uint32
  8798  	Ftotal    uint32
  8799  	Fhead     Gz_headerp
  8800  	Fwbits    uint32
  8801  	Fwsize    uint32
  8802  	Fwhave    uint32
  8803  	Fwnext    uint32
  8804  	Fwindow   uintptr
  8805  	Fhold     uint32
  8806  	Fbits     uint32
  8807  	Flength   uint32
  8808  	Foffset   uint32
  8809  	Fextra    uint32
  8810  	Flencode  uintptr
  8811  	Fdistcode uintptr
  8812  	Flenbits  uint32
  8813  	Fdistbits uint32
  8814  	Fncode    uint32
  8815  	Fnlen     uint32
  8816  	Fndist    uint32
  8817  	Fhave     uint32
  8818  	Fnext     uintptr
  8819  	Flens     [320]uint16
  8820  	Fwork     [288]uint16
  8821  	Fcodes    [1444]Code
  8822  	Fsane     int32
  8823  	Fback     int32
  8824  	Fwas      uint32
  8825  } /* inflate.h:82:1 */
  8826  
  8827  //
  8828  //    strm provides memory allocation functions in zalloc and zfree, or
  8829  //    Z_NULL to use the library memory allocation functions.
  8830  //
  8831  //    windowBits is in the range 8..15, and window is a user-supplied
  8832  //    window and output buffer that is 2**windowBits bytes.
  8833  //
  8834  func XinflateBackInit_(tls *libc.TLS, strm Z_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) int32 { /* infback.c:28:13: */
  8835  	var state uintptr
  8836  
  8837  	if version == uintptr(Z_NULL) || int32(*(*uint8)(unsafe.Pointer(version))) != int32(*(*uint8)(unsafe.Pointer(ts))) || stream_size != int32(unsafe.Sizeof(Z_stream{})) {
  8838  		return -6
  8839  	}
  8840  	if strm == uintptr(Z_NULL) || window == uintptr(Z_NULL) || windowBits < 8 || windowBits > 15 {
  8841  		return -2
  8842  	}
  8843  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error
  8844  	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
  8845  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
  8846  			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
  8847  		}{Xzcalloc}))
  8848  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
  8849  	}
  8850  	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
  8851  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
  8852  			f func(*libc.TLS, Voidpf, Voidpf)
  8853  		}{Xzcfree}))
  8854  	}
  8855  	state = (*struct {
  8856  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  8857  	})(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{})))
  8858  	if state == uintptr(Z_NULL) {
  8859  		return -4
  8860  	}
  8861  
  8862  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = state
  8863  	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768
  8864  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = UInt(windowBits)
  8865  	(*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << windowBits
  8866  	(*Inflate_state)(unsafe.Pointer(state)).Fwindow = window
  8867  	(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
  8868  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
  8869  	return Z_OK
  8870  }
  8871  
  8872  //
  8873  //    Return state with length and distance decoding tables and index sizes set to
  8874  //    fixed code decoding.  Normally this returns fixed tables from inffixed.h.
  8875  //    If BUILDFIXED is defined, then instead this routine builds the tables the
  8876  //    first time it's called, and returns those tables the first time and
  8877  //    thereafter.  This reduces the size of the code by about 2K bytes, in
  8878  //    exchange for a little execution time.  However, BUILDFIXED should not be
  8879  //    used for threaded applications, since the rewriting of the tables and virgin
  8880  //    may not be thread-safe.
  8881  //
  8882  func fixedtables(tls *libc.TLS, state uintptr) { /* infback.c:82:12: */
  8883  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix))
  8884  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
  8885  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix))
  8886  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5)
  8887  }
  8888  
  8889  var lenfix = [512]Code{
  8890  	{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)},
  8891  	{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)},
  8892  	{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)},
  8893  	{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)},
  8894  	{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)},
  8895  	{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)},
  8896  	{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)},
  8897  	{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)},
  8898  	{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)},
  8899  	{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)},
  8900  	{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)},
  8901  	{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)},
  8902  	{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)},
  8903  	{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)},
  8904  	{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)},
  8905  	{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)},
  8906  	{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)},
  8907  	{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)},
  8908  	{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)},
  8909  	{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)},
  8910  	{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)},
  8911  	{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)},
  8912  	{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)},
  8913  	{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)},
  8914  	{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)},
  8915  	{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)},
  8916  	{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)},
  8917  	{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)},
  8918  	{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)},
  8919  	{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)},
  8920  	{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)},
  8921  	{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)},
  8922  	{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)},
  8923  	{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)},
  8924  	{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)},
  8925  	{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)},
  8926  	{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)},
  8927  	{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)},
  8928  	{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)},
  8929  	{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)},
  8930  	{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)},
  8931  	{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)},
  8932  	{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)},
  8933  	{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)},
  8934  	{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)},
  8935  	{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)},
  8936  	{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)},
  8937  	{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)},
  8938  	{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)},
  8939  	{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)},
  8940  	{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)},
  8941  	{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)},
  8942  	{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)},
  8943  	{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)},
  8944  	{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)},
  8945  	{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)},
  8946  	{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)},
  8947  	{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)},
  8948  	{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)},
  8949  	{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)},
  8950  	{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)},
  8951  	{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)},
  8952  	{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)},
  8953  	{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)},
  8954  	{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)},
  8955  	{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)},
  8956  	{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)},
  8957  	{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)},
  8958  	{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)},
  8959  	{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)},
  8960  	{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)},
  8961  	{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)},
  8962  	{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)},
  8963  	{Fbits: uint8(9), Fval: uint16(255)},
  8964  } /* inffixed.h:10:23 */
  8965  var distfix = [32]Code{
  8966  	{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)},
  8967  	{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)},
  8968  	{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)},
  8969  	{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)},
  8970  	{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)},
  8971  	{Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)},
  8972  } /* inffixed.h:87:23 */
  8973  
  8974  // Macros for inflateBack():
  8975  
  8976  // Load returned state from inflate_fast()
  8977  
  8978  // Set state from registers for inflate_fast()
  8979  
  8980  // Clear the input bit accumulator
  8981  
  8982  // Assure that some input is available.  If input is requested, but denied,
  8983  //    then return a Z_BUF_ERROR from inflateBack().
  8984  
  8985  // Get a byte of input into the bit accumulator, or return from inflateBack()
  8986  //    with an error if there is no input available.
  8987  
  8988  // Assure that there are at least n bits in the bit accumulator.  If there is
  8989  //    not enough available input to do that, then return from inflateBack() with
  8990  //    an error.
  8991  
  8992  // Return the low n bits of the bit accumulator (n < 16)
  8993  
  8994  // Remove n bits from the bit accumulator
  8995  
  8996  // Remove zero to seven bits as needed to go to a byte boundary
  8997  
  8998  // Assure that some output space is available, by writing out the window
  8999  //    if it's full.  If the write fails, return from inflateBack() with a
  9000  //    Z_BUF_ERROR.
  9001  
  9002  //
  9003  //    strm provides the memory allocation functions and window buffer on input,
  9004  //    and provides information on the unused input on return.  For Z_DATA_ERROR
  9005  //    returns, strm will also provide an error message.
  9006  //
  9007  //    in() and out() are the call-back input and output functions.  When
  9008  //    inflateBack() needs more input, it calls in().  When inflateBack() has
  9009  //    filled the window with output, or when it completes with data in the
  9010  //    window, it calls out() to write out the data.  The application must not
  9011  //    change the provided input until in() is called again or inflateBack()
  9012  //    returns.  The application must not change the window/output buffer until
  9013  //    inflateBack() returns.
  9014  //
  9015  //    in() and out() are called with a descriptor parameter provided in the
  9016  //    inflateBack() call.  This parameter can be a structure that provides the
  9017  //    information required to do the read or write, as well as accumulated
  9018  //    information on the input and output such as totals and check values.
  9019  //
  9020  //    in() should return zero on failure.  out() should return non-zero on
  9021  //    failure.  If either in() or out() fails, than inflateBack() returns a
  9022  //    Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
  9023  //    was in() or out() that caused in the error.  Otherwise,  inflateBack()
  9024  //    returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
  9025  //    error, or Z_MEM_ERROR if it could not allocate memory for the state.
  9026  //    inflateBack() can also return Z_STREAM_ERROR if the input parameters
  9027  //    are not correct, i.e. strm is Z_NULL or the state was not initialized.
  9028  //
  9029  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: */
  9030  	bp := tls.Alloc(4)
  9031  	defer tls.Free(4)
  9032  
  9033  	var state uintptr
  9034  	// var next uintptr at bp, 4
  9035  	// next input
  9036  	var put uintptr // next output
  9037  	var have uint32
  9038  	var left uint32  // available input and output
  9039  	var hold uint32  // bit buffer
  9040  	var bits uint32  // bits in bit buffer
  9041  	var copy uint32  // number of stored or match bytes to copy
  9042  	var from uintptr // where to copy match bytes from
  9043  	var here Code    // current decoding table entry
  9044  	var last Code    // parent table entry
  9045  	var len uint32   // length to copy for repeats, bits to drop
  9046  	var ret int32
  9047  
  9048  	// Check that the strm exists and that the state was initialized
  9049  	if !(strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL)) {
  9050  		goto __1
  9051  	}
  9052  	return -2
  9053  __1:
  9054  	;
  9055  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  9056  
  9057  	// Reset the state
  9058  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
  9059  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
  9060  	(*Inflate_state)(unsafe.Pointer(state)).Flast = 0
  9061  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
  9062  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
  9063  	if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(Z_NULL) {
  9064  		have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  9065  	} else {
  9066  		have = uint32(0)
  9067  	}
  9068  	hold = uint32(0)
  9069  	bits = uint32(0)
  9070  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
  9071  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
  9072  
  9073  	// Inflate until end of block marked as last
  9074  __2:
  9075  	switch (*Inflate_state)(unsafe.Pointer(state)).Fmode {
  9076  	case TYPE:
  9077  		goto __6
  9078  
  9079  	case STORED:
  9080  		goto __7
  9081  
  9082  	case TABLE:
  9083  		goto __8
  9084  
  9085  	case LEN:
  9086  		goto __9
  9087  
  9088  	case DONE:
  9089  		goto __10
  9090  
  9091  	case BAD:
  9092  		goto __11
  9093  
  9094  	default:
  9095  		goto __12
  9096  	}
  9097  	goto __5
  9098  __6:
  9099  	// determine and dispatch block type
  9100  	if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) {
  9101  		goto __13
  9102  	}
  9103  __14:
  9104  	hold >>= bits & uint32(7)
  9105  	bits = bits - bits&uint32(7)
  9106  	goto __15
  9107  __15:
  9108  	if 0 != 0 {
  9109  		goto __14
  9110  	}
  9111  	goto __16
  9112  __16:
  9113  	;
  9114  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE
  9115  	goto __5
  9116  __13:
  9117  	;
  9118  __17:
  9119  __20:
  9120  	if !(bits < uint32(3)) {
  9121  		goto __21
  9122  	}
  9123  __22:
  9124  __25:
  9125  	if !(have == uint32(0)) {
  9126  		goto __28
  9127  	}
  9128  	have = (*struct {
  9129  		f func(*libc.TLS, uintptr, uintptr) uint32
  9130  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9131  	if !(have == uint32(0)) {
  9132  		goto __29
  9133  	}
  9134  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9135  	ret = -5
  9136  	goto inf_leave
  9137  __29:
  9138  	;
  9139  __28:
  9140  	;
  9141  	goto __26
  9142  __26:
  9143  	if 0 != 0 {
  9144  		goto __25
  9145  	}
  9146  	goto __27
  9147  __27:
  9148  	;
  9149  	have--
  9150  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9151  	bits = bits + uint32(8)
  9152  	goto __23
  9153  __23:
  9154  	if 0 != 0 {
  9155  		goto __22
  9156  	}
  9157  	goto __24
  9158  __24:
  9159  	;
  9160  	goto __20
  9161  __21:
  9162  	;
  9163  	goto __18
  9164  __18:
  9165  	if 0 != 0 {
  9166  		goto __17
  9167  	}
  9168  	goto __19
  9169  __19:
  9170  	;
  9171  	(*Inflate_state)(unsafe.Pointer(state)).Flast = int32(uint32(hold) & (uint32(1)<<1 - uint32(1)))
  9172  __30:
  9173  	hold >>= 1
  9174  	bits = bits - uint32(1)
  9175  	goto __31
  9176  __31:
  9177  	if 0 != 0 {
  9178  		goto __30
  9179  	}
  9180  	goto __32
  9181  __32:
  9182  	;
  9183  	switch uint32(hold) & (uint32(1)<<2 - uint32(1)) {
  9184  	case uint32(0):
  9185  		goto __34
  9186  	case uint32(1):
  9187  		goto __35
  9188  	case uint32(2):
  9189  		goto __36
  9190  	case uint32(3):
  9191  		goto __37
  9192  	}
  9193  	goto __33
  9194  __34: // stored block
  9195  	;
  9196  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED
  9197  	goto __33
  9198  __35: // fixed block
  9199  	fixedtables(tls, state)
  9200  
  9201  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN // decode codes
  9202  	goto __33
  9203  __36: // dynamic block
  9204  	;
  9205  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE
  9206  	goto __33
  9207  __37:
  9208  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */
  9209  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9210  __33:
  9211  	;
  9212  __38:
  9213  	hold >>= 2
  9214  	bits = bits - uint32(2)
  9215  	goto __39
  9216  __39:
  9217  	if 0 != 0 {
  9218  		goto __38
  9219  	}
  9220  	goto __40
  9221  __40:
  9222  	;
  9223  	goto __5
  9224  
  9225  __7:
  9226  	// get and verify stored block length
  9227  __41:
  9228  	hold >>= bits & uint32(7)
  9229  	bits = bits - bits&uint32(7)
  9230  	goto __42
  9231  __42:
  9232  	if 0 != 0 {
  9233  		goto __41
  9234  	}
  9235  	goto __43
  9236  __43:
  9237  	; // go to byte boundary
  9238  __44:
  9239  __47:
  9240  	if !(bits < uint32(32)) {
  9241  		goto __48
  9242  	}
  9243  __49:
  9244  __52:
  9245  	if !(have == uint32(0)) {
  9246  		goto __55
  9247  	}
  9248  	have = (*struct {
  9249  		f func(*libc.TLS, uintptr, uintptr) uint32
  9250  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9251  	if !(have == uint32(0)) {
  9252  		goto __56
  9253  	}
  9254  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9255  	ret = -5
  9256  	goto inf_leave
  9257  __56:
  9258  	;
  9259  __55:
  9260  	;
  9261  	goto __53
  9262  __53:
  9263  	if 0 != 0 {
  9264  		goto __52
  9265  	}
  9266  	goto __54
  9267  __54:
  9268  	;
  9269  	have--
  9270  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9271  	bits = bits + uint32(8)
  9272  	goto __50
  9273  __50:
  9274  	if 0 != 0 {
  9275  		goto __49
  9276  	}
  9277  	goto __51
  9278  __51:
  9279  	;
  9280  	goto __47
  9281  __48:
  9282  	;
  9283  	goto __45
  9284  __45:
  9285  	if 0 != 0 {
  9286  		goto __44
  9287  	}
  9288  	goto __46
  9289  __46:
  9290  	;
  9291  	if !(hold&uint32(0xffff) != hold>>16^uint32(0xffff)) {
  9292  		goto __57
  9293  	}
  9294  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */
  9295  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9296  	goto __5
  9297  __57:
  9298  	;
  9299  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff)
  9300  
  9301  __58:
  9302  	hold = uint32(0)
  9303  	bits = uint32(0)
  9304  	goto __59
  9305  __59:
  9306  	if 0 != 0 {
  9307  		goto __58
  9308  	}
  9309  	goto __60
  9310  __60:
  9311  	;
  9312  
  9313  	// copy stored block from input to output
  9314  __61:
  9315  	if !((*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0)) {
  9316  		goto __62
  9317  	}
  9318  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
  9319  __63:
  9320  	if !(have == uint32(0)) {
  9321  		goto __66
  9322  	}
  9323  	have = (*struct {
  9324  		f func(*libc.TLS, uintptr, uintptr) uint32
  9325  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9326  	if !(have == uint32(0)) {
  9327  		goto __67
  9328  	}
  9329  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9330  	ret = -5
  9331  	goto inf_leave
  9332  __67:
  9333  	;
  9334  __66:
  9335  	;
  9336  	goto __64
  9337  __64:
  9338  	if 0 != 0 {
  9339  		goto __63
  9340  	}
  9341  	goto __65
  9342  __65:
  9343  	;
  9344  __68:
  9345  	if !(left == uint32(0)) {
  9346  		goto __71
  9347  	}
  9348  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
  9349  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
  9350  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
  9351  	if !((*struct {
  9352  		f func(*libc.TLS, uintptr, uintptr, uint32) int32
  9353  	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) {
  9354  		goto __72
  9355  	}
  9356  	ret = -5
  9357  	goto inf_leave
  9358  __72:
  9359  	;
  9360  __71:
  9361  	;
  9362  	goto __69
  9363  __69:
  9364  	if 0 != 0 {
  9365  		goto __68
  9366  	}
  9367  	goto __70
  9368  __70:
  9369  	;
  9370  	if !(copy > have) {
  9371  		goto __73
  9372  	}
  9373  	copy = have
  9374  __73:
  9375  	;
  9376  	if !(copy > left) {
  9377  		goto __74
  9378  	}
  9379  	copy = left
  9380  __74:
  9381  	;
  9382  	libc.Xmemcpy(tls, put, *(*uintptr)(unsafe.Pointer(bp /* next */)), copy)
  9383  	have = have - copy
  9384  	*(*uintptr)(unsafe.Pointer(bp /* next */)) += uintptr(copy)
  9385  	left = left - copy
  9386  	put += uintptr(copy)
  9387  	*(*uint32)(unsafe.Pointer(state + 68)) -= copy
  9388  	goto __61
  9389  __62:
  9390  	;
  9391  
  9392  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
  9393  	goto __5
  9394  
  9395  __8:
  9396  	// get dynamic table entries descriptor
  9397  __75:
  9398  __78:
  9399  	if !(bits < uint32(14)) {
  9400  		goto __79
  9401  	}
  9402  __80:
  9403  __83:
  9404  	if !(have == uint32(0)) {
  9405  		goto __86
  9406  	}
  9407  	have = (*struct {
  9408  		f func(*libc.TLS, uintptr, uintptr) uint32
  9409  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9410  	if !(have == uint32(0)) {
  9411  		goto __87
  9412  	}
  9413  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9414  	ret = -5
  9415  	goto inf_leave
  9416  __87:
  9417  	;
  9418  __86:
  9419  	;
  9420  	goto __84
  9421  __84:
  9422  	if 0 != 0 {
  9423  		goto __83
  9424  	}
  9425  	goto __85
  9426  __85:
  9427  	;
  9428  	have--
  9429  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9430  	bits = bits + uint32(8)
  9431  	goto __81
  9432  __81:
  9433  	if 0 != 0 {
  9434  		goto __80
  9435  	}
  9436  	goto __82
  9437  __82:
  9438  	;
  9439  	goto __78
  9440  __79:
  9441  	;
  9442  	goto __76
  9443  __76:
  9444  	if 0 != 0 {
  9445  		goto __75
  9446  	}
  9447  	goto __77
  9448  __77:
  9449  	;
  9450  	(*Inflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(257)
  9451  __88:
  9452  	hold >>= 5
  9453  	bits = bits - uint32(5)
  9454  	goto __89
  9455  __89:
  9456  	if 0 != 0 {
  9457  		goto __88
  9458  	}
  9459  	goto __90
  9460  __90:
  9461  	;
  9462  	(*Inflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(1)
  9463  __91:
  9464  	hold >>= 5
  9465  	bits = bits - uint32(5)
  9466  	goto __92
  9467  __92:
  9468  	if 0 != 0 {
  9469  		goto __91
  9470  	}
  9471  	goto __93
  9472  __93:
  9473  	;
  9474  	(*Inflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(4)
  9475  __94:
  9476  	hold >>= 4
  9477  	bits = bits - uint32(4)
  9478  	goto __95
  9479  __95:
  9480  	if 0 != 0 {
  9481  		goto __94
  9482  	}
  9483  	goto __96
  9484  __96:
  9485  	;
  9486  	if !((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30)) {
  9487  		goto __97
  9488  	}
  9489  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */
  9490  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9491  	goto __5
  9492  __97:
  9493  	;
  9494  
  9495  	// get code length code lengths (not a typo)
  9496  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
  9497  __98:
  9498  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) {
  9499  		goto __99
  9500  	}
  9501  __100:
  9502  __103:
  9503  	if !(bits < uint32(3)) {
  9504  		goto __104
  9505  	}
  9506  __105:
  9507  __108:
  9508  	if !(have == uint32(0)) {
  9509  		goto __111
  9510  	}
  9511  	have = (*struct {
  9512  		f func(*libc.TLS, uintptr, uintptr) uint32
  9513  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9514  	if !(have == uint32(0)) {
  9515  		goto __112
  9516  	}
  9517  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9518  	ret = -5
  9519  	goto inf_leave
  9520  __112:
  9521  	;
  9522  __111:
  9523  	;
  9524  	goto __109
  9525  __109:
  9526  	if 0 != 0 {
  9527  		goto __108
  9528  	}
  9529  	goto __110
  9530  __110:
  9531  	;
  9532  	have--
  9533  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9534  	bits = bits + uint32(8)
  9535  	goto __106
  9536  __106:
  9537  	if 0 != 0 {
  9538  		goto __105
  9539  	}
  9540  	goto __107
  9541  __107:
  9542  	;
  9543  	goto __103
  9544  __104:
  9545  	;
  9546  	goto __101
  9547  __101:
  9548  	if 0 != 0 {
  9549  		goto __100
  9550  	}
  9551  	goto __102
  9552  __102:
  9553  	;
  9554  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(uint32(hold) & (uint32(1)<<3 - uint32(1)))
  9555  __113:
  9556  	hold >>= 3
  9557  	bits = bits - uint32(3)
  9558  	goto __114
  9559  __114:
  9560  	if 0 != 0 {
  9561  		goto __113
  9562  	}
  9563  	goto __115
  9564  __115:
  9565  	;
  9566  	goto __98
  9567  __99:
  9568  	;
  9569  __116:
  9570  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) {
  9571  		goto __117
  9572  	}
  9573  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0)
  9574  	goto __116
  9575  __117:
  9576  	;
  9577  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */
  9578  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
  9579  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7)
  9580  	ret = Xinflate_table(tls, CODES, state+116, uint32(19), state+112,
  9581  		state+88, state+756)
  9582  	if !(ret != 0) {
  9583  		goto __118
  9584  	}
  9585  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */
  9586  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9587  	goto __5
  9588  __118:
  9589  	;
  9590  
  9591  	// get length and distance code code lengths
  9592  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
  9593  __119:
  9594  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
  9595  		goto __120
  9596  	}
  9597  __121:
  9598  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
  9599  	if !(uint32(here.Fbits) <= bits) {
  9600  		goto __124
  9601  	}
  9602  	goto __123
  9603  __124:
  9604  	;
  9605  __125:
  9606  __128:
  9607  	if !(have == uint32(0)) {
  9608  		goto __131
  9609  	}
  9610  	have = (*struct {
  9611  		f func(*libc.TLS, uintptr, uintptr) uint32
  9612  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9613  	if !(have == uint32(0)) {
  9614  		goto __132
  9615  	}
  9616  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9617  	ret = -5
  9618  	goto inf_leave
  9619  __132:
  9620  	;
  9621  __131:
  9622  	;
  9623  	goto __129
  9624  __129:
  9625  	if 0 != 0 {
  9626  		goto __128
  9627  	}
  9628  	goto __130
  9629  __130:
  9630  	;
  9631  	have--
  9632  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9633  	bits = bits + uint32(8)
  9634  	goto __126
  9635  __126:
  9636  	if 0 != 0 {
  9637  		goto __125
  9638  	}
  9639  	goto __127
  9640  __127:
  9641  	;
  9642  	goto __122
  9643  __122:
  9644  	goto __121
  9645  	goto __123
  9646  __123:
  9647  	;
  9648  	if !(int32(here.Fval) < 16) {
  9649  		goto __133
  9650  	}
  9651  __135:
  9652  	hold >>= int32(here.Fbits)
  9653  	bits = bits - uint32(here.Fbits)
  9654  	goto __136
  9655  __136:
  9656  	if 0 != 0 {
  9657  		goto __135
  9658  	}
  9659  	goto __137
  9660  __137:
  9661  	;
  9662  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval
  9663  	goto __134
  9664  __133:
  9665  	if !(int32(here.Fval) == 16) {
  9666  		goto __138
  9667  	}
  9668  __140:
  9669  __143:
  9670  	if !(bits < uint32(int32(here.Fbits)+2)) {
  9671  		goto __144
  9672  	}
  9673  __145:
  9674  __148:
  9675  	if !(have == uint32(0)) {
  9676  		goto __151
  9677  	}
  9678  	have = (*struct {
  9679  		f func(*libc.TLS, uintptr, uintptr) uint32
  9680  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9681  	if !(have == uint32(0)) {
  9682  		goto __152
  9683  	}
  9684  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9685  	ret = -5
  9686  	goto inf_leave
  9687  __152:
  9688  	;
  9689  __151:
  9690  	;
  9691  	goto __149
  9692  __149:
  9693  	if 0 != 0 {
  9694  		goto __148
  9695  	}
  9696  	goto __150
  9697  __150:
  9698  	;
  9699  	have--
  9700  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9701  	bits = bits + uint32(8)
  9702  	goto __146
  9703  __146:
  9704  	if 0 != 0 {
  9705  		goto __145
  9706  	}
  9707  	goto __147
  9708  __147:
  9709  	;
  9710  	goto __143
  9711  __144:
  9712  	;
  9713  	goto __141
  9714  __141:
  9715  	if 0 != 0 {
  9716  		goto __140
  9717  	}
  9718  	goto __142
  9719  __142:
  9720  	;
  9721  __153:
  9722  	hold >>= int32(here.Fbits)
  9723  	bits = bits - uint32(here.Fbits)
  9724  	goto __154
  9725  __154:
  9726  	if 0 != 0 {
  9727  		goto __153
  9728  	}
  9729  	goto __155
  9730  __155:
  9731  	;
  9732  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) {
  9733  		goto __156
  9734  	}
  9735  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
  9736  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9737  	goto __120
  9738  __156:
  9739  	;
  9740  	len = uint32(*(*uint16)(unsafe.Pointer(state + 116 + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2)))
  9741  	copy = uint32(3) + uint32(hold)&(uint32(1)<<2-uint32(1))
  9742  __157:
  9743  	hold >>= 2
  9744  	bits = bits - uint32(2)
  9745  	goto __158
  9746  __158:
  9747  	if 0 != 0 {
  9748  		goto __157
  9749  	}
  9750  	goto __159
  9751  __159:
  9752  	;
  9753  	goto __139
  9754  __138:
  9755  	if !(int32(here.Fval) == 17) {
  9756  		goto __160
  9757  	}
  9758  __162:
  9759  __165:
  9760  	if !(bits < uint32(int32(here.Fbits)+3)) {
  9761  		goto __166
  9762  	}
  9763  __167:
  9764  __170:
  9765  	if !(have == uint32(0)) {
  9766  		goto __173
  9767  	}
  9768  	have = (*struct {
  9769  		f func(*libc.TLS, uintptr, uintptr) uint32
  9770  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9771  	if !(have == uint32(0)) {
  9772  		goto __174
  9773  	}
  9774  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9775  	ret = -5
  9776  	goto inf_leave
  9777  __174:
  9778  	;
  9779  __173:
  9780  	;
  9781  	goto __171
  9782  __171:
  9783  	if 0 != 0 {
  9784  		goto __170
  9785  	}
  9786  	goto __172
  9787  __172:
  9788  	;
  9789  	have--
  9790  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9791  	bits = bits + uint32(8)
  9792  	goto __168
  9793  __168:
  9794  	if 0 != 0 {
  9795  		goto __167
  9796  	}
  9797  	goto __169
  9798  __169:
  9799  	;
  9800  	goto __165
  9801  __166:
  9802  	;
  9803  	goto __163
  9804  __163:
  9805  	if 0 != 0 {
  9806  		goto __162
  9807  	}
  9808  	goto __164
  9809  __164:
  9810  	;
  9811  __175:
  9812  	hold >>= int32(here.Fbits)
  9813  	bits = bits - uint32(here.Fbits)
  9814  	goto __176
  9815  __176:
  9816  	if 0 != 0 {
  9817  		goto __175
  9818  	}
  9819  	goto __177
  9820  __177:
  9821  	;
  9822  	len = uint32(0)
  9823  	copy = uint32(3) + uint32(hold)&(uint32(1)<<3-uint32(1))
  9824  __178:
  9825  	hold >>= 3
  9826  	bits = bits - uint32(3)
  9827  	goto __179
  9828  __179:
  9829  	if 0 != 0 {
  9830  		goto __178
  9831  	}
  9832  	goto __180
  9833  __180:
  9834  	;
  9835  	goto __161
  9836  __160:
  9837  __181:
  9838  __184:
  9839  	if !(bits < uint32(int32(here.Fbits)+7)) {
  9840  		goto __185
  9841  	}
  9842  __186:
  9843  __189:
  9844  	if !(have == uint32(0)) {
  9845  		goto __192
  9846  	}
  9847  	have = (*struct {
  9848  		f func(*libc.TLS, uintptr, uintptr) uint32
  9849  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9850  	if !(have == uint32(0)) {
  9851  		goto __193
  9852  	}
  9853  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9854  	ret = -5
  9855  	goto inf_leave
  9856  __193:
  9857  	;
  9858  __192:
  9859  	;
  9860  	goto __190
  9861  __190:
  9862  	if 0 != 0 {
  9863  		goto __189
  9864  	}
  9865  	goto __191
  9866  __191:
  9867  	;
  9868  	have--
  9869  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9870  	bits = bits + uint32(8)
  9871  	goto __187
  9872  __187:
  9873  	if 0 != 0 {
  9874  		goto __186
  9875  	}
  9876  	goto __188
  9877  __188:
  9878  	;
  9879  	goto __184
  9880  __185:
  9881  	;
  9882  	goto __182
  9883  __182:
  9884  	if 0 != 0 {
  9885  		goto __181
  9886  	}
  9887  	goto __183
  9888  __183:
  9889  	;
  9890  __194:
  9891  	hold >>= int32(here.Fbits)
  9892  	bits = bits - uint32(here.Fbits)
  9893  	goto __195
  9894  __195:
  9895  	if 0 != 0 {
  9896  		goto __194
  9897  	}
  9898  	goto __196
  9899  __196:
  9900  	;
  9901  	len = uint32(0)
  9902  	copy = uint32(11) + uint32(hold)&(uint32(1)<<7-uint32(1))
  9903  __197:
  9904  	hold >>= 7
  9905  	bits = bits - uint32(7)
  9906  	goto __198
  9907  __198:
  9908  	if 0 != 0 {
  9909  		goto __197
  9910  	}
  9911  	goto __199
  9912  __199:
  9913  	;
  9914  __161:
  9915  	;
  9916  __139:
  9917  	;
  9918  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave+copy > (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
  9919  		goto __200
  9920  	}
  9921  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
  9922  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9923  	goto __120
  9924  __200:
  9925  	;
  9926  __201:
  9927  	if !(libc.PostDecUint32(&copy, 1) != 0) {
  9928  		goto __202
  9929  	}
  9930  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len)
  9931  	goto __201
  9932  __202:
  9933  	;
  9934  __134:
  9935  	;
  9936  	goto __119
  9937  __120:
  9938  	;
  9939  
  9940  	// handle error breaks in while
  9941  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) {
  9942  		goto __203
  9943  	}
  9944  	goto __5
  9945  __203:
  9946  	;
  9947  
  9948  	// check for end-of-block code (better have one)
  9949  	if !(int32(*(*uint16)(unsafe.Pointer(state + 116 + 256*2))) == 0) {
  9950  		goto __204
  9951  	}
  9952  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */
  9953  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9954  	goto __5
  9955  __204:
  9956  	;
  9957  
  9958  	// build code tables -- note: do not change the lenbits or distbits
  9959  	//                values here (9 and 6) without reading the comments in inftrees.h
  9960  	//                concerning the ENOUGH constants, which depend on those values
  9961  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */
  9962  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
  9963  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
  9964  	ret = Xinflate_table(tls, LENS, state+116, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, state+112,
  9965  		state+88, state+756)
  9966  	if !(ret != 0) {
  9967  		goto __205
  9968  	}
  9969  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */
  9970  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9971  	goto __5
  9972  __205:
  9973  	;
  9974  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
  9975  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6)
  9976  	ret = Xinflate_table(tls, DISTS, state+116+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Inflate_state)(unsafe.Pointer(state)).Fndist,
  9977  		state+112, state+92, state+756)
  9978  	if !(ret != 0) {
  9979  		goto __206
  9980  	}
  9981  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */
  9982  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9983  	goto __5
  9984  __206:
  9985  	;
  9986  
  9987  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
  9988  
  9989  __9:
  9990  	// use inflate_fast() if we have enough input and output
  9991  	if !(have >= uint32(6) && left >= uint32(258)) {
  9992  		goto __207
  9993  	}
  9994  __208:
  9995  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
  9996  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
  9997  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */))
  9998  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
  9999  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 10000  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 10001  	goto __209
 10002  __209:
 10003  	if 0 != 0 {
 10004  		goto __208
 10005  	}
 10006  	goto __210
 10007  __210:
 10008  	;
 10009  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) {
 10010  		goto __211
 10011  	}
 10012  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - left
 10013  __211:
 10014  	;
 10015  	Xinflate_fast(tls, strm, (*Inflate_state)(unsafe.Pointer(state)).Fwsize)
 10016  __212:
 10017  	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 10018  	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 10019  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 10020  	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 10021  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 10022  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 10023  	goto __213
 10024  __213:
 10025  	if 0 != 0 {
 10026  		goto __212
 10027  	}
 10028  	goto __214
 10029  __214:
 10030  	;
 10031  	goto __5
 10032  __207:
 10033  	;
 10034  
 10035  	// get a literal, length, or end-of-block code
 10036  __215:
 10037  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
 10038  	if !(uint32(here.Fbits) <= bits) {
 10039  		goto __218
 10040  	}
 10041  	goto __217
 10042  __218:
 10043  	;
 10044  __219:
 10045  __222:
 10046  	if !(have == uint32(0)) {
 10047  		goto __225
 10048  	}
 10049  	have = (*struct {
 10050  		f func(*libc.TLS, uintptr, uintptr) uint32
 10051  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10052  	if !(have == uint32(0)) {
 10053  		goto __226
 10054  	}
 10055  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10056  	ret = -5
 10057  	goto inf_leave
 10058  __226:
 10059  	;
 10060  __225:
 10061  	;
 10062  	goto __223
 10063  __223:
 10064  	if 0 != 0 {
 10065  		goto __222
 10066  	}
 10067  	goto __224
 10068  __224:
 10069  	;
 10070  	have--
 10071  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10072  	bits = bits + uint32(8)
 10073  	goto __220
 10074  __220:
 10075  	if 0 != 0 {
 10076  		goto __219
 10077  	}
 10078  	goto __221
 10079  __221:
 10080  	;
 10081  	goto __216
 10082  __216:
 10083  	goto __215
 10084  	goto __217
 10085  __217:
 10086  	;
 10087  	if !(here.Fop != 0 && int32(here.Fop)&0xf0 == 0) {
 10088  		goto __227
 10089  	}
 10090  	last = here
 10091  __228:
 10092  	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))
 10093  	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
 10094  		goto __231
 10095  	}
 10096  	goto __230
 10097  __231:
 10098  	;
 10099  __232:
 10100  __235:
 10101  	if !(have == uint32(0)) {
 10102  		goto __238
 10103  	}
 10104  	have = (*struct {
 10105  		f func(*libc.TLS, uintptr, uintptr) uint32
 10106  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10107  	if !(have == uint32(0)) {
 10108  		goto __239
 10109  	}
 10110  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10111  	ret = -5
 10112  	goto inf_leave
 10113  __239:
 10114  	;
 10115  __238:
 10116  	;
 10117  	goto __236
 10118  __236:
 10119  	if 0 != 0 {
 10120  		goto __235
 10121  	}
 10122  	goto __237
 10123  __237:
 10124  	;
 10125  	have--
 10126  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10127  	bits = bits + uint32(8)
 10128  	goto __233
 10129  __233:
 10130  	if 0 != 0 {
 10131  		goto __232
 10132  	}
 10133  	goto __234
 10134  __234:
 10135  	;
 10136  	goto __229
 10137  __229:
 10138  	goto __228
 10139  	goto __230
 10140  __230:
 10141  	;
 10142  __240:
 10143  	hold >>= int32(last.Fbits)
 10144  	bits = bits - uint32(last.Fbits)
 10145  	goto __241
 10146  __241:
 10147  	if 0 != 0 {
 10148  		goto __240
 10149  	}
 10150  	goto __242
 10151  __242:
 10152  	;
 10153  __227:
 10154  	;
 10155  __243:
 10156  	hold >>= int32(here.Fbits)
 10157  	bits = bits - uint32(here.Fbits)
 10158  	goto __244
 10159  __244:
 10160  	if 0 != 0 {
 10161  		goto __243
 10162  	}
 10163  	goto __245
 10164  __245:
 10165  	;
 10166  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval)
 10167  
 10168  	// process literal
 10169  	if !(int32(here.Fop) == 0) {
 10170  		goto __246
 10171  	}
 10172  
 10173  __247:
 10174  	if !(left == uint32(0)) {
 10175  		goto __250
 10176  	}
 10177  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 10178  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 10179  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
 10180  	if !((*struct {
 10181  		f func(*libc.TLS, uintptr, uintptr, uint32) int32
 10182  	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) {
 10183  		goto __251
 10184  	}
 10185  	ret = -5
 10186  	goto inf_leave
 10187  __251:
 10188  	;
 10189  __250:
 10190  	;
 10191  	goto __248
 10192  __248:
 10193  	if 0 != 0 {
 10194  		goto __247
 10195  	}
 10196  	goto __249
 10197  __249:
 10198  	;
 10199  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength)
 10200  	left--
 10201  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 10202  	goto __5
 10203  __246:
 10204  	;
 10205  
 10206  	// process end of block
 10207  	if !(int32(here.Fop)&32 != 0) {
 10208  		goto __252
 10209  	}
 10210  
 10211  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 10212  	goto __5
 10213  __252:
 10214  	;
 10215  
 10216  	// invalid code
 10217  	if !(int32(here.Fop)&64 != 0) {
 10218  		goto __253
 10219  	}
 10220  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */
 10221  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10222  	goto __5
 10223  __253:
 10224  	;
 10225  
 10226  	// length code -- get extra bits, if any
 10227  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
 10228  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) {
 10229  		goto __254
 10230  	}
 10231  __255:
 10232  __258:
 10233  	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
 10234  		goto __259
 10235  	}
 10236  __260:
 10237  __263:
 10238  	if !(have == uint32(0)) {
 10239  		goto __266
 10240  	}
 10241  	have = (*struct {
 10242  		f func(*libc.TLS, uintptr, uintptr) uint32
 10243  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10244  	if !(have == uint32(0)) {
 10245  		goto __267
 10246  	}
 10247  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10248  	ret = -5
 10249  	goto inf_leave
 10250  __267:
 10251  	;
 10252  __266:
 10253  	;
 10254  	goto __264
 10255  __264:
 10256  	if 0 != 0 {
 10257  		goto __263
 10258  	}
 10259  	goto __265
 10260  __265:
 10261  	;
 10262  	have--
 10263  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10264  	bits = bits + uint32(8)
 10265  	goto __261
 10266  __261:
 10267  	if 0 != 0 {
 10268  		goto __260
 10269  	}
 10270  	goto __262
 10271  __262:
 10272  	;
 10273  	goto __258
 10274  __259:
 10275  	;
 10276  	goto __256
 10277  __256:
 10278  	if 0 != 0 {
 10279  		goto __255
 10280  	}
 10281  	goto __257
 10282  __257:
 10283  	;
 10284  	*(*uint32)(unsafe.Pointer(state + 68)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
 10285  __268:
 10286  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 10287  	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
 10288  	goto __269
 10289  __269:
 10290  	if 0 != 0 {
 10291  		goto __268
 10292  	}
 10293  	goto __270
 10294  __270:
 10295  	;
 10296  __254:
 10297  	;
 10298  
 10299  	// get distance code
 10300  __271:
 10301  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits-uint32(1)))*4))
 10302  	if !(uint32(here.Fbits) <= bits) {
 10303  		goto __274
 10304  	}
 10305  	goto __273
 10306  __274:
 10307  	;
 10308  __275:
 10309  __278:
 10310  	if !(have == uint32(0)) {
 10311  		goto __281
 10312  	}
 10313  	have = (*struct {
 10314  		f func(*libc.TLS, uintptr, uintptr) uint32
 10315  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10316  	if !(have == uint32(0)) {
 10317  		goto __282
 10318  	}
 10319  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10320  	ret = -5
 10321  	goto inf_leave
 10322  __282:
 10323  	;
 10324  __281:
 10325  	;
 10326  	goto __279
 10327  __279:
 10328  	if 0 != 0 {
 10329  		goto __278
 10330  	}
 10331  	goto __280
 10332  __280:
 10333  	;
 10334  	have--
 10335  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10336  	bits = bits + uint32(8)
 10337  	goto __276
 10338  __276:
 10339  	if 0 != 0 {
 10340  		goto __275
 10341  	}
 10342  	goto __277
 10343  __277:
 10344  	;
 10345  	goto __272
 10346  __272:
 10347  	goto __271
 10348  	goto __273
 10349  __273:
 10350  	;
 10351  	if !(int32(here.Fop)&0xf0 == 0) {
 10352  		goto __283
 10353  	}
 10354  	last = here
 10355  __284:
 10356  	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))
 10357  	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
 10358  		goto __287
 10359  	}
 10360  	goto __286
 10361  __287:
 10362  	;
 10363  __288:
 10364  __291:
 10365  	if !(have == uint32(0)) {
 10366  		goto __294
 10367  	}
 10368  	have = (*struct {
 10369  		f func(*libc.TLS, uintptr, uintptr) uint32
 10370  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10371  	if !(have == uint32(0)) {
 10372  		goto __295
 10373  	}
 10374  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10375  	ret = -5
 10376  	goto inf_leave
 10377  __295:
 10378  	;
 10379  __294:
 10380  	;
 10381  	goto __292
 10382  __292:
 10383  	if 0 != 0 {
 10384  		goto __291
 10385  	}
 10386  	goto __293
 10387  __293:
 10388  	;
 10389  	have--
 10390  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10391  	bits = bits + uint32(8)
 10392  	goto __289
 10393  __289:
 10394  	if 0 != 0 {
 10395  		goto __288
 10396  	}
 10397  	goto __290
 10398  __290:
 10399  	;
 10400  	goto __285
 10401  __285:
 10402  	goto __284
 10403  	goto __286
 10404  __286:
 10405  	;
 10406  __296:
 10407  	hold >>= int32(last.Fbits)
 10408  	bits = bits - uint32(last.Fbits)
 10409  	goto __297
 10410  __297:
 10411  	if 0 != 0 {
 10412  		goto __296
 10413  	}
 10414  	goto __298
 10415  __298:
 10416  	;
 10417  __283:
 10418  	;
 10419  __299:
 10420  	hold >>= int32(here.Fbits)
 10421  	bits = bits - uint32(here.Fbits)
 10422  	goto __300
 10423  __300:
 10424  	if 0 != 0 {
 10425  		goto __299
 10426  	}
 10427  	goto __301
 10428  __301:
 10429  	;
 10430  	if !(int32(here.Fop)&64 != 0) {
 10431  		goto __302
 10432  	}
 10433  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */
 10434  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10435  	goto __5
 10436  __302:
 10437  	;
 10438  	(*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval)
 10439  
 10440  	// get distance extra bits, if any
 10441  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
 10442  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) {
 10443  		goto __303
 10444  	}
 10445  __304:
 10446  __307:
 10447  	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
 10448  		goto __308
 10449  	}
 10450  __309:
 10451  __312:
 10452  	if !(have == uint32(0)) {
 10453  		goto __315
 10454  	}
 10455  	have = (*struct {
 10456  		f func(*libc.TLS, uintptr, uintptr) uint32
 10457  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10458  	if !(have == uint32(0)) {
 10459  		goto __316
 10460  	}
 10461  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10462  	ret = -5
 10463  	goto inf_leave
 10464  __316:
 10465  	;
 10466  __315:
 10467  	;
 10468  	goto __313
 10469  __313:
 10470  	if 0 != 0 {
 10471  		goto __312
 10472  	}
 10473  	goto __314
 10474  __314:
 10475  	;
 10476  	have--
 10477  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10478  	bits = bits + uint32(8)
 10479  	goto __310
 10480  __310:
 10481  	if 0 != 0 {
 10482  		goto __309
 10483  	}
 10484  	goto __311
 10485  __311:
 10486  	;
 10487  	goto __307
 10488  __308:
 10489  	;
 10490  	goto __305
 10491  __305:
 10492  	if 0 != 0 {
 10493  		goto __304
 10494  	}
 10495  	goto __306
 10496  __306:
 10497  	;
 10498  	*(*uint32)(unsafe.Pointer(state + 72)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
 10499  __317:
 10500  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 10501  	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
 10502  	goto __318
 10503  __318:
 10504  	if 0 != 0 {
 10505  		goto __317
 10506  	}
 10507  	goto __319
 10508  __319:
 10509  	;
 10510  __303:
 10511  	;
 10512  	if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > (*Inflate_state)(unsafe.Pointer(state)).Fwsize-func() uint32 {
 10513  		if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 10514  			return left
 10515  		}
 10516  		return uint32(0)
 10517  	}()) {
 10518  		goto __320
 10519  	}
 10520  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */
 10521  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10522  	goto __5
 10523  __320:
 10524  	;
 10525  
 10526  	// copy match from window to output
 10527  __321:
 10528  __324:
 10529  	if !(left == uint32(0)) {
 10530  		goto __327
 10531  	}
 10532  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 10533  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 10534  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
 10535  	if !((*struct {
 10536  		f func(*libc.TLS, uintptr, uintptr, uint32) int32
 10537  	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) {
 10538  		goto __328
 10539  	}
 10540  	ret = -5
 10541  	goto inf_leave
 10542  __328:
 10543  	;
 10544  __327:
 10545  	;
 10546  	goto __325
 10547  __325:
 10548  	if 0 != 0 {
 10549  		goto __324
 10550  	}
 10551  	goto __326
 10552  __326:
 10553  	;
 10554  	copy = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Foffset
 10555  	if !(copy < left) {
 10556  		goto __329
 10557  	}
 10558  	from = put + uintptr(copy)
 10559  	copy = left - copy
 10560  	goto __330
 10561  __329:
 10562  	from = put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)
 10563  	copy = left
 10564  __330:
 10565  	;
 10566  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) {
 10567  		goto __331
 10568  	}
 10569  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 10570  __331:
 10571  	;
 10572  	*(*uint32)(unsafe.Pointer(state + 68)) -= copy
 10573  	left = left - copy
 10574  __332:
 10575  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10576  	goto __333
 10577  __333:
 10578  	if libc.PreDecUint32(&copy, 1) != 0 {
 10579  		goto __332
 10580  	}
 10581  	goto __334
 10582  __334:
 10583  	;
 10584  	goto __322
 10585  __322:
 10586  	if (*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0) {
 10587  		goto __321
 10588  	}
 10589  	goto __323
 10590  __323:
 10591  	;
 10592  	goto __5
 10593  
 10594  __10:
 10595  	// inflate stream terminated properly -- write leftover output
 10596  	ret = Z_STREAM_END
 10597  	if !(left < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) {
 10598  		goto __335
 10599  	}
 10600  	if !((*struct {
 10601  		f func(*libc.TLS, uintptr, uintptr, uint32) int32
 10602  	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (*Inflate_state)(unsafe.Pointer(state)).Fwsize-left) != 0) {
 10603  		goto __336
 10604  	}
 10605  	ret = -5
 10606  __336:
 10607  	;
 10608  __335:
 10609  	;
 10610  	goto inf_leave
 10611  
 10612  __11:
 10613  	ret = -3
 10614  	goto inf_leave
 10615  
 10616  __12: // can't happen, but makes compilers happy
 10617  	ret = -2
 10618  	goto inf_leave
 10619  __5:
 10620  	;
 10621  	goto __3
 10622  __3:
 10623  	goto __2
 10624  	goto __4
 10625  __4:
 10626  	;
 10627  
 10628  	// Return unused input
 10629  inf_leave:
 10630  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */))
 10631  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 10632  	return ret
 10633  }
 10634  
 10635  var order =                                                                                                                                                                                                                          // permutation of code lengths
 10636  [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 */
 10637  
 10638  func XinflateBackEnd(tls *libc.TLS, strm Z_streamp) int32 { /* infback.c:631:13: */
 10639  	if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
 10640  		return -2
 10641  	}
 10642  	(*struct {
 10643  		f func(*libc.TLS, Voidpf, Voidpf)
 10644  	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
 10645  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
 10646  
 10647  	return Z_OK
 10648  }
 10649  
 10650  //
 10651  //    Decode literal, length, and distance codes and write out the resulting
 10652  //    literal and match bytes until either not enough input or output is
 10653  //    available, an end-of-block is encountered, or a data error is encountered.
 10654  //    When large enough input and output buffers are supplied to inflate(), for
 10655  //    example, a 16K input buffer and a 64K output buffer, more than 95% of the
 10656  //    inflate execution time is spent in this routine.
 10657  //
 10658  //    Entry assumptions:
 10659  //
 10660  //         state->mode == LEN
 10661  //         strm->avail_in >= 6
 10662  //         strm->avail_out >= 258
 10663  //         start >= strm->avail_out
 10664  //         state->bits < 8
 10665  //
 10666  //    On return, state->mode is one of:
 10667  //
 10668  //         LEN -- ran out of enough output space or enough available input
 10669  //         TYPE -- reached end of block code, inflate() to interpret next block
 10670  //         BAD -- error in block data
 10671  //
 10672  //    Notes:
 10673  //
 10674  //     - The maximum input bits used by a length/distance pair is 15 bits for the
 10675  //       length code, 5 bits for the length extra, 15 bits for the distance code,
 10676  //       and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
 10677  //       Therefore if strm->avail_in >= 6, then there is enough input to avoid
 10678  //       checking for available input while decoding.
 10679  //
 10680  //     - The maximum bytes that a single length/distance pair can output is 258
 10681  //       bytes, which is the maximum length that can be coded.  inflate_fast()
 10682  //       requires strm->avail_out >= 258 for each loop to avoid checking for
 10683  //       output space.
 10684  //
 10685  func Xinflate_fast(tls *libc.TLS, strm Z_streamp, start uint32) { /* inffast.c:50:20: */
 10686  	var state uintptr
 10687  	var in uintptr     // local strm->next_in
 10688  	var last uintptr   // have enough input while in < last
 10689  	var out uintptr    // local strm->next_out
 10690  	var beg uintptr    // inflate()'s initial strm->next_out
 10691  	var end uintptr    // while out < end, enough space available
 10692  	var wsize uint32   // window size or zero if not using window
 10693  	var whave uint32   // valid bytes in the window
 10694  	var wnext uint32   // window write index
 10695  	var window uintptr // allocated sliding window, if wsize != 0
 10696  	var hold uint32    // local strm->hold
 10697  	var bits uint32    // local strm->bits
 10698  	var lcode uintptr  // local strm->lencode
 10699  	var dcode uintptr  // local strm->distcode
 10700  	var lmask uint32   // mask for first level of length codes
 10701  	var dmask uint32   // mask for first level of distance codes
 10702  	var here Code      // retrieved table entry
 10703  	var op uint32      // code bits, operation, extra bits, or
 10704  	//  window position, window bytes to copy
 10705  	var len uint32   // match length, unused bytes
 10706  	var dist uint32  // match distance
 10707  	var from uintptr // where to copy match from
 10708  
 10709  	// copy state to local variables
 10710  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 10711  	in = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 10712  	last = in + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in-UInt(5))
 10713  	out = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 10714  	beg = out - uintptr(start-(*Z_stream)(unsafe.Pointer(strm)).Favail_out)
 10715  	end = out + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_out-UInt(257))
 10716  	wsize = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 10717  	whave = (*Inflate_state)(unsafe.Pointer(state)).Fwhave
 10718  	wnext = (*Inflate_state)(unsafe.Pointer(state)).Fwnext
 10719  	window = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 10720  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 10721  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 10722  	lcode = (*Inflate_state)(unsafe.Pointer(state)).Flencode
 10723  	dcode = (*Inflate_state)(unsafe.Pointer(state)).Fdistcode
 10724  	lmask = uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits - uint32(1)
 10725  	dmask = uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits - uint32(1)
 10726  
 10727  	// decode literals and length/distances until end-of-block or not enough
 10728  	//        input data or output space
 10729  __1:
 10730  	if !(bits < uint32(15)) {
 10731  		goto __4
 10732  	}
 10733  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10734  	bits = bits + uint32(8)
 10735  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10736  	bits = bits + uint32(8)
 10737  __4:
 10738  	;
 10739  	here = *(*Code)(unsafe.Pointer(lcode + uintptr(hold&uint32(lmask))*4))
 10740  dolen:
 10741  	op = uint32(here.Fbits)
 10742  	hold >>= op
 10743  	bits = bits - op
 10744  	op = uint32(here.Fop)
 10745  	if !(op == uint32(0)) {
 10746  		goto __5
 10747  	} // literal
 10748  
 10749  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = uint8(here.Fval)
 10750  	goto __6
 10751  __5:
 10752  	if !(op&uint32(16) != 0) {
 10753  		goto __7
 10754  	} // length base
 10755  	len = uint32(here.Fval)
 10756  	op = op & uint32(15) // number of extra bits
 10757  	if !(op != 0) {
 10758  		goto __9
 10759  	}
 10760  	if !(bits < op) {
 10761  		goto __10
 10762  	}
 10763  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10764  	bits = bits + uint32(8)
 10765  __10:
 10766  	;
 10767  	len = len + uint32(hold)&(uint32(1)<<op-uint32(1))
 10768  	hold >>= op
 10769  	bits = bits - op
 10770  __9:
 10771  	;
 10772  
 10773  	if !(bits < uint32(15)) {
 10774  		goto __11
 10775  	}
 10776  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10777  	bits = bits + uint32(8)
 10778  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10779  	bits = bits + uint32(8)
 10780  __11:
 10781  	;
 10782  	here = *(*Code)(unsafe.Pointer(dcode + uintptr(hold&uint32(dmask))*4))
 10783  dodist:
 10784  	op = uint32(here.Fbits)
 10785  	hold >>= op
 10786  	bits = bits - op
 10787  	op = uint32(here.Fop)
 10788  	if !(op&uint32(16) != 0) {
 10789  		goto __12
 10790  	} // distance base
 10791  	dist = uint32(here.Fval)
 10792  	op = op & uint32(15) // number of extra bits
 10793  	if !(bits < op) {
 10794  		goto __14
 10795  	}
 10796  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10797  	bits = bits + uint32(8)
 10798  	if !(bits < op) {
 10799  		goto __15
 10800  	}
 10801  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10802  	bits = bits + uint32(8)
 10803  __15:
 10804  	;
 10805  __14:
 10806  	;
 10807  	dist = dist + uint32(hold)&(uint32(1)<<op-uint32(1))
 10808  	hold >>= op
 10809  	bits = bits - op
 10810  
 10811  	op = uint32((int32(out) - int32(beg)) / 1) // max distance in output
 10812  	if !(dist > op) {
 10813  		goto __16
 10814  	} // see if copy from window
 10815  	op = dist - op // distance back in window
 10816  	if !(op > whave) {
 10817  		goto __18
 10818  	}
 10819  	if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) {
 10820  		goto __19
 10821  	}
 10822  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */
 10823  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10824  	goto __3
 10825  __19:
 10826  	;
 10827  __18:
 10828  	;
 10829  	from = window
 10830  	if !(wnext == uint32(0)) {
 10831  		goto __20
 10832  	} // very common case
 10833  	from += uintptr(wsize - op)
 10834  	if !(op < len) {
 10835  		goto __22
 10836  	} // some from window
 10837  	len = len - op
 10838  __23:
 10839  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10840  	goto __24
 10841  __24:
 10842  	if libc.PreDecUint32(&op, 1) != 0 {
 10843  		goto __23
 10844  	}
 10845  	goto __25
 10846  __25:
 10847  	;
 10848  	from = out - uintptr(dist) // rest from output
 10849  __22:
 10850  	;
 10851  	goto __21
 10852  __20:
 10853  	if !(wnext < op) {
 10854  		goto __26
 10855  	} // wrap around window
 10856  	from += uintptr(wsize + wnext - op)
 10857  	op = op - wnext
 10858  	if !(op < len) {
 10859  		goto __28
 10860  	} // some from end of window
 10861  	len = len - op
 10862  __29:
 10863  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10864  	goto __30
 10865  __30:
 10866  	if libc.PreDecUint32(&op, 1) != 0 {
 10867  		goto __29
 10868  	}
 10869  	goto __31
 10870  __31:
 10871  	;
 10872  	from = window
 10873  	if !(wnext < len) {
 10874  		goto __32
 10875  	} // some from start of window
 10876  	op = wnext
 10877  	len = len - op
 10878  __33:
 10879  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10880  	goto __34
 10881  __34:
 10882  	if libc.PreDecUint32(&op, 1) != 0 {
 10883  		goto __33
 10884  	}
 10885  	goto __35
 10886  __35:
 10887  	;
 10888  	from = out - uintptr(dist) // rest from output
 10889  __32:
 10890  	;
 10891  __28:
 10892  	;
 10893  	goto __27
 10894  __26: // contiguous in window
 10895  	from += uintptr(wnext - op)
 10896  	if !(op < len) {
 10897  		goto __36
 10898  	} // some from window
 10899  	len = len - op
 10900  __37:
 10901  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10902  	goto __38
 10903  __38:
 10904  	if libc.PreDecUint32(&op, 1) != 0 {
 10905  		goto __37
 10906  	}
 10907  	goto __39
 10908  __39:
 10909  	;
 10910  	from = out - uintptr(dist) // rest from output
 10911  __36:
 10912  	;
 10913  __27:
 10914  	;
 10915  __21:
 10916  	;
 10917  __40:
 10918  	if !(len > uint32(2)) {
 10919  		goto __41
 10920  	}
 10921  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10922  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10923  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10924  	len = len - uint32(3)
 10925  	goto __40
 10926  __41:
 10927  	;
 10928  	if !(len != 0) {
 10929  		goto __42
 10930  	}
 10931  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10932  	if !(len > uint32(1)) {
 10933  		goto __43
 10934  	}
 10935  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10936  __43:
 10937  	;
 10938  __42:
 10939  	;
 10940  	goto __17
 10941  __16:
 10942  	from = out - uintptr(dist) // copy direct from output
 10943  __44: // minimum length is three
 10944  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10945  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10946  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10947  	len = len - uint32(3)
 10948  	goto __45
 10949  __45:
 10950  	if len > uint32(2) {
 10951  		goto __44
 10952  	}
 10953  	goto __46
 10954  __46:
 10955  	;
 10956  	if !(len != 0) {
 10957  		goto __47
 10958  	}
 10959  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10960  	if !(len > uint32(1)) {
 10961  		goto __48
 10962  	}
 10963  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10964  __48:
 10965  	;
 10966  __47:
 10967  	;
 10968  __17:
 10969  	;
 10970  	goto __13
 10971  __12:
 10972  	if !(op&uint32(64) == uint32(0)) {
 10973  		goto __49
 10974  	} // 2nd level distance code
 10975  	here = *(*Code)(unsafe.Pointer(dcode + uintptr(uint32(here.Fval)+hold&uint32(uint32(1)<<op-uint32(1)))*4))
 10976  	goto dodist
 10977  	goto __50
 10978  __49:
 10979  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */
 10980  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10981  	goto __3
 10982  __50:
 10983  	;
 10984  __13:
 10985  	;
 10986  	goto __8
 10987  __7:
 10988  	if !(op&uint32(64) == uint32(0)) {
 10989  		goto __51
 10990  	} // 2nd level length code
 10991  	here = *(*Code)(unsafe.Pointer(lcode + uintptr(uint32(here.Fval)+hold&uint32(uint32(1)<<op-uint32(1)))*4))
 10992  	goto dolen
 10993  	goto __52
 10994  __51:
 10995  	if !(op&uint32(32) != 0) {
 10996  		goto __53
 10997  	} // end-of-block
 10998  
 10999  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 11000  	goto __3
 11001  	goto __54
 11002  __53:
 11003  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */
 11004  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11005  	goto __3
 11006  __54:
 11007  	;
 11008  __52:
 11009  	;
 11010  __8:
 11011  	;
 11012  __6:
 11013  	;
 11014  	goto __2
 11015  __2:
 11016  	if in < last && out < end {
 11017  		goto __1
 11018  	}
 11019  	goto __3
 11020  __3:
 11021  	;
 11022  
 11023  	// return unused bytes (on entry, bits < 8, so in won't go too far back)
 11024  	len = bits >> 3
 11025  	in -= uintptr(len)
 11026  	bits = bits - len<<3
 11027  	hold = hold & uint32(uint32(1)<<bits-uint32(1))
 11028  
 11029  	// update state and return
 11030  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = in
 11031  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = out
 11032  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = func() uint32 {
 11033  		if in < last {
 11034  			return uint32(5 + (int32(last)-int32(in))/1)
 11035  		}
 11036  		return uint32(5 - (int32(in)-int32(last))/1)
 11037  	}()
 11038  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = func() uint32 {
 11039  		if out < end {
 11040  			return uint32(257 + (int32(end)-int32(out))/1)
 11041  		}
 11042  		return uint32(257 - (int32(out)-int32(end))/1)
 11043  	}()
 11044  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 11045  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 11046  	return
 11047  }
 11048  
 11049  //
 11050  //    inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
 11051  //    - Using bit fields for code structure
 11052  //    - Different op definition to avoid & for extra bits (do & for table bits)
 11053  //    - Three separate decoding do-loops for direct, window, and wnext == 0
 11054  //    - Special case for distance > 1 copies to do overlapped load and store copy
 11055  //    - Explicit branch predictions (based on measured branch probabilities)
 11056  //    - Deferring match copy and interspersed it with decoding subsequent codes
 11057  //    - Swapping literal/length else
 11058  //    - Swapping window/direct else
 11059  //    - Larger unrolled copy loops (three is about right)
 11060  //    - Moving len -= 3 statement into middle of loop
 11061  //
 11062  
 11063  func inflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:105:11: */
 11064  	var state uintptr
 11065  	if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
 11066  		return 1
 11067  	}
 11068  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11069  	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 {
 11070  		return 1
 11071  	}
 11072  	return 0
 11073  }
 11074  
 11075  func XinflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:119:13: */
 11076  	var state uintptr
 11077  
 11078  	if inflateStateCheck(tls, strm) != 0 {
 11079  		return -2
 11080  	}
 11081  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11082  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint32(strm+20, libc.AssignPtrUint32(state+32, uint32(0)))
 11083  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
 11084  	if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 { // to support ill-conceived Java test suite
 11085  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = ULong((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1)
 11086  	}
 11087  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD
 11088  	(*Inflate_state)(unsafe.Pointer(state)).Flast = 0
 11089  	(*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 0
 11090  	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768
 11091  	(*Inflate_state)(unsafe.Pointer(state)).Fhead = Gz_headerp(Z_NULL)
 11092  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = uint32(0)
 11093  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0)
 11094  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = libc.AssignPtrUintptr(state+84, libc.AssignPtrUintptr(state+112, state+1332 /* &.codes */))
 11095  	(*Inflate_state)(unsafe.Pointer(state)).Fsane = 1
 11096  	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
 11097  
 11098  	return Z_OK
 11099  }
 11100  
 11101  func XinflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:144:13: */
 11102  	var state uintptr
 11103  
 11104  	if inflateStateCheck(tls, strm) != 0 {
 11105  		return -2
 11106  	}
 11107  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11108  	(*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0)
 11109  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
 11110  	(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 11111  	return XinflateResetKeep(tls, strm)
 11112  }
 11113  
 11114  func XinflateReset2(tls *libc.TLS, strm Z_streamp, windowBits int32) int32 { /* inflate.c:157:13: */
 11115  	var wrap int32
 11116  	var state uintptr
 11117  
 11118  	// get the state
 11119  	if inflateStateCheck(tls, strm) != 0 {
 11120  		return -2
 11121  	}
 11122  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11123  
 11124  	// extract wrap request from windowBits parameter
 11125  	if windowBits < 0 {
 11126  		wrap = 0
 11127  		windowBits = -windowBits
 11128  	} else {
 11129  		wrap = windowBits>>4 + 5
 11130  		if windowBits < 48 {
 11131  			windowBits = windowBits & 15
 11132  		}
 11133  	}
 11134  
 11135  	// set number of window bits, free window if different
 11136  	if windowBits != 0 && (windowBits < 8 || windowBits > 15) {
 11137  		return -2
 11138  	}
 11139  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) && (*Inflate_state)(unsafe.Pointer(state)).Fwbits != uint32(windowBits) {
 11140  		(*struct {
 11141  			f func(*libc.TLS, Voidpf, Voidpf)
 11142  		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow)
 11143  		(*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL)
 11144  	}
 11145  
 11146  	// update state and reset the rest of it
 11147  	(*Inflate_state)(unsafe.Pointer(state)).Fwrap = wrap
 11148  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(windowBits)
 11149  	return XinflateReset(tls, strm)
 11150  }
 11151  
 11152  func XinflateInit2_(tls *libc.TLS, strm Z_streamp, windowBits int32, version uintptr, stream_size int32) int32 { /* inflate.c:195:13: */
 11153  	var ret int32
 11154  	var state uintptr
 11155  
 11156  	if version == uintptr(Z_NULL) || int32(*(*uint8)(unsafe.Pointer(version))) != int32(*(*uint8)(unsafe.Pointer(ts))) || stream_size != int32(unsafe.Sizeof(Z_stream{})) {
 11157  		return -6
 11158  	}
 11159  	if strm == uintptr(Z_NULL) {
 11160  		return -2
 11161  	}
 11162  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error
 11163  	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
 11164  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
 11165  			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
 11166  		}{Xzcalloc}))
 11167  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
 11168  	}
 11169  	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
 11170  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
 11171  			f func(*libc.TLS, Voidpf, Voidpf)
 11172  		}{Xzcfree}))
 11173  	}
 11174  	state = (*struct {
 11175  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
 11176  	})(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{})))
 11177  	if state == uintptr(Z_NULL) {
 11178  		return -4
 11179  	}
 11180  
 11181  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = state
 11182  	(*Inflate_state)(unsafe.Pointer(state)).Fstrm = strm
 11183  	(*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL)
 11184  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD // to pass state test in inflateReset2()
 11185  	ret = XinflateReset2(tls, strm, windowBits)
 11186  	if ret != Z_OK {
 11187  		(*struct {
 11188  			f func(*libc.TLS, Voidpf, Voidpf)
 11189  		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, state)
 11190  		(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
 11191  	}
 11192  	return ret
 11193  }
 11194  
 11195  func XinflateInit_(tls *libc.TLS, strm Z_streamp, version uintptr, stream_size int32) int32 { /* inflate.c:239:13: */
 11196  	return XinflateInit2_(tls, strm, MAX_WBITS, version, stream_size)
 11197  }
 11198  
 11199  func XinflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* inflate.c:247:13: */
 11200  	var state uintptr
 11201  
 11202  	if inflateStateCheck(tls, strm) != 0 {
 11203  		return -2
 11204  	}
 11205  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11206  	if bits < 0 {
 11207  		(*Inflate_state)(unsafe.Pointer(state)).Fhold = uint32(0)
 11208  		(*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0)
 11209  		return Z_OK
 11210  	}
 11211  	if bits > 16 || (*Inflate_state)(unsafe.Pointer(state)).Fbits+UInt(bits) > uint32(32) {
 11212  		return -2
 11213  	}
 11214  	value = int32(int32(value) & (int32(1)<<bits - 1))
 11215  	*(*uint32)(unsafe.Pointer(state + 60)) += uint32(uint32(value) << (*Inflate_state)(unsafe.Pointer(state)).Fbits)
 11216  	*(*uint32)(unsafe.Pointer(state + 64)) += UInt(bits)
 11217  	return Z_OK
 11218  }
 11219  
 11220  //
 11221  //    Return state with length and distance decoding tables and index sizes set to
 11222  //    fixed code decoding.  Normally this returns fixed tables from inffixed.h.
 11223  //    If BUILDFIXED is defined, then instead this routine builds the tables the
 11224  //    first time it's called, and returns those tables the first time and
 11225  //    thereafter.  This reduces the size of the code by about 2K bytes, in
 11226  //    exchange for a little execution time.  However, BUILDFIXED should not be
 11227  //    used for threaded applications, since the rewriting of the tables and virgin
 11228  //    may not be thread-safe.
 11229  //
 11230  func fixedtables1(tls *libc.TLS, state uintptr) { /* inflate.c:278:12: */
 11231  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix1))
 11232  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
 11233  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix1))
 11234  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5)
 11235  }
 11236  
 11237  var lenfix1 = [512]Code{
 11238  	{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)},
 11239  	{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)},
 11240  	{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)},
 11241  	{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)},
 11242  	{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)},
 11243  	{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)},
 11244  	{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)},
 11245  	{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)},
 11246  	{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)},
 11247  	{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)},
 11248  	{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)},
 11249  	{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)},
 11250  	{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)},
 11251  	{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)},
 11252  	{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)},
 11253  	{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)},
 11254  	{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)},
 11255  	{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)},
 11256  	{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)},
 11257  	{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)},
 11258  	{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)},
 11259  	{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)},
 11260  	{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)},
 11261  	{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)},
 11262  	{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)},
 11263  	{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)},
 11264  	{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)},
 11265  	{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)},
 11266  	{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)},
 11267  	{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)},
 11268  	{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)},
 11269  	{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)},
 11270  	{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)},
 11271  	{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)},
 11272  	{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)},
 11273  	{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)},
 11274  	{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)},
 11275  	{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)},
 11276  	{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)},
 11277  	{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)},
 11278  	{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)},
 11279  	{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)},
 11280  	{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)},
 11281  	{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)},
 11282  	{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)},
 11283  	{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)},
 11284  	{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)},
 11285  	{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)},
 11286  	{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)},
 11287  	{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)},
 11288  	{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)},
 11289  	{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)},
 11290  	{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)},
 11291  	{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)},
 11292  	{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)},
 11293  	{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)},
 11294  	{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)},
 11295  	{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)},
 11296  	{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)},
 11297  	{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)},
 11298  	{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)},
 11299  	{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)},
 11300  	{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)},
 11301  	{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)},
 11302  	{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)},
 11303  	{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)},
 11304  	{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)},
 11305  	{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)},
 11306  	{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)},
 11307  	{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)},
 11308  	{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)},
 11309  	{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)},
 11310  	{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)},
 11311  	{Fbits: uint8(9), Fval: uint16(255)},
 11312  } /* inffixed.h:10:23 */
 11313  var distfix1 = [32]Code{
 11314  	{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)},
 11315  	{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)},
 11316  	{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)},
 11317  	{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)},
 11318  	{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)},
 11319  	{Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)},
 11320  } /* inffixed.h:87:23 */
 11321  
 11322  //
 11323  //    Update the window with the last wsize (normally 32K) bytes written before
 11324  //    returning.  If window does not exist yet, create it.  This is only called
 11325  //    when a window is already in use, or when output has been written during this
 11326  //    inflate call, but the end of the deflate stream has not been reached yet.
 11327  //    It is also called to create a window for dictionary data when a dictionary
 11328  //    is loaded.
 11329  //
 11330  //    Providing output buffers larger than 32K to inflate() should provide a speed
 11331  //    advantage, since only the last 32K of output is copied to the sliding window
 11332  //    upon return from inflate(), and since all distances after the first 32K of
 11333  //    output will fall in the output data, making match copies simpler and faster.
 11334  //    The advantage may be dependent on the size of the processor's data caches.
 11335  //
 11336  func updatewindow(tls *libc.TLS, strm Z_streamp, end uintptr, copy uint32) int32 { /* inflate.c:396:11: */
 11337  	var state uintptr
 11338  	var dist uint32
 11339  
 11340  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11341  
 11342  	// if it hasn't been done already, allocate space for the window
 11343  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) {
 11344  		(*Inflate_state)(unsafe.Pointer(state)).Fwindow = (*struct {
 11345  			f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
 11346  		})(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))))
 11347  		if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) {
 11348  			return 1
 11349  		}
 11350  	}
 11351  
 11352  	// if window not in use yet, initialize
 11353  	if (*Inflate_state)(unsafe.Pointer(state)).Fwsize == uint32(0) {
 11354  		(*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits
 11355  		(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 11356  		(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
 11357  	}
 11358  
 11359  	// copy state->wsize or less output bytes into the circular window
 11360  	if copy >= (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 11361  		libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize), (*Inflate_state)(unsafe.Pointer(state)).Fwsize)
 11362  		(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 11363  		(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 11364  	} else {
 11365  		dist = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Fwnext
 11366  		if dist > copy {
 11367  			dist = copy
 11368  		}
 11369  		libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext), end-uintptr(copy), dist)
 11370  		copy = copy - dist
 11371  		if copy != 0 {
 11372  			libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr(copy), copy)
 11373  			(*Inflate_state)(unsafe.Pointer(state)).Fwnext = copy
 11374  			(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 11375  		} else {
 11376  			*(*uint32)(unsafe.Pointer(state + 52)) += dist
 11377  			if (*Inflate_state)(unsafe.Pointer(state)).Fwnext == (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 11378  				(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 11379  			}
 11380  			if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 11381  				*(*uint32)(unsafe.Pointer(state + 48)) += dist
 11382  			}
 11383  		}
 11384  	}
 11385  	return 0
 11386  }
 11387  
 11388  // Macros for inflate():
 11389  
 11390  // check function to use adler32() for zlib or crc32() for gzip
 11391  
 11392  // check macros for header crc
 11393  
 11394  // Load registers with state in inflate() for speed
 11395  
 11396  // Restore state from registers in inflate()
 11397  
 11398  // Clear the input bit accumulator
 11399  
 11400  // Get a byte of input into the bit accumulator, or return from inflate()
 11401  //    if there is no input available.
 11402  
 11403  // Assure that there are at least n bits in the bit accumulator.  If there is
 11404  //    not enough available input to do that, then return from inflate().
 11405  
 11406  // Return the low n bits of the bit accumulator (n < 16)
 11407  
 11408  // Remove n bits from the bit accumulator
 11409  
 11410  // Remove zero to seven bits as needed to go to a byte boundary
 11411  
 11412  //
 11413  //    inflate() uses a state machine to process as much input data and generate as
 11414  //    much output data as possible before returning.  The state machine is
 11415  //    structured roughly as follows:
 11416  //
 11417  //     for (;;) switch (state) {
 11418  //     ...
 11419  //     case STATEn:
 11420  //         if (not enough input data or output space to make progress)
 11421  //             return;
 11422  //         ... make progress ...
 11423  //         state = STATEm;
 11424  //         break;
 11425  //     ...
 11426  //     }
 11427  //
 11428  //    so when inflate() is called again, the same case is attempted again, and
 11429  //    if the appropriate resources are provided, the machine proceeds to the
 11430  //    next state.  The NEEDBITS() macro is usually the way the state evaluates
 11431  //    whether it can proceed or should return.  NEEDBITS() does the return if
 11432  //    the requested bits are not available.  The typical use of the BITS macros
 11433  //    is:
 11434  //
 11435  //         NEEDBITS(n);
 11436  //         ... do something with BITS(n) ...
 11437  //         DROPBITS(n);
 11438  //
 11439  //    where NEEDBITS(n) either returns from inflate() if there isn't enough
 11440  //    input left to load n bits into the accumulator, or it continues.  BITS(n)
 11441  //    gives the low n bits in the accumulator.  When done, DROPBITS(n) drops
 11442  //    the low n bits off the accumulator.  INITBITS() clears the accumulator
 11443  //    and sets the number of available bits to zero.  BYTEBITS() discards just
 11444  //    enough bits to put the accumulator on a byte boundary.  After BYTEBITS()
 11445  //    and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
 11446  //
 11447  //    NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
 11448  //    if there is no input available.  The decoding of variable length codes uses
 11449  //    PULLBYTE() directly in order to pull just enough bytes to decode the next
 11450  //    code, and no more.
 11451  //
 11452  //    Some states loop until they get enough input, making sure that enough
 11453  //    state information is maintained to continue the loop where it left off
 11454  //    if NEEDBITS() returns in the loop.  For example, want, need, and keep
 11455  //    would all have to actually be part of the saved state in case NEEDBITS()
 11456  //    returns:
 11457  //
 11458  //     case STATEw:
 11459  //         while (want < need) {
 11460  //             NEEDBITS(n);
 11461  //             keep[want++] = BITS(n);
 11462  //             DROPBITS(n);
 11463  //         }
 11464  //         state = STATEx;
 11465  //     case STATEx:
 11466  //
 11467  //    As shown above, if the next state is also the next case, then the break
 11468  //    is omitted.
 11469  //
 11470  //    A state may also return if there is not enough output space available to
 11471  //    complete that state.  Those states are copying stored data, writing a
 11472  //    literal byte, and copying a matching string.
 11473  //
 11474  //    When returning, a "goto inf_leave" is used to update the total counters,
 11475  //    update the check value, and determine whether any progress has been made
 11476  //    during that inflate() call in order to return the proper return code.
 11477  //    Progress is defined as a change in either strm->avail_in or strm->avail_out.
 11478  //    When there is a window, goto inf_leave will update the window with the last
 11479  //    output written.  If a goto inf_leave occurs in the middle of decompression
 11480  //    and there is no window currently, goto inf_leave will create one and copy
 11481  //    output to the window for the next call of inflate().
 11482  //
 11483  //    In this implementation, the flush parameter of inflate() only affects the
 11484  //    return code (per zlib.h).  inflate() always writes as much as possible to
 11485  //    strm->next_out, given the space available and the provided input--the effect
 11486  //    documented in zlib.h of Z_SYNC_FLUSH.  Furthermore, inflate() always defers
 11487  //    the allocation of and copying into a sliding window until necessary, which
 11488  //    provides the effect documented in zlib.h for Z_FINISH when the entire input
 11489  //    stream available.  So the only thing the flush parameter actually does is:
 11490  //    when flush is set to Z_FINISH, inflate() cannot return Z_OK.  Instead it
 11491  //    will return Z_BUF_ERROR if it has not reached the end of the stream.
 11492  //
 11493  
 11494  func Xinflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* inflate.c:622:13: */
 11495  	bp := tls.Alloc(4)
 11496  	defer tls.Free(4)
 11497  
 11498  	var state uintptr
 11499  	var next uintptr // next input
 11500  	var put uintptr  // next output
 11501  	var have uint32
 11502  	var left uint32 // available input and output
 11503  	var hold uint32 // bit buffer
 11504  	var bits uint32 // bits in bit buffer
 11505  	var in uint32
 11506  	var out uint32   // save starting available input and output
 11507  	var copy uint32  // number of stored or match bytes to copy
 11508  	var from uintptr // where to copy match bytes from
 11509  	var here Code    // current decoding table entry
 11510  	var last Code    // parent table entry
 11511  	var len uint32   // length to copy for repeats, bits to drop
 11512  	var ret int32    // return code
 11513  	// var hbuf [4]uint8 at bp, 4
 11514  
 11515  	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)) {
 11516  		goto __1
 11517  	}
 11518  	return -2
 11519  __1:
 11520  	;
 11521  
 11522  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11523  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) {
 11524  		goto __2
 11525  	}
 11526  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO
 11527  __2:
 11528  	; // skip check
 11529  __3:
 11530  	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 11531  	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 11532  	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 11533  	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 11534  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 11535  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 11536  	goto __4
 11537  __4:
 11538  	if 0 != 0 {
 11539  		goto __3
 11540  	}
 11541  	goto __5
 11542  __5:
 11543  	;
 11544  	in = have
 11545  	out = left
 11546  	ret = Z_OK
 11547  __6:
 11548  	switch (*Inflate_state)(unsafe.Pointer(state)).Fmode {
 11549  	case HEAD:
 11550  		goto __10
 11551  	case FLAGS:
 11552  		goto __11
 11553  	case TIME:
 11554  		goto __12
 11555  	case OS:
 11556  		goto __13
 11557  	case EXLEN:
 11558  		goto __14
 11559  	case EXTRA:
 11560  		goto __15
 11561  	case NAME:
 11562  		goto __16
 11563  	case COMMENT:
 11564  		goto __17
 11565  	case HCRC:
 11566  		goto __18
 11567  	case DICTID:
 11568  		goto __19
 11569  	case DICT:
 11570  		goto __20
 11571  	case TYPE:
 11572  		goto __21
 11573  	case TYPEDO:
 11574  		goto __22
 11575  	case STORED:
 11576  		goto __23
 11577  	case COPY_:
 11578  		goto __24
 11579  	case COPY:
 11580  		goto __25
 11581  	case TABLE:
 11582  		goto __26
 11583  	case LENLENS:
 11584  		goto __27
 11585  	case CODELENS:
 11586  		goto __28
 11587  	case LEN_:
 11588  		goto __29
 11589  	case LEN:
 11590  		goto __30
 11591  	case LENEXT:
 11592  		goto __31
 11593  	case DIST:
 11594  		goto __32
 11595  	case DISTEXT:
 11596  		goto __33
 11597  	case MATCH:
 11598  		goto __34
 11599  	case LIT:
 11600  		goto __35
 11601  	case CHECK:
 11602  		goto __36
 11603  	case LENGTH:
 11604  		goto __37
 11605  	case DONE:
 11606  		goto __38
 11607  	case BAD:
 11608  		goto __39
 11609  	case MEM:
 11610  		goto __40
 11611  	case SYNC:
 11612  		goto __41
 11613  	default:
 11614  		goto __42
 11615  	}
 11616  	goto __9
 11617  __10:
 11618  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap == 0) {
 11619  		goto __43
 11620  	}
 11621  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO
 11622  	goto __9
 11623  __43:
 11624  	;
 11625  __44:
 11626  __47:
 11627  	if !(bits < uint32(16)) {
 11628  		goto __48
 11629  	}
 11630  __49:
 11631  	if !(have == uint32(0)) {
 11632  		goto __52
 11633  	}
 11634  	goto inf_leave
 11635  __52:
 11636  	;
 11637  	have--
 11638  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 11639  	bits = bits + uint32(8)
 11640  	goto __50
 11641  __50:
 11642  	if 0 != 0 {
 11643  		goto __49
 11644  	}
 11645  	goto __51
 11646  __51:
 11647  	;
 11648  	goto __47
 11649  __48:
 11650  	;
 11651  	goto __45
 11652  __45:
 11653  	if 0 != 0 {
 11654  		goto __44
 11655  	}
 11656  	goto __46
 11657  __46:
 11658  	;
 11659  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&2 != 0 && hold == uint32(0x8b1f)) {
 11660  		goto __53
 11661  	} // gzip header
 11662  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) {
 11663  		goto __54
 11664  	}
 11665  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15)
 11666  __54:
 11667  	;
 11668  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
 11669  __55:
 11670  	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
 11671  	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
 11672  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
 11673  	goto __56
 11674  __56:
 11675  	if 0 != 0 {
 11676  		goto __55
 11677  	}
 11678  	goto __57
 11679  __57:
 11680  	;
 11681  __58:
 11682  	hold = uint32(0)
 11683  	bits = uint32(0)
 11684  	goto __59
 11685  __59:
 11686  	if 0 != 0 {
 11687  		goto __58
 11688  	}
 11689  	goto __60
 11690  __60:
 11691  	;
 11692  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = FLAGS
 11693  	goto __9
 11694  __53:
 11695  	;
 11696  	(*Inflate_state)(unsafe.Pointer(state)).Fflags = 0 // expect zlib header
 11697  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 11698  		goto __61
 11699  	}
 11700  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -1
 11701  __61:
 11702  	;
 11703  	if !(!((*Inflate_state)(unsafe.Pointer(state)).Fwrap&1 != 0) || (uint32(uint32(hold)&(uint32(1)<<8-uint32(1))<<8)+hold>>8)%uint32(31) != 0) {
 11704  		goto __62
 11705  	}
 11706  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 669 /* "incorrect header..." */
 11707  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11708  	goto __9
 11709  __62:
 11710  	;
 11711  	if !(uint32(hold)&(uint32(1)<<4-uint32(1)) != uint32(Z_DEFLATED)) {
 11712  		goto __63
 11713  	}
 11714  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */
 11715  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11716  	goto __9
 11717  __63:
 11718  	;
 11719  __64:
 11720  	hold >>= 4
 11721  	bits = bits - uint32(4)
 11722  	goto __65
 11723  __65:
 11724  	if 0 != 0 {
 11725  		goto __64
 11726  	}
 11727  	goto __66
 11728  __66:
 11729  	;
 11730  	len = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(8)
 11731  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) {
 11732  		goto __67
 11733  	}
 11734  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = len
 11735  __67:
 11736  	;
 11737  	if !(len > uint32(15) || len > (*Inflate_state)(unsafe.Pointer(state)).Fwbits) {
 11738  		goto __68
 11739  	}
 11740  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 719 /* "invalid window s..." */
 11741  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11742  	goto __9
 11743  __68:
 11744  	;
 11745  	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = uint32(1) << len
 11746  
 11747  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)))
 11748  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = func() uint32 {
 11749  		if hold&uint32(0x200) != 0 {
 11750  			return DICTID
 11751  		}
 11752  		return TYPE
 11753  	}()
 11754  __69:
 11755  	hold = uint32(0)
 11756  	bits = uint32(0)
 11757  	goto __70
 11758  __70:
 11759  	if 0 != 0 {
 11760  		goto __69
 11761  	}
 11762  	goto __71
 11763  __71:
 11764  	;
 11765  	goto __9
 11766  __11:
 11767  __72:
 11768  __75:
 11769  	if !(bits < uint32(16)) {
 11770  		goto __76
 11771  	}
 11772  __77:
 11773  	if !(have == uint32(0)) {
 11774  		goto __80
 11775  	}
 11776  	goto inf_leave
 11777  __80:
 11778  	;
 11779  	have--
 11780  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 11781  	bits = bits + uint32(8)
 11782  	goto __78
 11783  __78:
 11784  	if 0 != 0 {
 11785  		goto __77
 11786  	}
 11787  	goto __79
 11788  __79:
 11789  	;
 11790  	goto __75
 11791  __76:
 11792  	;
 11793  	goto __73
 11794  __73:
 11795  	if 0 != 0 {
 11796  		goto __72
 11797  	}
 11798  	goto __74
 11799  __74:
 11800  	;
 11801  	(*Inflate_state)(unsafe.Pointer(state)).Fflags = int32(hold)
 11802  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0xff != Z_DEFLATED) {
 11803  		goto __81
 11804  	}
 11805  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */
 11806  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11807  	goto __9
 11808  __81:
 11809  	;
 11810  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0xe000 != 0) {
 11811  		goto __82
 11812  	}
 11813  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 739 /* "unknown header f..." */
 11814  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11815  	goto __9
 11816  __82:
 11817  	;
 11818  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 11819  		goto __83
 11820  	}
 11821  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = int32(hold >> 8 & uint32(1))
 11822  __83:
 11823  	;
 11824  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 11825  		goto __84
 11826  	}
 11827  __85:
 11828  	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
 11829  	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
 11830  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
 11831  	goto __86
 11832  __86:
 11833  	if 0 != 0 {
 11834  		goto __85
 11835  	}
 11836  	goto __87
 11837  __87:
 11838  	;
 11839  __84:
 11840  	;
 11841  __88:
 11842  	hold = uint32(0)
 11843  	bits = uint32(0)
 11844  	goto __89
 11845  __89:
 11846  	if 0 != 0 {
 11847  		goto __88
 11848  	}
 11849  	goto __90
 11850  __90:
 11851  	;
 11852  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TIME
 11853  __12:
 11854  __91:
 11855  __94:
 11856  	if !(bits < uint32(32)) {
 11857  		goto __95
 11858  	}
 11859  __96:
 11860  	if !(have == uint32(0)) {
 11861  		goto __99
 11862  	}
 11863  	goto inf_leave
 11864  __99:
 11865  	;
 11866  	have--
 11867  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 11868  	bits = bits + uint32(8)
 11869  	goto __97
 11870  __97:
 11871  	if 0 != 0 {
 11872  		goto __96
 11873  	}
 11874  	goto __98
 11875  __98:
 11876  	;
 11877  	goto __94
 11878  __95:
 11879  	;
 11880  	goto __92
 11881  __92:
 11882  	if 0 != 0 {
 11883  		goto __91
 11884  	}
 11885  	goto __93
 11886  __93:
 11887  	;
 11888  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 11889  		goto __100
 11890  	}
 11891  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold
 11892  __100:
 11893  	;
 11894  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 11895  		goto __101
 11896  	}
 11897  __102:
 11898  	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
 11899  	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
 11900  	*(*uint8)(unsafe.Pointer(bp + 2)) = uint8(hold >> 16)
 11901  	*(*uint8)(unsafe.Pointer(bp + 3)) = uint8(hold >> 24)
 11902  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(4))
 11903  	goto __103
 11904  __103:
 11905  	if 0 != 0 {
 11906  		goto __102
 11907  	}
 11908  	goto __104
 11909  __104:
 11910  	;
 11911  __101:
 11912  	;
 11913  __105:
 11914  	hold = uint32(0)
 11915  	bits = uint32(0)
 11916  	goto __106
 11917  __106:
 11918  	if 0 != 0 {
 11919  		goto __105
 11920  	}
 11921  	goto __107
 11922  __107:
 11923  	;
 11924  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = OS
 11925  __13:
 11926  __108:
 11927  __111:
 11928  	if !(bits < uint32(16)) {
 11929  		goto __112
 11930  	}
 11931  __113:
 11932  	if !(have == uint32(0)) {
 11933  		goto __116
 11934  	}
 11935  	goto inf_leave
 11936  __116:
 11937  	;
 11938  	have--
 11939  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 11940  	bits = bits + uint32(8)
 11941  	goto __114
 11942  __114:
 11943  	if 0 != 0 {
 11944  		goto __113
 11945  	}
 11946  	goto __115
 11947  __115:
 11948  	;
 11949  	goto __111
 11950  __112:
 11951  	;
 11952  	goto __109
 11953  __109:
 11954  	if 0 != 0 {
 11955  		goto __108
 11956  	}
 11957  	goto __110
 11958  __110:
 11959  	;
 11960  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 11961  		goto __117
 11962  	}
 11963  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = int32(hold & uint32(0xff))
 11964  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fos = int32(hold >> 8)
 11965  __117:
 11966  	;
 11967  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 11968  		goto __118
 11969  	}
 11970  __119:
 11971  	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
 11972  	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
 11973  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
 11974  	goto __120
 11975  __120:
 11976  	if 0 != 0 {
 11977  		goto __119
 11978  	}
 11979  	goto __121
 11980  __121:
 11981  	;
 11982  __118:
 11983  	;
 11984  __122:
 11985  	hold = uint32(0)
 11986  	bits = uint32(0)
 11987  	goto __123
 11988  __123:
 11989  	if 0 != 0 {
 11990  		goto __122
 11991  	}
 11992  	goto __124
 11993  __124:
 11994  	;
 11995  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = EXLEN
 11996  __14:
 11997  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0400 != 0) {
 11998  		goto __125
 11999  	}
 12000  __127:
 12001  __130:
 12002  	if !(bits < uint32(16)) {
 12003  		goto __131
 12004  	}
 12005  __132:
 12006  	if !(have == uint32(0)) {
 12007  		goto __135
 12008  	}
 12009  	goto inf_leave
 12010  __135:
 12011  	;
 12012  	have--
 12013  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12014  	bits = bits + uint32(8)
 12015  	goto __133
 12016  __133:
 12017  	if 0 != 0 {
 12018  		goto __132
 12019  	}
 12020  	goto __134
 12021  __134:
 12022  	;
 12023  	goto __130
 12024  __131:
 12025  	;
 12026  	goto __128
 12027  __128:
 12028  	if 0 != 0 {
 12029  		goto __127
 12030  	}
 12031  	goto __129
 12032  __129:
 12033  	;
 12034  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold)
 12035  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12036  		goto __136
 12037  	}
 12038  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold)
 12039  __136:
 12040  	;
 12041  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 12042  		goto __137
 12043  	}
 12044  __138:
 12045  	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
 12046  	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
 12047  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
 12048  	goto __139
 12049  __139:
 12050  	if 0 != 0 {
 12051  		goto __138
 12052  	}
 12053  	goto __140
 12054  __140:
 12055  	;
 12056  __137:
 12057  	;
 12058  __141:
 12059  	hold = uint32(0)
 12060  	bits = uint32(0)
 12061  	goto __142
 12062  __142:
 12063  	if 0 != 0 {
 12064  		goto __141
 12065  	}
 12066  	goto __143
 12067  __143:
 12068  	;
 12069  	goto __126
 12070  __125:
 12071  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12072  		goto __144
 12073  	}
 12074  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(Z_NULL)
 12075  __144:
 12076  	;
 12077  __126:
 12078  	;
 12079  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = EXTRA
 12080  __15:
 12081  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0400 != 0) {
 12082  		goto __145
 12083  	}
 12084  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 12085  	if !(copy > have) {
 12086  		goto __146
 12087  	}
 12088  	copy = have
 12089  __146:
 12090  	;
 12091  	if !(copy != 0) {
 12092  		goto __147
 12093  	}
 12094  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL) && (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(Z_NULL)) {
 12095  		goto __148
 12096  	}
 12097  	len = (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Inflate_state)(unsafe.Pointer(state)).Flength
 12098  	libc.Xmemcpy(tls, (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra+uintptr(len), next,
 12099  		func() uint32 {
 12100  			if len+copy > (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max {
 12101  				return (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len
 12102  			}
 12103  			return copy
 12104  		}())
 12105  __148:
 12106  	;
 12107  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 12108  		goto __149
 12109  	}
 12110  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
 12111  __149:
 12112  	;
 12113  	have = have - copy
 12114  	next += uintptr(copy)
 12115  	*(*uint32)(unsafe.Pointer(state + 68)) -= copy
 12116  __147:
 12117  	;
 12118  	if !((*Inflate_state)(unsafe.Pointer(state)).Flength != 0) {
 12119  		goto __150
 12120  	}
 12121  	goto inf_leave
 12122  __150:
 12123  	;
 12124  __145:
 12125  	;
 12126  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0)
 12127  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = NAME
 12128  __16:
 12129  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0800 != 0) {
 12130  		goto __151
 12131  	}
 12132  	if !(have == uint32(0)) {
 12133  		goto __153
 12134  	}
 12135  	goto inf_leave
 12136  __153:
 12137  	;
 12138  	copy = uint32(0)
 12139  __154:
 12140  	len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(&copy, 1)))))
 12141  	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) {
 12142  		goto __157
 12143  	}
 12144  	*(*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)
 12145  __157:
 12146  	;
 12147  	goto __155
 12148  __155:
 12149  	if len != 0 && copy < have {
 12150  		goto __154
 12151  	}
 12152  	goto __156
 12153  __156:
 12154  	;
 12155  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 12156  		goto __158
 12157  	}
 12158  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
 12159  __158:
 12160  	;
 12161  	have = have - copy
 12162  	next += uintptr(copy)
 12163  	if !(len != 0) {
 12164  		goto __159
 12165  	}
 12166  	goto inf_leave
 12167  __159:
 12168  	;
 12169  	goto __152
 12170  __151:
 12171  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12172  		goto __160
 12173  	}
 12174  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(Z_NULL)
 12175  __160:
 12176  	;
 12177  __152:
 12178  	;
 12179  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0)
 12180  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COMMENT
 12181  __17:
 12182  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x1000 != 0) {
 12183  		goto __161
 12184  	}
 12185  	if !(have == uint32(0)) {
 12186  		goto __163
 12187  	}
 12188  	goto inf_leave
 12189  __163:
 12190  	;
 12191  	copy = uint32(0)
 12192  __164:
 12193  	len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(&copy, 1)))))
 12194  	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) {
 12195  		goto __167
 12196  	}
 12197  	*(*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)
 12198  __167:
 12199  	;
 12200  	goto __165
 12201  __165:
 12202  	if len != 0 && copy < have {
 12203  		goto __164
 12204  	}
 12205  	goto __166
 12206  __166:
 12207  	;
 12208  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 12209  		goto __168
 12210  	}
 12211  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
 12212  __168:
 12213  	;
 12214  	have = have - copy
 12215  	next += uintptr(copy)
 12216  	if !(len != 0) {
 12217  		goto __169
 12218  	}
 12219  	goto inf_leave
 12220  __169:
 12221  	;
 12222  	goto __162
 12223  __161:
 12224  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12225  		goto __170
 12226  	}
 12227  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(Z_NULL)
 12228  __170:
 12229  	;
 12230  __162:
 12231  	;
 12232  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HCRC
 12233  __18:
 12234  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0) {
 12235  		goto __171
 12236  	}
 12237  __172:
 12238  __175:
 12239  	if !(bits < uint32(16)) {
 12240  		goto __176
 12241  	}
 12242  __177:
 12243  	if !(have == uint32(0)) {
 12244  		goto __180
 12245  	}
 12246  	goto inf_leave
 12247  __180:
 12248  	;
 12249  	have--
 12250  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12251  	bits = bits + uint32(8)
 12252  	goto __178
 12253  __178:
 12254  	if 0 != 0 {
 12255  		goto __177
 12256  	}
 12257  	goto __179
 12258  __179:
 12259  	;
 12260  	goto __175
 12261  __176:
 12262  	;
 12263  	goto __173
 12264  __173:
 12265  	if 0 != 0 {
 12266  		goto __172
 12267  	}
 12268  	goto __174
 12269  __174:
 12270  	;
 12271  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && hold != (*Inflate_state)(unsafe.Pointer(state)).Fcheck&uint32(0xffff)) {
 12272  		goto __181
 12273  	}
 12274  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 764 /* "header crc misma..." */
 12275  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12276  	goto __9
 12277  __181:
 12278  	;
 12279  __182:
 12280  	hold = uint32(0)
 12281  	bits = uint32(0)
 12282  	goto __183
 12283  __183:
 12284  	if 0 != 0 {
 12285  		goto __182
 12286  	}
 12287  	goto __184
 12288  __184:
 12289  	;
 12290  __171:
 12291  	;
 12292  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12293  		goto __185
 12294  	}
 12295  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (*Inflate_state)(unsafe.Pointer(state)).Fflags >> 9 & 1
 12296  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = 1
 12297  __185:
 12298  	;
 12299  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)))
 12300  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 12301  	goto __9
 12302  __19:
 12303  __186:
 12304  __189:
 12305  	if !(bits < uint32(32)) {
 12306  		goto __190
 12307  	}
 12308  __191:
 12309  	if !(have == uint32(0)) {
 12310  		goto __194
 12311  	}
 12312  	goto inf_leave
 12313  __194:
 12314  	;
 12315  	have--
 12316  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12317  	bits = bits + uint32(8)
 12318  	goto __192
 12319  __192:
 12320  	if 0 != 0 {
 12321  		goto __191
 12322  	}
 12323  	goto __193
 12324  __193:
 12325  	;
 12326  	goto __189
 12327  __190:
 12328  	;
 12329  	goto __187
 12330  __187:
 12331  	if 0 != 0 {
 12332  		goto __186
 12333  	}
 12334  	goto __188
 12335  __188:
 12336  	;
 12337  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, hold>>24&uint32(0xff)+hold>>8&uint32(0xff00)+hold&uint32(0xff00)<<8+hold&uint32(0xff)<<24)
 12338  __195:
 12339  	hold = uint32(0)
 12340  	bits = uint32(0)
 12341  	goto __196
 12342  __196:
 12343  	if 0 != 0 {
 12344  		goto __195
 12345  	}
 12346  	goto __197
 12347  __197:
 12348  	;
 12349  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DICT
 12350  __20:
 12351  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhavedict == 0) {
 12352  		goto __198
 12353  	}
 12354  __199:
 12355  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 12356  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 12357  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
 12358  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 12359  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 12360  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 12361  	goto __200
 12362  __200:
 12363  	if 0 != 0 {
 12364  		goto __199
 12365  	}
 12366  	goto __201
 12367  __201:
 12368  	;
 12369  	return Z_NEED_DICT
 12370  __198:
 12371  	;
 12372  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)))
 12373  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 12374  __21:
 12375  	if !(flush == Z_BLOCK || flush == Z_TREES) {
 12376  		goto __202
 12377  	}
 12378  	goto inf_leave
 12379  __202:
 12380  	;
 12381  __22:
 12382  	if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) {
 12383  		goto __203
 12384  	}
 12385  __204:
 12386  	hold >>= bits & uint32(7)
 12387  	bits = bits - bits&uint32(7)
 12388  	goto __205
 12389  __205:
 12390  	if 0 != 0 {
 12391  		goto __204
 12392  	}
 12393  	goto __206
 12394  __206:
 12395  	;
 12396  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = CHECK
 12397  	goto __9
 12398  __203:
 12399  	;
 12400  __207:
 12401  __210:
 12402  	if !(bits < uint32(3)) {
 12403  		goto __211
 12404  	}
 12405  __212:
 12406  	if !(have == uint32(0)) {
 12407  		goto __215
 12408  	}
 12409  	goto inf_leave
 12410  __215:
 12411  	;
 12412  	have--
 12413  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12414  	bits = bits + uint32(8)
 12415  	goto __213
 12416  __213:
 12417  	if 0 != 0 {
 12418  		goto __212
 12419  	}
 12420  	goto __214
 12421  __214:
 12422  	;
 12423  	goto __210
 12424  __211:
 12425  	;
 12426  	goto __208
 12427  __208:
 12428  	if 0 != 0 {
 12429  		goto __207
 12430  	}
 12431  	goto __209
 12432  __209:
 12433  	;
 12434  	(*Inflate_state)(unsafe.Pointer(state)).Flast = int32(uint32(hold) & (uint32(1)<<1 - uint32(1)))
 12435  __216:
 12436  	hold >>= 1
 12437  	bits = bits - uint32(1)
 12438  	goto __217
 12439  __217:
 12440  	if 0 != 0 {
 12441  		goto __216
 12442  	}
 12443  	goto __218
 12444  __218:
 12445  	;
 12446  	switch uint32(hold) & (uint32(1)<<2 - uint32(1)) {
 12447  	case uint32(0):
 12448  		goto __220
 12449  	case uint32(1):
 12450  		goto __221
 12451  	case uint32(2):
 12452  		goto __222
 12453  	case uint32(3):
 12454  		goto __223
 12455  	}
 12456  	goto __219
 12457  __220: // stored block
 12458  	;
 12459  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED
 12460  	goto __219
 12461  __221: // fixed block
 12462  	fixedtables1(tls, state)
 12463  
 12464  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ // decode codes
 12465  	if !(flush == Z_TREES) {
 12466  		goto __224
 12467  	}
 12468  __225:
 12469  	hold >>= 2
 12470  	bits = bits - uint32(2)
 12471  	goto __226
 12472  __226:
 12473  	if 0 != 0 {
 12474  		goto __225
 12475  	}
 12476  	goto __227
 12477  __227:
 12478  	;
 12479  	goto inf_leave
 12480  __224:
 12481  	;
 12482  	goto __219
 12483  __222: // dynamic block
 12484  	;
 12485  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE
 12486  	goto __219
 12487  __223:
 12488  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */
 12489  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12490  __219:
 12491  	;
 12492  __228:
 12493  	hold >>= 2
 12494  	bits = bits - uint32(2)
 12495  	goto __229
 12496  __229:
 12497  	if 0 != 0 {
 12498  		goto __228
 12499  	}
 12500  	goto __230
 12501  __230:
 12502  	;
 12503  	goto __9
 12504  __23:
 12505  __231:
 12506  	hold >>= bits & uint32(7)
 12507  	bits = bits - bits&uint32(7)
 12508  	goto __232
 12509  __232:
 12510  	if 0 != 0 {
 12511  		goto __231
 12512  	}
 12513  	goto __233
 12514  __233:
 12515  	; // go to byte boundary
 12516  __234:
 12517  __237:
 12518  	if !(bits < uint32(32)) {
 12519  		goto __238
 12520  	}
 12521  __239:
 12522  	if !(have == uint32(0)) {
 12523  		goto __242
 12524  	}
 12525  	goto inf_leave
 12526  __242:
 12527  	;
 12528  	have--
 12529  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12530  	bits = bits + uint32(8)
 12531  	goto __240
 12532  __240:
 12533  	if 0 != 0 {
 12534  		goto __239
 12535  	}
 12536  	goto __241
 12537  __241:
 12538  	;
 12539  	goto __237
 12540  __238:
 12541  	;
 12542  	goto __235
 12543  __235:
 12544  	if 0 != 0 {
 12545  		goto __234
 12546  	}
 12547  	goto __236
 12548  __236:
 12549  	;
 12550  	if !(hold&uint32(0xffff) != hold>>16^uint32(0xffff)) {
 12551  		goto __243
 12552  	}
 12553  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */
 12554  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12555  	goto __9
 12556  __243:
 12557  	;
 12558  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff)
 12559  
 12560  __244:
 12561  	hold = uint32(0)
 12562  	bits = uint32(0)
 12563  	goto __245
 12564  __245:
 12565  	if 0 != 0 {
 12566  		goto __244
 12567  	}
 12568  	goto __246
 12569  __246:
 12570  	;
 12571  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY_
 12572  	if !(flush == Z_TREES) {
 12573  		goto __247
 12574  	}
 12575  	goto inf_leave
 12576  __247:
 12577  	;
 12578  __24:
 12579  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY
 12580  __25:
 12581  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 12582  	if !(copy != 0) {
 12583  		goto __248
 12584  	}
 12585  	if !(copy > have) {
 12586  		goto __249
 12587  	}
 12588  	copy = have
 12589  __249:
 12590  	;
 12591  	if !(copy > left) {
 12592  		goto __250
 12593  	}
 12594  	copy = left
 12595  __250:
 12596  	;
 12597  	if !(copy == uint32(0)) {
 12598  		goto __251
 12599  	}
 12600  	goto inf_leave
 12601  __251:
 12602  	;
 12603  	libc.Xmemcpy(tls, put, next, copy)
 12604  	have = have - copy
 12605  	next += uintptr(copy)
 12606  	left = left - copy
 12607  	put += uintptr(copy)
 12608  	*(*uint32)(unsafe.Pointer(state + 68)) -= copy
 12609  	goto __9
 12610  __248:
 12611  	;
 12612  
 12613  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 12614  	goto __9
 12615  __26:
 12616  __252:
 12617  __255:
 12618  	if !(bits < uint32(14)) {
 12619  		goto __256
 12620  	}
 12621  __257:
 12622  	if !(have == uint32(0)) {
 12623  		goto __260
 12624  	}
 12625  	goto inf_leave
 12626  __260:
 12627  	;
 12628  	have--
 12629  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12630  	bits = bits + uint32(8)
 12631  	goto __258
 12632  __258:
 12633  	if 0 != 0 {
 12634  		goto __257
 12635  	}
 12636  	goto __259
 12637  __259:
 12638  	;
 12639  	goto __255
 12640  __256:
 12641  	;
 12642  	goto __253
 12643  __253:
 12644  	if 0 != 0 {
 12645  		goto __252
 12646  	}
 12647  	goto __254
 12648  __254:
 12649  	;
 12650  	(*Inflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(257)
 12651  __261:
 12652  	hold >>= 5
 12653  	bits = bits - uint32(5)
 12654  	goto __262
 12655  __262:
 12656  	if 0 != 0 {
 12657  		goto __261
 12658  	}
 12659  	goto __263
 12660  __263:
 12661  	;
 12662  	(*Inflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(1)
 12663  __264:
 12664  	hold >>= 5
 12665  	bits = bits - uint32(5)
 12666  	goto __265
 12667  __265:
 12668  	if 0 != 0 {
 12669  		goto __264
 12670  	}
 12671  	goto __266
 12672  __266:
 12673  	;
 12674  	(*Inflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(4)
 12675  __267:
 12676  	hold >>= 4
 12677  	bits = bits - uint32(4)
 12678  	goto __268
 12679  __268:
 12680  	if 0 != 0 {
 12681  		goto __267
 12682  	}
 12683  	goto __269
 12684  __269:
 12685  	;
 12686  	if !((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30)) {
 12687  		goto __270
 12688  	}
 12689  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */
 12690  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12691  	goto __9
 12692  __270:
 12693  	;
 12694  
 12695  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 12696  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENLENS
 12697  __27:
 12698  __271:
 12699  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) {
 12700  		goto __272
 12701  	}
 12702  __273:
 12703  __276:
 12704  	if !(bits < uint32(3)) {
 12705  		goto __277
 12706  	}
 12707  __278:
 12708  	if !(have == uint32(0)) {
 12709  		goto __281
 12710  	}
 12711  	goto inf_leave
 12712  __281:
 12713  	;
 12714  	have--
 12715  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12716  	bits = bits + uint32(8)
 12717  	goto __279
 12718  __279:
 12719  	if 0 != 0 {
 12720  		goto __278
 12721  	}
 12722  	goto __280
 12723  __280:
 12724  	;
 12725  	goto __276
 12726  __277:
 12727  	;
 12728  	goto __274
 12729  __274:
 12730  	if 0 != 0 {
 12731  		goto __273
 12732  	}
 12733  	goto __275
 12734  __275:
 12735  	;
 12736  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(uint32(hold) & (uint32(1)<<3 - uint32(1)))
 12737  __282:
 12738  	hold >>= 3
 12739  	bits = bits - uint32(3)
 12740  	goto __283
 12741  __283:
 12742  	if 0 != 0 {
 12743  		goto __282
 12744  	}
 12745  	goto __284
 12746  __284:
 12747  	;
 12748  	goto __271
 12749  __272:
 12750  	;
 12751  __285:
 12752  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) {
 12753  		goto __286
 12754  	}
 12755  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0)
 12756  	goto __285
 12757  __286:
 12758  	;
 12759  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */
 12760  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 12761  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7)
 12762  	ret = Xinflate_table(tls, CODES, state+116, uint32(19), state+112,
 12763  		state+88, state+756)
 12764  	if !(ret != 0) {
 12765  		goto __287
 12766  	}
 12767  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */
 12768  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12769  	goto __9
 12770  __287:
 12771  	;
 12772  
 12773  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 12774  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = CODELENS
 12775  __28:
 12776  __288:
 12777  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
 12778  		goto __289
 12779  	}
 12780  __290:
 12781  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
 12782  	if !(uint32(here.Fbits) <= bits) {
 12783  		goto __293
 12784  	}
 12785  	goto __292
 12786  __293:
 12787  	;
 12788  __294:
 12789  	if !(have == uint32(0)) {
 12790  		goto __297
 12791  	}
 12792  	goto inf_leave
 12793  __297:
 12794  	;
 12795  	have--
 12796  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12797  	bits = bits + uint32(8)
 12798  	goto __295
 12799  __295:
 12800  	if 0 != 0 {
 12801  		goto __294
 12802  	}
 12803  	goto __296
 12804  __296:
 12805  	;
 12806  	goto __291
 12807  __291:
 12808  	goto __290
 12809  	goto __292
 12810  __292:
 12811  	;
 12812  	if !(int32(here.Fval) < 16) {
 12813  		goto __298
 12814  	}
 12815  __300:
 12816  	hold >>= int32(here.Fbits)
 12817  	bits = bits - uint32(here.Fbits)
 12818  	goto __301
 12819  __301:
 12820  	if 0 != 0 {
 12821  		goto __300
 12822  	}
 12823  	goto __302
 12824  __302:
 12825  	;
 12826  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval
 12827  	goto __299
 12828  __298:
 12829  	if !(int32(here.Fval) == 16) {
 12830  		goto __303
 12831  	}
 12832  __305:
 12833  __308:
 12834  	if !(bits < uint32(int32(here.Fbits)+2)) {
 12835  		goto __309
 12836  	}
 12837  __310:
 12838  	if !(have == uint32(0)) {
 12839  		goto __313
 12840  	}
 12841  	goto inf_leave
 12842  __313:
 12843  	;
 12844  	have--
 12845  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12846  	bits = bits + uint32(8)
 12847  	goto __311
 12848  __311:
 12849  	if 0 != 0 {
 12850  		goto __310
 12851  	}
 12852  	goto __312
 12853  __312:
 12854  	;
 12855  	goto __308
 12856  __309:
 12857  	;
 12858  	goto __306
 12859  __306:
 12860  	if 0 != 0 {
 12861  		goto __305
 12862  	}
 12863  	goto __307
 12864  __307:
 12865  	;
 12866  __314:
 12867  	hold >>= int32(here.Fbits)
 12868  	bits = bits - uint32(here.Fbits)
 12869  	goto __315
 12870  __315:
 12871  	if 0 != 0 {
 12872  		goto __314
 12873  	}
 12874  	goto __316
 12875  __316:
 12876  	;
 12877  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) {
 12878  		goto __317
 12879  	}
 12880  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
 12881  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12882  	goto __289
 12883  __317:
 12884  	;
 12885  	len = uint32(*(*uint16)(unsafe.Pointer(state + 116 + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2)))
 12886  	copy = uint32(3) + uint32(hold)&(uint32(1)<<2-uint32(1))
 12887  __318:
 12888  	hold >>= 2
 12889  	bits = bits - uint32(2)
 12890  	goto __319
 12891  __319:
 12892  	if 0 != 0 {
 12893  		goto __318
 12894  	}
 12895  	goto __320
 12896  __320:
 12897  	;
 12898  	goto __304
 12899  __303:
 12900  	if !(int32(here.Fval) == 17) {
 12901  		goto __321
 12902  	}
 12903  __323:
 12904  __326:
 12905  	if !(bits < uint32(int32(here.Fbits)+3)) {
 12906  		goto __327
 12907  	}
 12908  __328:
 12909  	if !(have == uint32(0)) {
 12910  		goto __331
 12911  	}
 12912  	goto inf_leave
 12913  __331:
 12914  	;
 12915  	have--
 12916  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12917  	bits = bits + uint32(8)
 12918  	goto __329
 12919  __329:
 12920  	if 0 != 0 {
 12921  		goto __328
 12922  	}
 12923  	goto __330
 12924  __330:
 12925  	;
 12926  	goto __326
 12927  __327:
 12928  	;
 12929  	goto __324
 12930  __324:
 12931  	if 0 != 0 {
 12932  		goto __323
 12933  	}
 12934  	goto __325
 12935  __325:
 12936  	;
 12937  __332:
 12938  	hold >>= int32(here.Fbits)
 12939  	bits = bits - uint32(here.Fbits)
 12940  	goto __333
 12941  __333:
 12942  	if 0 != 0 {
 12943  		goto __332
 12944  	}
 12945  	goto __334
 12946  __334:
 12947  	;
 12948  	len = uint32(0)
 12949  	copy = uint32(3) + uint32(hold)&(uint32(1)<<3-uint32(1))
 12950  __335:
 12951  	hold >>= 3
 12952  	bits = bits - uint32(3)
 12953  	goto __336
 12954  __336:
 12955  	if 0 != 0 {
 12956  		goto __335
 12957  	}
 12958  	goto __337
 12959  __337:
 12960  	;
 12961  	goto __322
 12962  __321:
 12963  __338:
 12964  __341:
 12965  	if !(bits < uint32(int32(here.Fbits)+7)) {
 12966  		goto __342
 12967  	}
 12968  __343:
 12969  	if !(have == uint32(0)) {
 12970  		goto __346
 12971  	}
 12972  	goto inf_leave
 12973  __346:
 12974  	;
 12975  	have--
 12976  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12977  	bits = bits + uint32(8)
 12978  	goto __344
 12979  __344:
 12980  	if 0 != 0 {
 12981  		goto __343
 12982  	}
 12983  	goto __345
 12984  __345:
 12985  	;
 12986  	goto __341
 12987  __342:
 12988  	;
 12989  	goto __339
 12990  __339:
 12991  	if 0 != 0 {
 12992  		goto __338
 12993  	}
 12994  	goto __340
 12995  __340:
 12996  	;
 12997  __347:
 12998  	hold >>= int32(here.Fbits)
 12999  	bits = bits - uint32(here.Fbits)
 13000  	goto __348
 13001  __348:
 13002  	if 0 != 0 {
 13003  		goto __347
 13004  	}
 13005  	goto __349
 13006  __349:
 13007  	;
 13008  	len = uint32(0)
 13009  	copy = uint32(11) + uint32(hold)&(uint32(1)<<7-uint32(1))
 13010  __350:
 13011  	hold >>= 7
 13012  	bits = bits - uint32(7)
 13013  	goto __351
 13014  __351:
 13015  	if 0 != 0 {
 13016  		goto __350
 13017  	}
 13018  	goto __352
 13019  __352:
 13020  	;
 13021  __322:
 13022  	;
 13023  __304:
 13024  	;
 13025  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave+copy > (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
 13026  		goto __353
 13027  	}
 13028  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
 13029  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13030  	goto __289
 13031  __353:
 13032  	;
 13033  __354:
 13034  	if !(libc.PostDecUint32(&copy, 1) != 0) {
 13035  		goto __355
 13036  	}
 13037  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len)
 13038  	goto __354
 13039  __355:
 13040  	;
 13041  __299:
 13042  	;
 13043  	goto __288
 13044  __289:
 13045  	;
 13046  
 13047  	// handle error breaks in while
 13048  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) {
 13049  		goto __356
 13050  	}
 13051  	goto __9
 13052  __356:
 13053  	;
 13054  
 13055  	// check for end-of-block code (better have one)
 13056  	if !(int32(*(*uint16)(unsafe.Pointer(state + 116 + 256*2))) == 0) {
 13057  		goto __357
 13058  	}
 13059  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */
 13060  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13061  	goto __9
 13062  __357:
 13063  	;
 13064  
 13065  	// build code tables -- note: do not change the lenbits or distbits
 13066  	//                values here (9 and 6) without reading the comments in inftrees.h
 13067  	//                concerning the ENOUGH constants, which depend on those values
 13068  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */
 13069  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 13070  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
 13071  	ret = Xinflate_table(tls, LENS, state+116, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, state+112,
 13072  		state+88, state+756)
 13073  	if !(ret != 0) {
 13074  		goto __358
 13075  	}
 13076  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */
 13077  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13078  	goto __9
 13079  __358:
 13080  	;
 13081  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 13082  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6)
 13083  	ret = Xinflate_table(tls, DISTS, state+116+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Inflate_state)(unsafe.Pointer(state)).Fndist,
 13084  		state+112, state+92, state+756)
 13085  	if !(ret != 0) {
 13086  		goto __359
 13087  	}
 13088  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */
 13089  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13090  	goto __9
 13091  __359:
 13092  	;
 13093  
 13094  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_
 13095  	if !(flush == Z_TREES) {
 13096  		goto __360
 13097  	}
 13098  	goto inf_leave
 13099  __360:
 13100  	;
 13101  __29:
 13102  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 13103  __30:
 13104  	if !(have >= uint32(6) && left >= uint32(258)) {
 13105  		goto __361
 13106  	}
 13107  __362:
 13108  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 13109  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 13110  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
 13111  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 13112  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 13113  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 13114  	goto __363
 13115  __363:
 13116  	if 0 != 0 {
 13117  		goto __362
 13118  	}
 13119  	goto __364
 13120  __364:
 13121  	;
 13122  	Xinflate_fast(tls, strm, out)
 13123  __365:
 13124  	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 13125  	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 13126  	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 13127  	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 13128  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 13129  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 13130  	goto __366
 13131  __366:
 13132  	if 0 != 0 {
 13133  		goto __365
 13134  	}
 13135  	goto __367
 13136  __367:
 13137  	;
 13138  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) {
 13139  		goto __368
 13140  	}
 13141  	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
 13142  __368:
 13143  	;
 13144  	goto __9
 13145  __361:
 13146  	;
 13147  	(*Inflate_state)(unsafe.Pointer(state)).Fback = 0
 13148  __369:
 13149  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
 13150  	if !(uint32(here.Fbits) <= bits) {
 13151  		goto __372
 13152  	}
 13153  	goto __371
 13154  __372:
 13155  	;
 13156  __373:
 13157  	if !(have == uint32(0)) {
 13158  		goto __376
 13159  	}
 13160  	goto inf_leave
 13161  __376:
 13162  	;
 13163  	have--
 13164  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13165  	bits = bits + uint32(8)
 13166  	goto __374
 13167  __374:
 13168  	if 0 != 0 {
 13169  		goto __373
 13170  	}
 13171  	goto __375
 13172  __375:
 13173  	;
 13174  	goto __370
 13175  __370:
 13176  	goto __369
 13177  	goto __371
 13178  __371:
 13179  	;
 13180  	if !(here.Fop != 0 && int32(here.Fop)&0xf0 == 0) {
 13181  		goto __377
 13182  	}
 13183  	last = here
 13184  __378:
 13185  	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))
 13186  	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
 13187  		goto __381
 13188  	}
 13189  	goto __380
 13190  __381:
 13191  	;
 13192  __382:
 13193  	if !(have == uint32(0)) {
 13194  		goto __385
 13195  	}
 13196  	goto inf_leave
 13197  __385:
 13198  	;
 13199  	have--
 13200  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13201  	bits = bits + uint32(8)
 13202  	goto __383
 13203  __383:
 13204  	if 0 != 0 {
 13205  		goto __382
 13206  	}
 13207  	goto __384
 13208  __384:
 13209  	;
 13210  	goto __379
 13211  __379:
 13212  	goto __378
 13213  	goto __380
 13214  __380:
 13215  	;
 13216  __386:
 13217  	hold >>= int32(last.Fbits)
 13218  	bits = bits - uint32(last.Fbits)
 13219  	goto __387
 13220  __387:
 13221  	if 0 != 0 {
 13222  		goto __386
 13223  	}
 13224  	goto __388
 13225  __388:
 13226  	;
 13227  	*(*int32)(unsafe.Pointer(state + 7112)) += int32(last.Fbits)
 13228  __377:
 13229  	;
 13230  __389:
 13231  	hold >>= int32(here.Fbits)
 13232  	bits = bits - uint32(here.Fbits)
 13233  	goto __390
 13234  __390:
 13235  	if 0 != 0 {
 13236  		goto __389
 13237  	}
 13238  	goto __391
 13239  __391:
 13240  	;
 13241  	*(*int32)(unsafe.Pointer(state + 7112)) += int32(here.Fbits)
 13242  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval)
 13243  	if !(int32(here.Fop) == 0) {
 13244  		goto __392
 13245  	}
 13246  
 13247  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LIT
 13248  	goto __9
 13249  __392:
 13250  	;
 13251  	if !(int32(here.Fop)&32 != 0) {
 13252  		goto __393
 13253  	}
 13254  
 13255  	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
 13256  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 13257  	goto __9
 13258  __393:
 13259  	;
 13260  	if !(int32(here.Fop)&64 != 0) {
 13261  		goto __394
 13262  	}
 13263  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */
 13264  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13265  	goto __9
 13266  __394:
 13267  	;
 13268  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
 13269  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENEXT
 13270  __31:
 13271  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) {
 13272  		goto __395
 13273  	}
 13274  __396:
 13275  __399:
 13276  	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
 13277  		goto __400
 13278  	}
 13279  __401:
 13280  	if !(have == uint32(0)) {
 13281  		goto __404
 13282  	}
 13283  	goto inf_leave
 13284  __404:
 13285  	;
 13286  	have--
 13287  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13288  	bits = bits + uint32(8)
 13289  	goto __402
 13290  __402:
 13291  	if 0 != 0 {
 13292  		goto __401
 13293  	}
 13294  	goto __403
 13295  __403:
 13296  	;
 13297  	goto __399
 13298  __400:
 13299  	;
 13300  	goto __397
 13301  __397:
 13302  	if 0 != 0 {
 13303  		goto __396
 13304  	}
 13305  	goto __398
 13306  __398:
 13307  	;
 13308  	*(*uint32)(unsafe.Pointer(state + 68)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
 13309  __405:
 13310  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 13311  	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
 13312  	goto __406
 13313  __406:
 13314  	if 0 != 0 {
 13315  		goto __405
 13316  	}
 13317  	goto __407
 13318  __407:
 13319  	;
 13320  	*(*int32)(unsafe.Pointer(state + 7112)) += int32((*Inflate_state)(unsafe.Pointer(state)).Fextra)
 13321  __395:
 13322  	;
 13323  
 13324  	(*Inflate_state)(unsafe.Pointer(state)).Fwas = (*Inflate_state)(unsafe.Pointer(state)).Flength
 13325  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DIST
 13326  __32:
 13327  __408:
 13328  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits-uint32(1)))*4))
 13329  	if !(uint32(here.Fbits) <= bits) {
 13330  		goto __411
 13331  	}
 13332  	goto __410
 13333  __411:
 13334  	;
 13335  __412:
 13336  	if !(have == uint32(0)) {
 13337  		goto __415
 13338  	}
 13339  	goto inf_leave
 13340  __415:
 13341  	;
 13342  	have--
 13343  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13344  	bits = bits + uint32(8)
 13345  	goto __413
 13346  __413:
 13347  	if 0 != 0 {
 13348  		goto __412
 13349  	}
 13350  	goto __414
 13351  __414:
 13352  	;
 13353  	goto __409
 13354  __409:
 13355  	goto __408
 13356  	goto __410
 13357  __410:
 13358  	;
 13359  	if !(int32(here.Fop)&0xf0 == 0) {
 13360  		goto __416
 13361  	}
 13362  	last = here
 13363  __417:
 13364  	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))
 13365  	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
 13366  		goto __420
 13367  	}
 13368  	goto __419
 13369  __420:
 13370  	;
 13371  __421:
 13372  	if !(have == uint32(0)) {
 13373  		goto __424
 13374  	}
 13375  	goto inf_leave
 13376  __424:
 13377  	;
 13378  	have--
 13379  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13380  	bits = bits + uint32(8)
 13381  	goto __422
 13382  __422:
 13383  	if 0 != 0 {
 13384  		goto __421
 13385  	}
 13386  	goto __423
 13387  __423:
 13388  	;
 13389  	goto __418
 13390  __418:
 13391  	goto __417
 13392  	goto __419
 13393  __419:
 13394  	;
 13395  __425:
 13396  	hold >>= int32(last.Fbits)
 13397  	bits = bits - uint32(last.Fbits)
 13398  	goto __426
 13399  __426:
 13400  	if 0 != 0 {
 13401  		goto __425
 13402  	}
 13403  	goto __427
 13404  __427:
 13405  	;
 13406  	*(*int32)(unsafe.Pointer(state + 7112)) += int32(last.Fbits)
 13407  __416:
 13408  	;
 13409  __428:
 13410  	hold >>= int32(here.Fbits)
 13411  	bits = bits - uint32(here.Fbits)
 13412  	goto __429
 13413  __429:
 13414  	if 0 != 0 {
 13415  		goto __428
 13416  	}
 13417  	goto __430
 13418  __430:
 13419  	;
 13420  	*(*int32)(unsafe.Pointer(state + 7112)) += int32(here.Fbits)
 13421  	if !(int32(here.Fop)&64 != 0) {
 13422  		goto __431
 13423  	}
 13424  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */
 13425  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13426  	goto __9
 13427  __431:
 13428  	;
 13429  	(*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval)
 13430  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
 13431  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DISTEXT
 13432  __33:
 13433  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) {
 13434  		goto __432
 13435  	}
 13436  __433:
 13437  __436:
 13438  	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
 13439  		goto __437
 13440  	}
 13441  __438:
 13442  	if !(have == uint32(0)) {
 13443  		goto __441
 13444  	}
 13445  	goto inf_leave
 13446  __441:
 13447  	;
 13448  	have--
 13449  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13450  	bits = bits + uint32(8)
 13451  	goto __439
 13452  __439:
 13453  	if 0 != 0 {
 13454  		goto __438
 13455  	}
 13456  	goto __440
 13457  __440:
 13458  	;
 13459  	goto __436
 13460  __437:
 13461  	;
 13462  	goto __434
 13463  __434:
 13464  	if 0 != 0 {
 13465  		goto __433
 13466  	}
 13467  	goto __435
 13468  __435:
 13469  	;
 13470  	*(*uint32)(unsafe.Pointer(state + 72)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
 13471  __442:
 13472  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 13473  	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
 13474  	goto __443
 13475  __443:
 13476  	if 0 != 0 {
 13477  		goto __442
 13478  	}
 13479  	goto __444
 13480  __444:
 13481  	;
 13482  	*(*int32)(unsafe.Pointer(state + 7112)) += int32((*Inflate_state)(unsafe.Pointer(state)).Fextra)
 13483  __432:
 13484  	;
 13485  
 13486  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = MATCH
 13487  __34:
 13488  	if !(left == uint32(0)) {
 13489  		goto __445
 13490  	}
 13491  	goto inf_leave
 13492  __445:
 13493  	;
 13494  	copy = out - left
 13495  	if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > copy) {
 13496  		goto __446
 13497  	} // copy from window
 13498  	copy = (*Inflate_state)(unsafe.Pointer(state)).Foffset - copy
 13499  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwhave) {
 13500  		goto __448
 13501  	}
 13502  	if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) {
 13503  		goto __449
 13504  	}
 13505  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */
 13506  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13507  	goto __9
 13508  __449:
 13509  	;
 13510  __448:
 13511  	;
 13512  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwnext) {
 13513  		goto __450
 13514  	}
 13515  	copy = copy - (*Inflate_state)(unsafe.Pointer(state)).Fwnext
 13516  	from = (*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize-copy)
 13517  	goto __451
 13518  __450:
 13519  	from = (*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext-copy)
 13520  __451:
 13521  	;
 13522  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) {
 13523  		goto __452
 13524  	}
 13525  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 13526  __452:
 13527  	;
 13528  	goto __447
 13529  __446: // copy from output
 13530  	from = put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)
 13531  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 13532  __447:
 13533  	;
 13534  	if !(copy > left) {
 13535  		goto __453
 13536  	}
 13537  	copy = left
 13538  __453:
 13539  	;
 13540  	left = left - copy
 13541  	*(*uint32)(unsafe.Pointer(state + 68)) -= copy
 13542  __454:
 13543  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 13544  	goto __455
 13545  __455:
 13546  	if libc.PreDecUint32(&copy, 1) != 0 {
 13547  		goto __454
 13548  	}
 13549  	goto __456
 13550  __456:
 13551  	;
 13552  	if !((*Inflate_state)(unsafe.Pointer(state)).Flength == uint32(0)) {
 13553  		goto __457
 13554  	}
 13555  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 13556  __457:
 13557  	;
 13558  	goto __9
 13559  __35:
 13560  	if !(left == uint32(0)) {
 13561  		goto __458
 13562  	}
 13563  	goto inf_leave
 13564  __458:
 13565  	;
 13566  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength)
 13567  	left--
 13568  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 13569  	goto __9
 13570  __36:
 13571  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) {
 13572  		goto __459
 13573  	}
 13574  __460:
 13575  __463:
 13576  	if !(bits < uint32(32)) {
 13577  		goto __464
 13578  	}
 13579  __465:
 13580  	if !(have == uint32(0)) {
 13581  		goto __468
 13582  	}
 13583  	goto inf_leave
 13584  __468:
 13585  	;
 13586  	have--
 13587  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13588  	bits = bits + uint32(8)
 13589  	goto __466
 13590  __466:
 13591  	if 0 != 0 {
 13592  		goto __465
 13593  	}
 13594  	goto __467
 13595  __467:
 13596  	;
 13597  	goto __463
 13598  __464:
 13599  	;
 13600  	goto __461
 13601  __461:
 13602  	if 0 != 0 {
 13603  		goto __460
 13604  	}
 13605  	goto __462
 13606  __462:
 13607  	;
 13608  	out = out - left
 13609  	*(*ULong)(unsafe.Pointer(strm + 20)) += ULong(out)
 13610  	*(*uint32)(unsafe.Pointer(state + 32)) += uint32(out)
 13611  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && out != 0) {
 13612  		goto __469
 13613  	}
 13614  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, func() uint32 {
 13615  		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
 13616  			return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out)
 13617  		}
 13618  		return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out)
 13619  	}())
 13620  __469:
 13621  	;
 13622  	out = left
 13623  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && func() uint32 {
 13624  		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
 13625  			return hold
 13626  		}
 13627  		return hold>>24&uint32(0xff) + hold>>8&uint32(0xff00) + hold&uint32(0xff00)<<8 + hold&uint32(0xff)<<24
 13628  	}() != (*Inflate_state)(unsafe.Pointer(state)).Fcheck) {
 13629  		goto __470
 13630  	}
 13631  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 784 /* "incorrect data c..." */
 13632  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13633  	goto __9
 13634  __470:
 13635  	;
 13636  __471:
 13637  	hold = uint32(0)
 13638  	bits = uint32(0)
 13639  	goto __472
 13640  __472:
 13641  	if 0 != 0 {
 13642  		goto __471
 13643  	}
 13644  	goto __473
 13645  __473:
 13646  	;
 13647  
 13648  __459:
 13649  	;
 13650  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENGTH
 13651  __37:
 13652  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0) {
 13653  		goto __474
 13654  	}
 13655  __475:
 13656  __478:
 13657  	if !(bits < uint32(32)) {
 13658  		goto __479
 13659  	}
 13660  __480:
 13661  	if !(have == uint32(0)) {
 13662  		goto __483
 13663  	}
 13664  	goto inf_leave
 13665  __483:
 13666  	;
 13667  	have--
 13668  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13669  	bits = bits + uint32(8)
 13670  	goto __481
 13671  __481:
 13672  	if 0 != 0 {
 13673  		goto __480
 13674  	}
 13675  	goto __482
 13676  __482:
 13677  	;
 13678  	goto __478
 13679  __479:
 13680  	;
 13681  	goto __476
 13682  __476:
 13683  	if 0 != 0 {
 13684  		goto __475
 13685  	}
 13686  	goto __477
 13687  __477:
 13688  	;
 13689  	if !(hold != (*Inflate_state)(unsafe.Pointer(state)).Ftotal&0xffffffff) {
 13690  		goto __484
 13691  	}
 13692  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 805 /* "incorrect length..." */
 13693  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13694  	goto __9
 13695  __484:
 13696  	;
 13697  __485:
 13698  	hold = uint32(0)
 13699  	bits = uint32(0)
 13700  	goto __486
 13701  __486:
 13702  	if 0 != 0 {
 13703  		goto __485
 13704  	}
 13705  	goto __487
 13706  __487:
 13707  	;
 13708  
 13709  __474:
 13710  	;
 13711  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE
 13712  __38:
 13713  	ret = Z_STREAM_END
 13714  	goto inf_leave
 13715  __39:
 13716  	ret = -3
 13717  	goto inf_leave
 13718  __40:
 13719  	return -4
 13720  __41:
 13721  __42:
 13722  	return -2
 13723  __9:
 13724  	;
 13725  	goto __7
 13726  __7:
 13727  	goto __6
 13728  	goto __8
 13729  __8:
 13730  	;
 13731  
 13732  	//
 13733  	//        Return from inflate(), updating the total counts and the check value.
 13734  	//        If there was no progress during the inflate() call, return a buffer
 13735  	//        error.  Call updatewindow() to create and/or update the window state.
 13736  	//        Note: a memory error from inflate() is non-recoverable.
 13737  	//
 13738  inf_leave:
 13739  __488:
 13740  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 13741  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 13742  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
 13743  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 13744  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 13745  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 13746  	goto __489
 13747  __489:
 13748  	if 0 != 0 {
 13749  		goto __488
 13750  	}
 13751  	goto __490
 13752  __490:
 13753  	;
 13754  	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)) {
 13755  		goto __491
 13756  	}
 13757  	if !(updatewindow(tls, strm, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, out-(*Z_stream)(unsafe.Pointer(strm)).Favail_out) != 0) {
 13758  		goto __492
 13759  	}
 13760  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM
 13761  	return -4
 13762  __492:
 13763  	;
 13764  __491:
 13765  	;
 13766  	in = in - (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 13767  	out = out - (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 13768  	*(*ULong)(unsafe.Pointer(strm + 8)) += ULong(in)
 13769  	*(*ULong)(unsafe.Pointer(strm + 20)) += ULong(out)
 13770  	*(*uint32)(unsafe.Pointer(state + 32)) += uint32(out)
 13771  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && out != 0) {
 13772  		goto __493
 13773  	}
 13774  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, func() uint32 {
 13775  		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
 13776  			return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out-uintptr(out), out)
 13777  		}
 13778  		return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out-uintptr(out), out)
 13779  	}())
 13780  __493:
 13781  	;
 13782  	(*Z_stream)(unsafe.Pointer(strm)).Fdata_type = int32((*Inflate_state)(unsafe.Pointer(state)).Fbits) + func() int32 {
 13783  		if (*Inflate_state)(unsafe.Pointer(state)).Flast != 0 {
 13784  			return 64
 13785  		}
 13786  		return 0
 13787  	}() + func() int32 {
 13788  		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE {
 13789  			return 128
 13790  		}
 13791  		return 0
 13792  	}() + func() int32 {
 13793  		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == LEN_ || (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY_ {
 13794  			return 256
 13795  		}
 13796  		return 0
 13797  	}()
 13798  	if !((in == uint32(0) && out == uint32(0) || flush == Z_FINISH) && ret == Z_OK) {
 13799  		goto __494
 13800  	}
 13801  	ret = -5
 13802  __494:
 13803  	;
 13804  	return ret
 13805  }
 13806  
 13807  var order1 =                                                                                                                                                                                                                         // permutation of code lengths
 13808  [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 */
 13809  
 13810  func XinflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1277:13: */
 13811  	var state uintptr
 13812  	if inflateStateCheck(tls, strm) != 0 {
 13813  		return -2
 13814  	}
 13815  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13816  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) {
 13817  		(*struct {
 13818  			f func(*libc.TLS, Voidpf, Voidpf)
 13819  		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow)
 13820  	}
 13821  	(*struct {
 13822  		f func(*libc.TLS, Voidpf, Voidpf)
 13823  	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
 13824  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
 13825  
 13826  	return Z_OK
 13827  }
 13828  
 13829  func XinflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* inflate.c:1291:13: */
 13830  	var state uintptr
 13831  
 13832  	// check state
 13833  	if inflateStateCheck(tls, strm) != 0 {
 13834  		return -2
 13835  	}
 13836  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13837  
 13838  	// copy dictionary
 13839  	if (*Inflate_state)(unsafe.Pointer(state)).Fwhave != 0 && dictionary != uintptr(Z_NULL) {
 13840  		libc.Xmemcpy(tls, dictionary, (*Inflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext),
 13841  			(*Inflate_state)(unsafe.Pointer(state)).Fwhave-(*Inflate_state)(unsafe.Pointer(state)).Fwnext)
 13842  		libc.Xmemcpy(tls, dictionary+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwhave)-uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext),
 13843  			(*Inflate_state)(unsafe.Pointer(state)).Fwindow, (*Inflate_state)(unsafe.Pointer(state)).Fwnext)
 13844  	}
 13845  	if dictLength != uintptr(Z_NULL) {
 13846  		*(*UInt)(unsafe.Pointer(dictLength)) = (*Inflate_state)(unsafe.Pointer(state)).Fwhave
 13847  	}
 13848  	return Z_OK
 13849  }
 13850  
 13851  func XinflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* inflate.c:1314:13: */
 13852  	var state uintptr
 13853  	var dictid uint32
 13854  	var ret int32
 13855  
 13856  	// check state
 13857  	if inflateStateCheck(tls, strm) != 0 {
 13858  		return -2
 13859  	}
 13860  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13861  	if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fmode != DICT {
 13862  		return -2
 13863  	}
 13864  
 13865  	// check for correct dictionary identifier
 13866  	if (*Inflate_state)(unsafe.Pointer(state)).Fmode == DICT {
 13867  		dictid = Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
 13868  		dictid = Xadler32(tls, dictid, dictionary, dictLength)
 13869  		if dictid != (*Inflate_state)(unsafe.Pointer(state)).Fcheck {
 13870  			return -3
 13871  		}
 13872  	}
 13873  
 13874  	// copy dictionary to window using updatewindow(), which will amend the
 13875  	//        existing dictionary if appropriate
 13876  	ret = updatewindow(tls, strm, dictionary+uintptr(dictLength), dictLength)
 13877  	if ret != 0 {
 13878  		(*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM
 13879  		return -4
 13880  	}
 13881  	(*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 1
 13882  
 13883  	return Z_OK
 13884  }
 13885  
 13886  func XinflateGetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* inflate.c:1349:13: */
 13887  	var state uintptr
 13888  
 13889  	// check state
 13890  	if inflateStateCheck(tls, strm) != 0 {
 13891  		return -2
 13892  	}
 13893  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13894  	if (*Inflate_state)(unsafe.Pointer(state)).Fwrap&2 == 0 {
 13895  		return -2
 13896  	}
 13897  
 13898  	// save header structure
 13899  	(*Inflate_state)(unsafe.Pointer(state)).Fhead = head
 13900  	(*Gz_header)(unsafe.Pointer(head)).Fdone = 0
 13901  	return Z_OK
 13902  }
 13903  
 13904  //
 13905  //    Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff.  Return when found
 13906  //    or when out of input.  When called, *have is the number of pattern bytes
 13907  //    found in order so far, in 0..3.  On return *have is updated to the new
 13908  //    state.  If on return *have equals four, then the pattern was found and the
 13909  //    return value is how many bytes were read including the last byte of the
 13910  //    pattern.  If *have is less than four, then the pattern has not been found
 13911  //    yet and the return value is len.  In the latter case, syncsearch() can be
 13912  //    called again with more data and the *have state.  *have is initialized to
 13913  //    zero for the first call.
 13914  //
 13915  func syncsearch(tls *libc.TLS, have uintptr, buf uintptr, len uint32) uint32 { /* inflate.c:1377:16: */
 13916  	var got uint32
 13917  	var next uint32
 13918  
 13919  	got = *(*uint32)(unsafe.Pointer(have))
 13920  	next = uint32(0)
 13921  	for next < len && got < uint32(4) {
 13922  		if int32(*(*uint8)(unsafe.Pointer(buf + uintptr(next)))) == func() int32 {
 13923  			if got < uint32(2) {
 13924  				return 0
 13925  			}
 13926  			return 0xff
 13927  		}() {
 13928  			got++
 13929  		} else if *(*uint8)(unsafe.Pointer(buf + uintptr(next))) != 0 {
 13930  			got = uint32(0)
 13931  		} else {
 13932  			got = uint32(4) - got
 13933  		}
 13934  		next++
 13935  	}
 13936  	*(*uint32)(unsafe.Pointer(have)) = got
 13937  	return next
 13938  }
 13939  
 13940  func XinflateSync(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1400:13: */
 13941  	bp := tls.Alloc(4)
 13942  	defer tls.Free(4)
 13943  
 13944  	var len uint32 // number of bytes to look at or looked at
 13945  	var in uint32
 13946  	var out uint32 // temporary to save total_in and total_out
 13947  	// var buf [4]uint8 at bp, 4
 13948  	// to restore bit buffer to byte string
 13949  	var state uintptr
 13950  
 13951  	// check parameters
 13952  	if inflateStateCheck(tls, strm) != 0 {
 13953  		return -2
 13954  	}
 13955  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13956  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && (*Inflate_state)(unsafe.Pointer(state)).Fbits < uint32(8) {
 13957  		return -5
 13958  	}
 13959  
 13960  	// if first time, start search in bit buffer
 13961  	if (*Inflate_state)(unsafe.Pointer(state)).Fmode != SYNC {
 13962  		(*Inflate_state)(unsafe.Pointer(state)).Fmode = SYNC
 13963  		libc.AssignShlPtrUint32(state+60, int((*Inflate_state)(unsafe.Pointer(state)).Fbits&uint32(7)))
 13964  		*(*uint32)(unsafe.Pointer(state + 64)) -= (*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)
 13965  		len = uint32(0)
 13966  		for (*Inflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) {
 13967  			*(*uint8)(unsafe.Pointer(bp + uintptr(libc.PostIncUint32(&len, 1)))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Fhold)
 13968  			libc.AssignShrPtrUint32(state+60, int(8))
 13969  			*(*uint32)(unsafe.Pointer(state + 64)) -= uint32(8)
 13970  		}
 13971  		(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 13972  		syncsearch(tls, state+108, bp, len)
 13973  	}
 13974  
 13975  	// search available input
 13976  	len = syncsearch(tls, state+108, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in)
 13977  	*(*UInt)(unsafe.Pointer(strm + 4)) -= len
 13978  	*(*uintptr)(unsafe.Pointer(strm)) += uintptr(len)
 13979  	*(*ULong)(unsafe.Pointer(strm + 8)) += ULong(len)
 13980  
 13981  	// return no joy or set up to restart inflate() on a new block
 13982  	if (*Inflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) {
 13983  		return -3
 13984  	}
 13985  	in = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in
 13986  	out = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out
 13987  	XinflateReset(tls, strm)
 13988  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = in
 13989  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_out = out
 13990  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 13991  	return Z_OK
 13992  }
 13993  
 13994  //
 13995  //    Returns true if inflate is currently at the end of a block generated by
 13996  //    Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
 13997  //    implementation to provide an additional safety check. PPP uses
 13998  //    Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
 13999  //    block. When decompressing, PPP checks that at the end of input packet,
 14000  //    inflate is waiting for these length bytes.
 14001  //
 14002  func XinflateSyncPoint(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1451:13: */
 14003  	var state uintptr
 14004  
 14005  	if inflateStateCheck(tls, strm) != 0 {
 14006  		return -2
 14007  	}
 14008  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 14009  	return libc.Bool32((*Inflate_state)(unsafe.Pointer(state)).Fmode == STORED && (*Inflate_state)(unsafe.Pointer(state)).Fbits == uint32(0))
 14010  }
 14011  
 14012  func XinflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* inflate.c:1461:13: */
 14013  	var state uintptr
 14014  	var copy uintptr
 14015  	var window uintptr
 14016  	var wsize uint32
 14017  
 14018  	// check input
 14019  	if inflateStateCheck(tls, source) != 0 || dest == uintptr(Z_NULL) {
 14020  		return -2
 14021  	}
 14022  	state = (*Z_stream)(unsafe.Pointer(source)).Fstate
 14023  
 14024  	// allocate space
 14025  	copy = (*struct {
 14026  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
 14027  	})(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{})))
 14028  	if copy == uintptr(Z_NULL) {
 14029  		return -4
 14030  	}
 14031  	window = uintptr(Z_NULL)
 14032  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) {
 14033  		window = (*struct {
 14034  			f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
 14035  		})(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))))
 14036  		if window == uintptr(Z_NULL) {
 14037  			(*struct {
 14038  				f func(*libc.TLS, Voidpf, Voidpf)
 14039  			})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(source)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, copy)
 14040  			return -4
 14041  		}
 14042  	}
 14043  
 14044  	// copy state
 14045  	libc.Xmemcpy(tls, dest, source, uint32(unsafe.Sizeof(Z_stream{})))
 14046  	libc.Xmemcpy(tls, copy, state, uint32(unsafe.Sizeof(Inflate_state{})))
 14047  	(*Inflate_state)(unsafe.Pointer(copy)).Fstrm = dest
 14048  	if (*Inflate_state)(unsafe.Pointer(state)).Flencode >= state+1332 && (*Inflate_state)(unsafe.Pointer(state)).Flencode <= state+1332+uintptr(ENOUGH_LENS+ENOUGH_DISTS)*4-uintptr(1)*4 {
 14049  		(*Inflate_state)(unsafe.Pointer(copy)).Flencode = copy + 1332 + uintptr(int32(((*Inflate_state)(unsafe.Pointer(state)).Flencode-(state+1332))/4))*4
 14050  		(*Inflate_state)(unsafe.Pointer(copy)).Fdistcode = copy + 1332 + uintptr(int32(((*Inflate_state)(unsafe.Pointer(state)).Fdistcode-(state+1332))/4))*4
 14051  	}
 14052  	(*Inflate_state)(unsafe.Pointer(copy)).Fnext = copy + 1332 + uintptr(int32(((*Inflate_state)(unsafe.Pointer(state)).Fnext-(state+1332))/4))*4
 14053  	if window != uintptr(Z_NULL) {
 14054  		wsize = uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits
 14055  		libc.Xmemcpy(tls, window, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, wsize)
 14056  	}
 14057  	(*Inflate_state)(unsafe.Pointer(copy)).Fwindow = window
 14058  	(*Z_stream)(unsafe.Pointer(dest)).Fstate = copy
 14059  	return Z_OK
 14060  }
 14061  
 14062  func XinflateUndermine(tls *libc.TLS, strm Z_streamp, subvert int32) int32 { /* inflate.c:1508:13: */
 14063  	var state uintptr
 14064  
 14065  	if inflateStateCheck(tls, strm) != 0 {
 14066  		return -2
 14067  	}
 14068  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 14069  	_ = subvert
 14070  	(*Inflate_state)(unsafe.Pointer(state)).Fsane = 1
 14071  	return -3
 14072  }
 14073  
 14074  func XinflateValidate(tls *libc.TLS, strm Z_streamp, check int32) int32 { /* inflate.c:1526:13: */
 14075  	var state uintptr
 14076  
 14077  	if inflateStateCheck(tls, strm) != 0 {
 14078  		return -2
 14079  	}
 14080  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 14081  	if check != 0 {
 14082  		*(*int32)(unsafe.Pointer(state + 12)) |= 4
 14083  	} else {
 14084  		*(*int32)(unsafe.Pointer(state + 12)) &= libc.CplInt32(4)
 14085  	}
 14086  	return Z_OK
 14087  }
 14088  
 14089  func XinflateMark(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1541:14: */
 14090  	var state uintptr
 14091  
 14092  	if inflateStateCheck(tls, strm) != 0 {
 14093  		return -(int32(1) << 16)
 14094  	}
 14095  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 14096  	return int32(uint32(int32(uint32(int32((*Inflate_state)(unsafe.Pointer(state)).Fback))<<16)) + func() uint32 {
 14097  		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY {
 14098  			return uint32((*Inflate_state)(unsafe.Pointer(state)).Flength)
 14099  		}
 14100  		return func() uint32 {
 14101  			if (*Inflate_state)(unsafe.Pointer(state)).Fmode == MATCH {
 14102  				return uint32((*Inflate_state)(unsafe.Pointer(state)).Fwas - (*Inflate_state)(unsafe.Pointer(state)).Flength)
 14103  			}
 14104  			return uint32(0)
 14105  		}()
 14106  	}())
 14107  }
 14108  
 14109  func XinflateCodesUsed(tls *libc.TLS, strm Z_streamp) uint32 { /* inflate.c:1554:23: */
 14110  	var state uintptr
 14111  	if inflateStateCheck(tls, strm) != 0 {
 14112  		return libc.Uint32(libc.Uint32FromInt32(-1))
 14113  	}
 14114  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 14115  	return uint32(int32(((*Inflate_state)(unsafe.Pointer(state)).Fnext - (state + 1332)) / 4))
 14116  }
 14117  
 14118  var Xinflate_copyright = *(*[48]uint8)(unsafe.Pointer(ts + 828)) /* inftrees.c:11:12 */
 14119  
 14120  //
 14121  //   If you use the zlib library in a product, an acknowledgment is welcome
 14122  //   in the documentation of your product. If for some reason you cannot
 14123  //   include such an acknowledgment, I would appreciate that you keep this
 14124  //   copyright string in the executable of your product.
 14125  //
 14126  
 14127  //
 14128  //    Build a set of tables to decode the provided canonical Huffman code.
 14129  //    The code lengths are lens[0..codes-1].  The result starts at *table,
 14130  //    whose indices are 0..2^bits-1.  work is a writable array of at least
 14131  //    lens shorts, which is used as a work area.  type is the type of code
 14132  //    to be generated, CODES, LENS, or DISTS.  On return, zero is success,
 14133  //    -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
 14134  //    on return points to the next available entry's address.  bits is the
 14135  //    requested root table index bits, and on return it is the actual root
 14136  //    table index bits.  It will differ if the request is greater than the
 14137  //    longest code or if it is less than the shortest code.
 14138  //
 14139  func Xinflate_table(tls *libc.TLS, type1 Codetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) int32 { /* inftrees.c:32:19: */
 14140  	bp := tls.Alloc(64)
 14141  	defer tls.Free(64)
 14142  
 14143  	var len uint32 // a code's length in bits
 14144  	var sym uint32 // index of code symbols
 14145  	var min uint32
 14146  	var max uint32    // minimum and maximum code lengths
 14147  	var root uint32   // number of index bits for root table
 14148  	var curr uint32   // number of index bits for current table
 14149  	var drop uint32   // code bits to drop for sub-table
 14150  	var left int32    // number of prefix codes available
 14151  	var used uint32   // code entries in table used
 14152  	var huff uint32   // Huffman code
 14153  	var incr uint32   // for incrementing code, index
 14154  	var fill uint32   // index for replicating entries
 14155  	var low uint32    // low bits for current root entry
 14156  	var mask uint32   // mask for low root bits
 14157  	var here Code     // table entry for duplication
 14158  	var next uintptr  // next available space in table
 14159  	var base uintptr  // base value table to use
 14160  	var extra uintptr // extra bits table to use
 14161  	var match uint32  // use base and extra for symbol >= match
 14162  	// var count [16]uint16 at bp, 32
 14163  	// number of codes of each length
 14164  	// var offs [16]uint16 at bp+32, 32
 14165  
 14166  	//
 14167  	//        Process a set of code lengths to create a canonical Huffman code.  The
 14168  	//        code lengths are lens[0..codes-1].  Each length corresponds to the
 14169  	//        symbols 0..codes-1.  The Huffman code is generated by first sorting the
 14170  	//        symbols by length from short to long, and retaining the symbol order
 14171  	//        for codes with equal lengths.  Then the code starts with all zero bits
 14172  	//        for the first code of the shortest length, and the codes are integer
 14173  	//        increments for the same length, and zeros are appended as the length
 14174  	//        increases.  For the deflate format, these bits are stored backwards
 14175  	//        from their more natural integer increment ordering, and so when the
 14176  	//        decoding tables are built in the large loop below, the integer codes
 14177  	//        are incremented backwards.
 14178  	//
 14179  	//        This routine assumes, but does not check, that all of the entries in
 14180  	//        lens[] are in the range 0..MAXBITS.  The caller must assure this.
 14181  	//        1..MAXBITS is interpreted as that code length.  zero means that that
 14182  	//        symbol does not occur in this code.
 14183  	//
 14184  	//        The codes are sorted by computing a count of codes for each length,
 14185  	//        creating from that a table of starting indices for each length in the
 14186  	//        sorted table, and then entering the symbols in order in the sorted
 14187  	//        table.  The sorted table is work[], with that space being provided by
 14188  	//        the caller.
 14189  	//
 14190  	//        The length counts are used for other purposes as well, i.e. finding
 14191  	//        the minimum and maximum length codes, determining if there are any
 14192  	//        codes at all, checking for a valid set of lengths, and looking ahead
 14193  	//        at length counts to determine sub-table sizes when building the
 14194  	//        decoding tables.
 14195  	//
 14196  
 14197  	// accumulate lengths for codes (assumes lens[] all in 0..MAXBITS)
 14198  	for len = uint32(0); len <= uint32(MAXBITS); len++ {
 14199  		*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)) = uint16(0)
 14200  	}
 14201  	for sym = uint32(0); sym < codes; sym++ {
 14202  		*(*uint16)(unsafe.Pointer(bp + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2))++
 14203  	}
 14204  
 14205  	// bound code lengths, force root to be within code lengths
 14206  	root = *(*uint32)(unsafe.Pointer(bits))
 14207  	for max = uint32(MAXBITS); max >= uint32(1); max-- {
 14208  		if int32(*(*uint16)(unsafe.Pointer(bp + uintptr(max)*2))) != 0 {
 14209  			break
 14210  		}
 14211  	}
 14212  	if root > max {
 14213  		root = max
 14214  	}
 14215  	if max == uint32(0) { // no symbols to code at all
 14216  		here.Fop = uint8(64) // invalid code marker
 14217  		here.Fbits = uint8(1)
 14218  		here.Fval = uint16(0)
 14219  		*(*Code)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(table)), 4))) = here // make a table to force an error
 14220  		*(*Code)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(table)), 4))) = here
 14221  		*(*uint32)(unsafe.Pointer(bits)) = uint32(1)
 14222  		return 0 // no symbols, but wait for decoding to report error
 14223  	}
 14224  	for min = uint32(1); min < max; min++ {
 14225  		if int32(*(*uint16)(unsafe.Pointer(bp + uintptr(min)*2))) != 0 {
 14226  			break
 14227  		}
 14228  	}
 14229  	if root < min {
 14230  		root = min
 14231  	}
 14232  
 14233  	// check for an over-subscribed or incomplete set of lengths
 14234  	left = 1
 14235  	for len = uint32(1); len <= uint32(MAXBITS); len++ {
 14236  		left <<= 1
 14237  		left = left - int32(*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)))
 14238  		if left < 0 {
 14239  			return -1
 14240  		} // over-subscribed
 14241  	}
 14242  	if left > 0 && (type1 == CODES || max != uint32(1)) {
 14243  		return -1
 14244  	} // incomplete set
 14245  
 14246  	// generate offsets into symbol table for each length for sorting
 14247  	*(*uint16)(unsafe.Pointer(bp + 32 + 1*2)) = uint16(0)
 14248  	for len = uint32(1); len < uint32(MAXBITS); len++ {
 14249  		*(*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))))
 14250  	}
 14251  
 14252  	// sort symbols by length, by symbol order within each length
 14253  	for sym = uint32(0); sym < codes; sym++ {
 14254  		if int32(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 {
 14255  			*(*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)
 14256  		}
 14257  	}
 14258  
 14259  	//
 14260  	//        Create and fill in decoding tables.  In this loop, the table being
 14261  	//        filled is at next and has curr index bits.  The code being used is huff
 14262  	//        with length len.  That code is converted to an index by dropping drop
 14263  	//        bits off of the bottom.  For codes where len is less than drop + curr,
 14264  	//        those top drop + curr - len bits are incremented through all values to
 14265  	//        fill the table with replicated entries.
 14266  	//
 14267  	//        root is the number of index bits for the root table.  When len exceeds
 14268  	//        root, sub-tables are created pointed to by the root entry with an index
 14269  	//        of the low root bits of huff.  This is saved in low to check for when a
 14270  	//        new sub-table should be started.  drop is zero when the root table is
 14271  	//        being filled, and drop is root when sub-tables are being filled.
 14272  	//
 14273  	//        When a new sub-table is needed, it is necessary to look ahead in the
 14274  	//        code lengths to determine what size sub-table is needed.  The length
 14275  	//        counts are used for this, and so count[] is decremented as codes are
 14276  	//        entered in the tables.
 14277  	//
 14278  	//        used keeps track of how many table entries have been allocated from the
 14279  	//        provided *table space.  It is checked for LENS and DIST tables against
 14280  	//        the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
 14281  	//        the initial root table size constants.  See the comments in inftrees.h
 14282  	//        for more information.
 14283  	//
 14284  	//        sym increments through all symbols, and the loop terminates when
 14285  	//        all codes of length max, i.e. all codes, have been processed.  This
 14286  	//        routine permits incomplete codes, so another loop after this one fills
 14287  	//        in the rest of the decoding tables with invalid code markers.
 14288  	//
 14289  
 14290  	// set up for code type
 14291  	switch type1 {
 14292  	case CODES:
 14293  		base = libc.AssignUintptr(&extra, work) // dummy value--not used
 14294  		match = uint32(20)
 14295  		break
 14296  	case LENS:
 14297  		base = uintptr(unsafe.Pointer(&lbase))
 14298  		extra = uintptr(unsafe.Pointer(&lext))
 14299  		match = uint32(257)
 14300  		break
 14301  	default: // DISTS
 14302  		base = uintptr(unsafe.Pointer(&dbase))
 14303  		extra = uintptr(unsafe.Pointer(&dext))
 14304  		match = uint32(0)
 14305  	}
 14306  
 14307  	// initialize state for loop
 14308  	huff = uint32(0)                            // starting code
 14309  	sym = uint32(0)                             // starting code symbol
 14310  	len = min                                   // starting code length
 14311  	next = *(*uintptr)(unsafe.Pointer(table))   // current table to fill in
 14312  	curr = root                                 // current table index bits
 14313  	drop = uint32(0)                            // current bits to drop from code for index
 14314  	low = libc.Uint32(libc.Uint32FromInt32(-1)) // trigger new sub-table when len > root
 14315  	used = uint32(1) << root                    // use root table entries
 14316  	mask = used - uint32(1)                     // mask for comparing low
 14317  
 14318  	// check available table space
 14319  	if type1 == LENS && used > uint32(ENOUGH_LENS) || type1 == DISTS && used > uint32(ENOUGH_DISTS) {
 14320  		return 1
 14321  	}
 14322  
 14323  	// process all codes and make table entries
 14324  	for {
 14325  		// create table entry
 14326  		here.Fbits = uint8(len - drop)
 14327  		if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))+1 < match {
 14328  			here.Fop = uint8(0)
 14329  			here.Fval = *(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))
 14330  		} else if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) >= match {
 14331  			here.Fop = uint8(*(*uint16)(unsafe.Pointer(extra + uintptr(uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match)*2)))
 14332  			here.Fval = *(*uint16)(unsafe.Pointer(base + uintptr(uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match)*2))
 14333  		} else {
 14334  			here.Fop = uint8(32 + 64) // end of block
 14335  			here.Fval = uint16(0)
 14336  		}
 14337  
 14338  		// replicate for those indices with low len bits equal to huff
 14339  		incr = uint32(1) << (len - drop)
 14340  		fill = uint32(1) << curr
 14341  		min = fill // save offset to next table
 14342  		for __ccgo := true; __ccgo; __ccgo = fill != uint32(0) {
 14343  			fill = fill - incr
 14344  			*(*Code)(unsafe.Pointer(next + uintptr(huff>>drop+fill)*4)) = here
 14345  		}
 14346  
 14347  		// backwards increment the len-bit code huff
 14348  		incr = uint32(1) << (len - uint32(1))
 14349  		for huff&incr != 0 {
 14350  			incr >>= 1
 14351  		}
 14352  		if incr != uint32(0) {
 14353  			huff = huff & (incr - uint32(1))
 14354  			huff = huff + incr
 14355  		} else {
 14356  			huff = uint32(0)
 14357  		}
 14358  
 14359  		// go to next symbol, update count, len
 14360  		sym++
 14361  		if int32(libc.PreDecUint16(&*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)), 1)) == 0 {
 14362  			if len == max {
 14363  				break
 14364  			}
 14365  			len = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2)))
 14366  		}
 14367  
 14368  		// create new sub-table if needed
 14369  		if len > root && huff&mask != low {
 14370  			// if first time, transition to sub-tables
 14371  			if drop == uint32(0) {
 14372  				drop = root
 14373  			}
 14374  
 14375  			// increment past last table
 14376  			next += 4 * uintptr(min) // here min is 1 << curr
 14377  
 14378  			// determine length of next table
 14379  			curr = len - drop
 14380  			left = int32(1) << curr
 14381  			for curr+drop < max {
 14382  				left = left - int32(*(*uint16)(unsafe.Pointer(bp + uintptr(curr+drop)*2)))
 14383  				if left <= 0 {
 14384  					break
 14385  				}
 14386  				curr++
 14387  				left <<= 1
 14388  			}
 14389  
 14390  			// check for enough space
 14391  			used = used + uint32(1)<<curr
 14392  			if type1 == LENS && used > uint32(ENOUGH_LENS) || type1 == DISTS && used > uint32(ENOUGH_DISTS) {
 14393  				return 1
 14394  			}
 14395  
 14396  			// point entry in root table to sub-table
 14397  			low = huff & mask
 14398  			(*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fop = uint8(curr)
 14399  			(*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fbits = uint8(root)
 14400  			(*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fval = uint16((int32(next) - int32(*(*uintptr)(unsafe.Pointer(table)))) / 4)
 14401  		}
 14402  	}
 14403  
 14404  	// fill in remaining table entry if code is incomplete (guaranteed to have
 14405  	//        at most one remaining entry, since if the code is incomplete, the
 14406  	//        maximum code length that was allowed to get this far is one bit)
 14407  	if huff != uint32(0) {
 14408  		here.Fop = uint8(64) // invalid code marker
 14409  		here.Fbits = uint8(len - drop)
 14410  		here.Fval = uint16(0)
 14411  		*(*Code)(unsafe.Pointer(next + uintptr(huff)*4)) = here
 14412  	}
 14413  
 14414  	// set return parameters
 14415  	*(*uintptr)(unsafe.Pointer(table)) += uintptr(used) * 4
 14416  	*(*uint32)(unsafe.Pointer(bits)) = root
 14417  	return 0
 14418  }
 14419  
 14420  var lbase = [31]uint16{ // Length codes 257..285 base
 14421  	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),
 14422  			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 */
 14423  var lext = [31]uint16{ // Length codes 257..285 extra
 14424  	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),
 14425  			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 */
 14426  var dbase = [32]uint16{ // Distance codes 0..29 base
 14427  	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),
 14428  	uint16(257), uint16(385), uint16(513), uint16(769), uint16(1025), uint16(1537), uint16(2049), uint16(3073), uint16(4097), uint16(6145),
 14429  			uint16(8193), uint16(12289), uint16(16385), uint16(24577), uint16(0), uint16(0)} /* inftrees.c:66:33 */
 14430  var dext = [32]uint16{ // Distance codes 0..29 extra
 14431  	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),
 14432  	uint16(23), uint16(23), uint16(24), uint16(24), uint16(25), uint16(25), uint16(26), uint16(26), uint16(27), uint16(27),
 14433  	uint16(28), uint16(28), uint16(29), uint16(29), uint16(64), uint16(64)} /* inftrees.c:70:33 */
 14434  
 14435  type Static_tree_desc = Static_tree_desc_s /* deflate.h:84:36 */
 14436  
 14437  // ===========================================================================
 14438  // Constants
 14439  
 14440  // Bit length codes must not exceed MAX_BL_BITS bits
 14441  
 14442  // end of block literal code
 14443  
 14444  // repeat previous bit length 3-6 times (2 bits of repeat count)
 14445  
 14446  // repeat a zero length 3-10 times  (3 bits of repeat count)
 14447  
 14448  // repeat a zero length 11-138 times  (7 bits of repeat count)
 14449  
 14450  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 */
 14451  
 14452  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 */
 14453  
 14454  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 */
 14455  
 14456  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 */
 14457  // The lengths of the bit length codes are sent in order of decreasing
 14458  // probability, to avoid transmitting the lengths for unused bit length codes.
 14459  
 14460  // ===========================================================================
 14461  // Local data. These are initialized only once.
 14462  
 14463  // header created automatically with -DGEN_TREES_H
 14464  
 14465  var static_ltree = [288]Ct_data{{Ffc: func() (r struct{ Ffreq Ush }) {
 14466  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12)
 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(140)
 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  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14478  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(76)
 14479  	return r
 14480  }(), Fdl: func() (r struct{ Fdad Ush }) {
 14481  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14482  	return r
 14483  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14484  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(204)
 14485  	return r
 14486  }(), Fdl: func() (r struct{ Fdad Ush }) {
 14487  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14488  	return r
 14489  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14490  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(44)
 14491  	return r
 14492  }(), Fdl: func() (r struct{ Fdad Ush }) {
 14493  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14494  	return r
 14495  }()},
 14496  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14497  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(172)
 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(108)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14509  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(236)
 14510  		return r
 14511  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14512  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14513  		return r
 14514  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14515  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28)
 14516  		return r
 14517  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14518  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14519  		return r
 14520  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14521  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(156)
 14522  		return r
 14523  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14524  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14525  		return r
 14526  	}()},
 14527  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14528  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(92)
 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(220)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14540  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(60)
 14541  		return r
 14542  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14543  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14544  		return r
 14545  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14546  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(188)
 14547  		return r
 14548  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14549  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14550  		return r
 14551  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14552  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(124)
 14553  		return r
 14554  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14555  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14556  		return r
 14557  	}()},
 14558  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14559  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(252)
 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(2)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14571  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(130)
 14572  		return r
 14573  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14574  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14575  		return r
 14576  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14577  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(66)
 14578  		return r
 14579  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14580  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14581  		return r
 14582  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14583  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(194)
 14584  		return r
 14585  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14586  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14587  		return r
 14588  	}()},
 14589  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14590  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(34)
 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(162)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14602  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(98)
 14603  		return r
 14604  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14605  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14606  		return r
 14607  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14608  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(226)
 14609  		return r
 14610  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14611  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14612  		return r
 14613  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14614  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18)
 14615  		return r
 14616  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14617  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14618  		return r
 14619  	}()},
 14620  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14621  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(146)
 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(82)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14633  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(210)
 14634  		return r
 14635  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14636  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14637  		return r
 14638  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14639  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(50)
 14640  		return r
 14641  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14642  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14643  		return r
 14644  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14645  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(178)
 14646  		return r
 14647  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14648  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14649  		return r
 14650  	}()},
 14651  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14652  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(114)
 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(242)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14664  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10)
 14665  		return r
 14666  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14667  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14668  		return r
 14669  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14670  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(138)
 14671  		return r
 14672  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14673  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14674  		return r
 14675  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14676  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(74)
 14677  		return r
 14678  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14679  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14680  		return r
 14681  	}()},
 14682  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14683  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(202)
 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(42)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14695  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(170)
 14696  		return r
 14697  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14698  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14699  		return r
 14700  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14701  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(106)
 14702  		return r
 14703  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14704  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14705  		return r
 14706  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14707  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(234)
 14708  		return r
 14709  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14710  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14711  		return r
 14712  	}()},
 14713  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14714  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26)
 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(154)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14726  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(90)
 14727  		return r
 14728  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14729  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14730  		return r
 14731  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14732  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(218)
 14733  		return r
 14734  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14735  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14736  		return r
 14737  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14738  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(58)
 14739  		return r
 14740  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14741  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14742  		return r
 14743  	}()},
 14744  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14745  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(186)
 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(122)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14757  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(250)
 14758  		return r
 14759  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14760  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14761  		return r
 14762  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14763  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6)
 14764  		return r
 14765  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14766  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14767  		return r
 14768  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14769  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(134)
 14770  		return r
 14771  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14772  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14773  		return r
 14774  	}()},
 14775  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14776  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(70)
 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(198)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14788  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(38)
 14789  		return r
 14790  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14791  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14792  		return r
 14793  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14794  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(166)
 14795  		return r
 14796  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14797  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14798  		return r
 14799  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14800  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(102)
 14801  		return r
 14802  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14803  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14804  		return r
 14805  	}()},
 14806  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14807  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(230)
 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(22)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14819  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(150)
 14820  		return r
 14821  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14822  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14823  		return r
 14824  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14825  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(86)
 14826  		return r
 14827  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14828  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14829  		return r
 14830  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14831  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(214)
 14832  		return r
 14833  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14834  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14835  		return r
 14836  	}()},
 14837  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14838  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(54)
 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(182)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14850  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(118)
 14851  		return r
 14852  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14853  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14854  		return r
 14855  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14856  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(246)
 14857  		return r
 14858  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14859  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14860  		return r
 14861  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14862  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14)
 14863  		return r
 14864  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14865  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14866  		return r
 14867  	}()},
 14868  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14869  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(142)
 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(78)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14881  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(206)
 14882  		return r
 14883  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14884  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14885  		return r
 14886  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14887  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(46)
 14888  		return r
 14889  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14890  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14891  		return r
 14892  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14893  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(174)
 14894  		return r
 14895  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14896  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14897  		return r
 14898  	}()},
 14899  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14900  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(110)
 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(238)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14912  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30)
 14913  		return r
 14914  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14915  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14916  		return r
 14917  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14918  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(158)
 14919  		return r
 14920  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14921  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14922  		return r
 14923  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14924  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(94)
 14925  		return r
 14926  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14927  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14928  		return r
 14929  	}()},
 14930  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14931  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(222)
 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(62)
 14938  		return r
 14939  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14940  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14941  		return r
 14942  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14943  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(190)
 14944  		return r
 14945  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14946  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14947  		return r
 14948  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14949  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(126)
 14950  		return r
 14951  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14952  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14953  		return r
 14954  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14955  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(254)
 14956  		return r
 14957  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14958  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14959  		return r
 14960  	}()},
 14961  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14962  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1)
 14963  		return r
 14964  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14965  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14966  		return r
 14967  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14968  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(129)
 14969  		return r
 14970  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14971  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14972  		return r
 14973  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14974  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(65)
 14975  		return r
 14976  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14977  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14978  		return r
 14979  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14980  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(193)
 14981  		return r
 14982  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14983  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14984  		return r
 14985  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14986  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(33)
 14987  		return r
 14988  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14989  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14990  		return r
 14991  	}()},
 14992  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14993  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(161)
 14994  		return r
 14995  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14996  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14997  		return r
 14998  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14999  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(97)
 15000  		return r
 15001  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15002  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15003  		return r
 15004  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15005  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(225)
 15006  		return r
 15007  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15008  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15009  		return r
 15010  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15011  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17)
 15012  		return r
 15013  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15014  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15015  		return r
 15016  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15017  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(145)
 15018  		return r
 15019  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15020  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15021  		return r
 15022  	}()},
 15023  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15024  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(81)
 15025  		return r
 15026  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15027  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15028  		return r
 15029  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15030  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(209)
 15031  		return r
 15032  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15033  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15034  		return r
 15035  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15036  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(49)
 15037  		return r
 15038  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15039  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15040  		return r
 15041  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15042  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(177)
 15043  		return r
 15044  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15045  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15046  		return r
 15047  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15048  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(113)
 15049  		return r
 15050  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15051  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15052  		return r
 15053  	}()},
 15054  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15055  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(241)
 15056  		return r
 15057  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15058  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15059  		return r
 15060  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15061  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15062  		return r
 15063  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15064  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15065  		return r
 15066  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15067  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(137)
 15068  		return r
 15069  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15070  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15071  		return r
 15072  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15073  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(73)
 15074  		return r
 15075  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15076  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15077  		return r
 15078  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15079  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(201)
 15080  		return r
 15081  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15082  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15083  		return r
 15084  	}()},
 15085  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15086  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(41)
 15087  		return r
 15088  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15089  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15090  		return r
 15091  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15092  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(169)
 15093  		return r
 15094  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15095  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15096  		return r
 15097  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15098  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(105)
 15099  		return r
 15100  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15101  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15102  		return r
 15103  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15104  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(233)
 15105  		return r
 15106  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15107  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15108  		return r
 15109  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15110  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25)
 15111  		return r
 15112  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15113  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15114  		return r
 15115  	}()},
 15116  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15117  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(153)
 15118  		return r
 15119  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15120  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15121  		return r
 15122  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15123  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(89)
 15124  		return r
 15125  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15126  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15127  		return r
 15128  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15129  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(217)
 15130  		return r
 15131  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15132  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15133  		return r
 15134  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15135  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(57)
 15136  		return r
 15137  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15138  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15139  		return r
 15140  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15141  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(185)
 15142  		return r
 15143  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15144  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15145  		return r
 15146  	}()},
 15147  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15148  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(121)
 15149  		return r
 15150  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15151  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15152  		return r
 15153  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15154  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(249)
 15155  		return r
 15156  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15157  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15158  		return r
 15159  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15160  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 15161  		return r
 15162  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15163  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15164  		return r
 15165  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15166  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(133)
 15167  		return r
 15168  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15169  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15170  		return r
 15171  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15172  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(69)
 15173  		return r
 15174  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15175  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15176  		return r
 15177  	}()},
 15178  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15179  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(197)
 15180  		return r
 15181  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15182  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15183  		return r
 15184  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15185  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(37)
 15186  		return r
 15187  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15188  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15189  		return r
 15190  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15191  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(165)
 15192  		return r
 15193  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15194  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15195  		return r
 15196  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15197  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(101)
 15198  		return r
 15199  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15200  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15201  		return r
 15202  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15203  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(229)
 15204  		return r
 15205  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15206  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15207  		return r
 15208  	}()},
 15209  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15210  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21)
 15211  		return r
 15212  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15213  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15214  		return r
 15215  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15216  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(149)
 15217  		return r
 15218  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15219  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15220  		return r
 15221  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15222  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(85)
 15223  		return r
 15224  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15225  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15226  		return r
 15227  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15228  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(213)
 15229  		return r
 15230  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15231  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15232  		return r
 15233  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15234  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(53)
 15235  		return r
 15236  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15237  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15238  		return r
 15239  	}()},
 15240  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15241  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(181)
 15242  		return r
 15243  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15244  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15245  		return r
 15246  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15247  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(117)
 15248  		return r
 15249  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15250  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15251  		return r
 15252  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15253  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(245)
 15254  		return r
 15255  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15256  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15257  		return r
 15258  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15259  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13)
 15260  		return r
 15261  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15262  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15263  		return r
 15264  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15265  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(141)
 15266  		return r
 15267  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15268  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15269  		return r
 15270  	}()},
 15271  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15272  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(77)
 15273  		return r
 15274  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15275  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15276  		return r
 15277  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15278  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(205)
 15279  		return r
 15280  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15281  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15282  		return r
 15283  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15284  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(45)
 15285  		return r
 15286  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15287  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15288  		return r
 15289  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15290  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(173)
 15291  		return r
 15292  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15293  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15294  		return r
 15295  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15296  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(109)
 15297  		return r
 15298  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15299  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15300  		return r
 15301  	}()},
 15302  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15303  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(237)
 15304  		return r
 15305  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15306  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15307  		return r
 15308  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15309  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29)
 15310  		return r
 15311  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15312  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15313  		return r
 15314  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15315  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(157)
 15316  		return r
 15317  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15318  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15319  		return r
 15320  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15321  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(93)
 15322  		return r
 15323  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15324  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15325  		return r
 15326  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15327  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(221)
 15328  		return r
 15329  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15330  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15331  		return r
 15332  	}()},
 15333  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15334  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(61)
 15335  		return r
 15336  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15337  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15338  		return r
 15339  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15340  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(189)
 15341  		return r
 15342  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15343  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15344  		return r
 15345  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15346  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(125)
 15347  		return r
 15348  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15349  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15350  		return r
 15351  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15352  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(253)
 15353  		return r
 15354  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15355  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15356  		return r
 15357  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15358  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19)
 15359  		return r
 15360  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15361  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15362  		return r
 15363  	}()},
 15364  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15365  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(275)
 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(147)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15377  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(403)
 15378  		return r
 15379  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15380  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15381  		return r
 15382  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15383  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(83)
 15384  		return r
 15385  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15386  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15387  		return r
 15388  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15389  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(339)
 15390  		return r
 15391  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15392  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15393  		return r
 15394  	}()},
 15395  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15396  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(211)
 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(467)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15408  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(51)
 15409  		return r
 15410  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15411  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15412  		return r
 15413  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15414  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(307)
 15415  		return r
 15416  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15417  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15418  		return r
 15419  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15420  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(179)
 15421  		return r
 15422  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15423  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15424  		return r
 15425  	}()},
 15426  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15427  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(435)
 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(115)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15439  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(371)
 15440  		return r
 15441  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15442  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15443  		return r
 15444  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15445  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(243)
 15446  		return r
 15447  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15448  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15449  		return r
 15450  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15451  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(499)
 15452  		return r
 15453  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15454  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15455  		return r
 15456  	}()},
 15457  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15458  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11)
 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(267)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15470  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(139)
 15471  		return r
 15472  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15473  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15474  		return r
 15475  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15476  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(395)
 15477  		return r
 15478  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15479  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15480  		return r
 15481  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15482  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(75)
 15483  		return r
 15484  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15485  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15486  		return r
 15487  	}()},
 15488  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15489  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(331)
 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(203)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15501  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(459)
 15502  		return r
 15503  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15504  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15505  		return r
 15506  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15507  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(43)
 15508  		return r
 15509  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15510  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15511  		return r
 15512  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15513  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(299)
 15514  		return r
 15515  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15516  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15517  		return r
 15518  	}()},
 15519  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15520  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(171)
 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(427)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15532  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(107)
 15533  		return r
 15534  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15535  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15536  		return r
 15537  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15538  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(363)
 15539  		return r
 15540  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15541  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15542  		return r
 15543  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15544  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(235)
 15545  		return r
 15546  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15547  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15548  		return r
 15549  	}()},
 15550  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15551  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(491)
 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(27)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15563  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(283)
 15564  		return r
 15565  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15566  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15567  		return r
 15568  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15569  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(155)
 15570  		return r
 15571  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15572  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15573  		return r
 15574  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15575  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(411)
 15576  		return r
 15577  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15578  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15579  		return r
 15580  	}()},
 15581  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15582  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(91)
 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(347)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15594  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(219)
 15595  		return r
 15596  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15597  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15598  		return r
 15599  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15600  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(475)
 15601  		return r
 15602  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15603  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15604  		return r
 15605  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15606  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(59)
 15607  		return r
 15608  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15609  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15610  		return r
 15611  	}()},
 15612  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15613  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(315)
 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(187)
 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  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15625  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(443)
 15626  		return r
 15627  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15628  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15629  		return r
 15630  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15631  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(123)
 15632  		return r
 15633  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15634  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15635  		return r
 15636  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15637  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(379)
 15638  		return r
 15639  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15640  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15641  		return r
 15642  	}()},
 15643  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15644  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(251)
 15645  		return r
 15646  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15647  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15648  		return r
 15649  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15650  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(507)
 15651  		return r
 15652  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15653  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15654  		return r
 15655  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15656  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 15657  		return r
 15658  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15659  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15660  		return r
 15661  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15662  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(263)
 15663  		return r
 15664  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15665  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15666  		return r
 15667  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15668  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(135)
 15669  		return r
 15670  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15671  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15672  		return r
 15673  	}()},
 15674  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15675  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(391)
 15676  		return r
 15677  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15678  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15679  		return r
 15680  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15681  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(71)
 15682  		return r
 15683  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15684  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15685  		return r
 15686  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15687  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(327)
 15688  		return r
 15689  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15690  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15691  		return r
 15692  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15693  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(199)
 15694  		return r
 15695  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15696  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15697  		return r
 15698  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15699  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(455)
 15700  		return r
 15701  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15702  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15703  		return r
 15704  	}()},
 15705  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15706  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(39)
 15707  		return r
 15708  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15709  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15710  		return r
 15711  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15712  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(295)
 15713  		return r
 15714  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15715  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15716  		return r
 15717  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15718  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(167)
 15719  		return r
 15720  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15721  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15722  		return r
 15723  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15724  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(423)
 15725  		return r
 15726  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15727  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15728  		return r
 15729  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15730  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(103)
 15731  		return r
 15732  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15733  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15734  		return r
 15735  	}()},
 15736  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15737  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(359)
 15738  		return r
 15739  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15740  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15741  		return r
 15742  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15743  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(231)
 15744  		return r
 15745  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15746  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15747  		return r
 15748  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15749  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(487)
 15750  		return r
 15751  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15752  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15753  		return r
 15754  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15755  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23)
 15756  		return r
 15757  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15758  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15759  		return r
 15760  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15761  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(279)
 15762  		return r
 15763  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15764  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15765  		return r
 15766  	}()},
 15767  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15768  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(151)
 15769  		return r
 15770  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15771  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15772  		return r
 15773  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15774  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(407)
 15775  		return r
 15776  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15777  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15778  		return r
 15779  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15780  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(87)
 15781  		return r
 15782  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15783  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15784  		return r
 15785  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15786  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(343)
 15787  		return r
 15788  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15789  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15790  		return r
 15791  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15792  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(215)
 15793  		return r
 15794  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15795  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15796  		return r
 15797  	}()},
 15798  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15799  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(471)
 15800  		return r
 15801  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15802  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15803  		return r
 15804  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15805  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(55)
 15806  		return r
 15807  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15808  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15809  		return r
 15810  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15811  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(311)
 15812  		return r
 15813  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15814  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15815  		return r
 15816  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15817  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(183)
 15818  		return r
 15819  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15820  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15821  		return r
 15822  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15823  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(439)
 15824  		return r
 15825  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15826  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15827  		return r
 15828  	}()},
 15829  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15830  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(119)
 15831  		return r
 15832  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15833  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15834  		return r
 15835  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15836  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(375)
 15837  		return r
 15838  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15839  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15840  		return r
 15841  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15842  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(247)
 15843  		return r
 15844  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15845  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15846  		return r
 15847  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15848  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(503)
 15849  		return r
 15850  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15851  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15852  		return r
 15853  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15854  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(15)
 15855  		return r
 15856  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15857  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15858  		return r
 15859  	}()},
 15860  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15861  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(271)
 15862  		return r
 15863  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15864  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15865  		return r
 15866  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15867  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(143)
 15868  		return r
 15869  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15870  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15871  		return r
 15872  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15873  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(399)
 15874  		return r
 15875  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15876  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15877  		return r
 15878  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15879  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(79)
 15880  		return r
 15881  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15882  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15883  		return r
 15884  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15885  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(335)
 15886  		return r
 15887  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15888  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15889  		return r
 15890  	}()},
 15891  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15892  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(207)
 15893  		return r
 15894  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15895  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15896  		return r
 15897  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15898  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(463)
 15899  		return r
 15900  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15901  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15902  		return r
 15903  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15904  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(47)
 15905  		return r
 15906  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15907  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15908  		return r
 15909  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15910  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(303)
 15911  		return r
 15912  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15913  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15914  		return r
 15915  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15916  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(175)
 15917  		return r
 15918  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15919  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15920  		return r
 15921  	}()},
 15922  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15923  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(431)
 15924  		return r
 15925  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15926  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15927  		return r
 15928  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15929  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(111)
 15930  		return r
 15931  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15932  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15933  		return r
 15934  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15935  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(367)
 15936  		return r
 15937  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15938  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15939  		return r
 15940  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15941  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(239)
 15942  		return r
 15943  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15944  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15945  		return r
 15946  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15947  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(495)
 15948  		return r
 15949  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15950  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15951  		return r
 15952  	}()},
 15953  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15954  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(31)
 15955  		return r
 15956  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15957  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15958  		return r
 15959  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15960  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(287)
 15961  		return r
 15962  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15963  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15964  		return r
 15965  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15966  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(159)
 15967  		return r
 15968  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15969  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15970  		return r
 15971  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15972  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(415)
 15973  		return r
 15974  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15975  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15976  		return r
 15977  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15978  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(95)
 15979  		return r
 15980  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15981  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15982  		return r
 15983  	}()},
 15984  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15985  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(351)
 15986  		return r
 15987  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15988  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15989  		return r
 15990  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15991  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(223)
 15992  		return r
 15993  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15994  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15995  		return r
 15996  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15997  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(479)
 15998  		return r
 15999  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16000  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16001  		return r
 16002  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16003  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(63)
 16004  		return r
 16005  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16006  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16007  		return r
 16008  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16009  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(319)
 16010  		return r
 16011  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16012  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16013  		return r
 16014  	}()},
 16015  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16016  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(191)
 16017  		return r
 16018  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16019  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16020  		return r
 16021  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16022  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(447)
 16023  		return r
 16024  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16025  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16026  		return r
 16027  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16028  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(127)
 16029  		return r
 16030  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16031  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16032  		return r
 16033  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16034  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(383)
 16035  		return r
 16036  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16037  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16038  		return r
 16039  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16040  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(255)
 16041  		return r
 16042  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16043  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16044  		return r
 16045  	}()},
 16046  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16047  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(511)
 16048  		return r
 16049  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16050  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16051  		return r
 16052  	}()}, {Fdl: func() (r struct{ Fdad Ush }) {
 16053  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16054  		return r
 16055  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16056  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(64)
 16057  		return r
 16058  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16059  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16060  		return r
 16061  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16062  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(32)
 16063  		return r
 16064  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16065  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16066  		return r
 16067  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16068  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(96)
 16069  		return r
 16070  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16071  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16072  		return r
 16073  	}()},
 16074  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16075  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16)
 16076  		return r
 16077  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16078  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16079  		return r
 16080  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16081  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(80)
 16082  		return r
 16083  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16084  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16085  		return r
 16086  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16087  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(48)
 16088  		return r
 16089  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16090  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16091  		return r
 16092  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16093  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(112)
 16094  		return r
 16095  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16096  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16097  		return r
 16098  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16099  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16100  		return r
 16101  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16102  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16103  		return r
 16104  	}()},
 16105  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16106  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(72)
 16107  		return r
 16108  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16109  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16110  		return r
 16111  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16112  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(40)
 16113  		return r
 16114  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16115  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16116  		return r
 16117  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16118  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(104)
 16119  		return r
 16120  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16121  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16122  		return r
 16123  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16124  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24)
 16125  		return r
 16126  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16127  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16128  		return r
 16129  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16130  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(88)
 16131  		return r
 16132  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16133  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16134  		return r
 16135  	}()},
 16136  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16137  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(56)
 16138  		return r
 16139  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16140  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16141  		return r
 16142  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16143  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(120)
 16144  		return r
 16145  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16146  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16147  		return r
 16148  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16149  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4)
 16150  		return r
 16151  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16152  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16153  		return r
 16154  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16155  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(68)
 16156  		return r
 16157  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16158  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16159  		return r
 16160  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16161  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(36)
 16162  		return r
 16163  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16164  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16165  		return r
 16166  	}()},
 16167  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16168  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(100)
 16169  		return r
 16170  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16171  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16172  		return r
 16173  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16174  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20)
 16175  		return r
 16176  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16177  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16178  		return r
 16179  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16180  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(84)
 16181  		return r
 16182  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16183  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16184  		return r
 16185  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16186  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(52)
 16187  		return r
 16188  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16189  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16190  		return r
 16191  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16192  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(116)
 16193  		return r
 16194  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16195  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16196  		return r
 16197  	}()},
 16198  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16199  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3)
 16200  		return r
 16201  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16202  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16203  		return r
 16204  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16205  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(131)
 16206  		return r
 16207  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16208  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16209  		return r
 16210  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16211  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(67)
 16212  		return r
 16213  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16214  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16215  		return r
 16216  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16217  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(195)
 16218  		return r
 16219  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16220  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16221  		return r
 16222  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16223  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(35)
 16224  		return r
 16225  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16226  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16227  		return r
 16228  	}()},
 16229  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16230  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(163)
 16231  		return r
 16232  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16233  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16234  		return r
 16235  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16236  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(99)
 16237  		return r
 16238  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16239  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16240  		return r
 16241  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16242  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(227)
 16243  		return r
 16244  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16245  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16246  		return r
 16247  	}()}} /* trees.h:3:21 */
 16248  
 16249  var static_dtree = [30]Ct_data{{Fdl: func() (r struct{ Fdad Ush }) {
 16250  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16251  	return r
 16252  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16253  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16)
 16254  	return r
 16255  }(), Fdl: func() (r struct{ Fdad Ush }) {
 16256  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16257  	return r
 16258  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16259  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16260  	return r
 16261  }(), Fdl: func() (r struct{ Fdad Ush }) {
 16262  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16263  	return r
 16264  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16265  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24)
 16266  	return r
 16267  }(), Fdl: func() (r struct{ Fdad Ush }) {
 16268  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16269  	return r
 16270  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16271  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4)
 16272  	return r
 16273  }(), Fdl: func() (r struct{ Fdad Ush }) {
 16274  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16275  	return r
 16276  }()},
 16277  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16278  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20)
 16279  		return r
 16280  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16281  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16282  		return r
 16283  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16284  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12)
 16285  		return r
 16286  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16287  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16288  		return r
 16289  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16290  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28)
 16291  		return r
 16292  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16293  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16294  		return r
 16295  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16296  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2)
 16297  		return r
 16298  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16299  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16300  		return r
 16301  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16302  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18)
 16303  		return r
 16304  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16305  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16306  		return r
 16307  	}()},
 16308  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16309  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10)
 16310  		return r
 16311  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16312  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16313  		return r
 16314  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16315  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26)
 16316  		return r
 16317  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16318  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16319  		return r
 16320  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16321  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6)
 16322  		return r
 16323  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16324  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16325  		return r
 16326  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16327  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22)
 16328  		return r
 16329  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16330  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16331  		return r
 16332  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16333  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14)
 16334  		return r
 16335  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16336  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16337  		return r
 16338  	}()},
 16339  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16340  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30)
 16341  		return r
 16342  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16343  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16344  		return r
 16345  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16346  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1)
 16347  		return r
 16348  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16349  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16350  		return r
 16351  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16352  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17)
 16353  		return r
 16354  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16355  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16356  		return r
 16357  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16358  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16359  		return r
 16360  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16361  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16362  		return r
 16363  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16364  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25)
 16365  		return r
 16366  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16367  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16368  		return r
 16369  	}()},
 16370  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16371  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16372  		return r
 16373  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16374  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16375  		return r
 16376  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16377  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21)
 16378  		return r
 16379  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16380  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16381  		return r
 16382  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16383  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13)
 16384  		return r
 16385  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16386  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16387  		return r
 16388  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16389  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29)
 16390  		return r
 16391  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16392  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16393  		return r
 16394  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16395  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3)
 16396  		return r
 16397  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16398  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16399  		return r
 16400  	}()},
 16401  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16402  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19)
 16403  		return r
 16404  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16405  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16406  		return r
 16407  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16408  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11)
 16409  		return r
 16410  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16411  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16412  		return r
 16413  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16414  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27)
 16415  		return r
 16416  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16417  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16418  		return r
 16419  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16420  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16421  		return r
 16422  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16423  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16424  		return r
 16425  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16426  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23)
 16427  		return r
 16428  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16429  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16430  		return r
 16431  	}()}} /* trees.h:64:21 */
 16432  
 16433  var X_dist_code = [512]Uch{
 16434  	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),
 16435  	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),
 16436  	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),
 16437  	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),
 16438  	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),
 16439  	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),
 16440  	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),
 16441  	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),
 16442  	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),
 16443  	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),
 16444  	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),
 16445  	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),
 16446  	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),
 16447  	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),
 16448  	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),
 16449  	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),
 16450  	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),
 16451  	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),
 16452  	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),
 16453  	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),
 16454  	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),
 16455  	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),
 16456  	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),
 16457  	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),
 16458  	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),
 16459  	Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29),
 16460  } /* trees.h:73:25 */
 16461  
 16462  var X_length_code = [256]Uch{
 16463  	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),
 16464  	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),
 16465  	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),
 16466  	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),
 16467  	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),
 16468  	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),
 16469  	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),
 16470  	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),
 16471  	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),
 16472  	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),
 16473  	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),
 16474  	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),
 16475  	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),
 16476  } /* trees.h:102:25 */
 16477  
 16478  var base_length = [29]int32{
 16479  	0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
 16480  	64, 80, 96, 112, 128, 160, 192, 224, 0,
 16481  } /* trees.h:118:17 */
 16482  
 16483  var base_dist = [30]int32{
 16484  	0, 1, 2, 3, 4, 6, 8, 12, 16, 24,
 16485  	32, 48, 64, 96, 128, 192, 256, 384, 512, 768,
 16486  	1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576,
 16487  } /* trees.h:123:17 */
 16488  
 16489  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 */
 16490  
 16491  var static_d_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Felems: D_CODES, Fmax_length: MAX_BITS} /* trees.c:128:31 */
 16492  
 16493  var static_bl_desc = Static_tree_desc{Fextra_bits: 0, Felems: BL_CODES, Fmax_length: MAX_BL_BITS} /* trees.c:131:31 */
 16494  
 16495  // Send a code of the given tree. c and tree must not have side effects
 16496  
 16497  // ===========================================================================
 16498  // Output a short LSB first on the stream.
 16499  // IN assertion: there is enough room in pendingBuf.
 16500  
 16501  // ===========================================================================
 16502  // Send a value on a given number of bits.
 16503  // IN assertion: length <= 16 and value fits in length bits.
 16504  
 16505  // the arguments must not have side effects
 16506  
 16507  // ===========================================================================
 16508  // Initialize the various 'constant' tables.
 16509  func tr_static_init(tls *libc.TLS) { /* trees.c:232:12: */
 16510  }
 16511  
 16512  // ===========================================================================
 16513  // Genererate the file trees.h describing the static trees.
 16514  
 16515  // ===========================================================================
 16516  // Initialize the tree data structures for a new zlib stream.
 16517  func X_tr_init(tls *libc.TLS, s uintptr) { /* trees.c:379:20: */
 16518  	tr_static_init(tls)
 16519  
 16520  	(*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 148 /* &.dyn_ltree */
 16521  	(*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_l_desc))
 16522  
 16523  	(*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2440 /* &.dyn_dtree */
 16524  	(*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_d_desc))
 16525  
 16526  	(*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2684 /* &.bl_tree */
 16527  	(*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_bl_desc))
 16528  
 16529  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
 16530  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
 16531  
 16532  	// Initialize the first block of the first file:
 16533  	init_block(tls, s)
 16534  }
 16535  
 16536  // ===========================================================================
 16537  // Initialize a new block.
 16538  func init_block(tls *libc.TLS, s uintptr) { /* trees.c:407:12: */
 16539  	var n int32 // iterates over tree elements
 16540  
 16541  	// Initialize the trees.
 16542  	for n = 0; n < LITERALS+1+LENGTH_CODES; n++ {
 16543  		*(*Ush)(unsafe.Pointer(s + 148 + uintptr(n)*4)) = Ush(0)
 16544  	}
 16545  	for n = 0; n < D_CODES; n++ {
 16546  		*(*Ush)(unsafe.Pointer(s + 2440 + uintptr(n)*4)) = Ush(0)
 16547  	}
 16548  	for n = 0; n < BL_CODES; n++ {
 16549  		*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(n)*4)) = Ush(0)
 16550  	}
 16551  
 16552  	*(*Ush)(unsafe.Pointer(s + 148 + 256*4)) = Ush(1)
 16553  	(*Deflate_state)(unsafe.Pointer(s)).Fopt_len = libc.AssignPtrUint32(s+5804, Ulg(0))
 16554  	(*Deflate_state)(unsafe.Pointer(s)).Flast_lit = libc.AssignPtrUint32(s+5808, UInt(0))
 16555  }
 16556  
 16557  // Index within the heap array of least frequent node in the Huffman tree
 16558  
 16559  // ===========================================================================
 16560  // Remove the smallest element from the heap and recreate the heap with
 16561  // one less element. Updates heap and heap_len.
 16562  
 16563  // ===========================================================================
 16564  // Compares to subtrees, using the tree depth as tie breaker when
 16565  // the subtrees have equal frequency. This minimizes the worst case length.
 16566  
 16567  // ===========================================================================
 16568  // Restore the heap property by moving down the tree starting at node k,
 16569  // exchanging a node with the smallest of its two sons if necessary, stopping
 16570  // when the heap property is re-established (each father smaller than its
 16571  // two sons).
 16572  func pqdownheap(tls *libc.TLS, s uintptr, tree uintptr, k int32) { /* trees.c:451:12: */
 16573  	var v int32 = *(*int32)(unsafe.Pointer(s + 2908 + uintptr(k)*4))
 16574  	var j int32 = k << 1 // left son of k
 16575  	for j <= (*Deflate_state)(unsafe.Pointer(s)).Fheap_len {
 16576  		// Set j to the smallest of the two sons:
 16577  		if j < (*Deflate_state)(unsafe.Pointer(s)).Fheap_len && (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2908 + uintptr(j+1)*4)))*4))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2908 + uintptr(j)*4)))*4))) || int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2908 + uintptr(j+1)*4)))*4))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2908 + uintptr(j)*4)))*4))) && int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(*(*int32)(unsafe.Pointer(s + 2908 + uintptr(j+1)*4)))))) <= int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(*(*int32)(unsafe.Pointer(s + 2908 + uintptr(j)*4))))))) {
 16578  			j++
 16579  		}
 16580  		// Exit if v is smaller than both sons
 16581  		if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2908 + uintptr(j)*4)))*4))) || int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2908 + uintptr(j)*4)))*4))) && int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(v)))) <= int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(*(*int32)(unsafe.Pointer(s + 2908 + uintptr(j)*4)))))) {
 16582  			break
 16583  		}
 16584  
 16585  		// Exchange v with the smallest son
 16586  		*(*int32)(unsafe.Pointer(s + 2908 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(s + 2908 + uintptr(j)*4))
 16587  		k = j
 16588  
 16589  		// And continue down the tree, setting j to the left son of k
 16590  		j <<= 1
 16591  	}
 16592  	*(*int32)(unsafe.Pointer(s + 2908 + uintptr(k)*4)) = v
 16593  }
 16594  
 16595  // ===========================================================================
 16596  // Compute the optimal bit lengths for a tree and update the total bit length
 16597  // for the current block.
 16598  // IN assertion: the fields freq and dad are set, heap[heap_max] and
 16599  //    above are the tree nodes sorted by increasing frequency.
 16600  // OUT assertions: the field len is set to the optimal bit length, the
 16601  //     array bl_count contains the frequencies for each bit length.
 16602  //     The length opt_len is updated; static_len is also updated if stree is
 16603  //     not null.
 16604  func gen_bitlen(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:486:12: */
 16605  	var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree
 16606  	var max_code int32 = (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code
 16607  	var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree
 16608  	var extra uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits
 16609  	var base int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base
 16610  	var max_length int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length
 16611  	var h int32 // heap index
 16612  	var n int32
 16613  	var m int32            // iterate over the tree elements
 16614  	var bits int32         // bit length
 16615  	var xbits int32        // extra bits
 16616  	var f Ush              // frequency
 16617  	var overflow int32 = 0 // number of elements with bit length too large
 16618  
 16619  	for bits = 0; bits <= MAX_BITS; bits++ {
 16620  		*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits)*2)) = Ush(0)
 16621  	}
 16622  
 16623  	// In a first pass, compute the optimal bit lengths (which may
 16624  	// overflow in the case of the bit length tree).
 16625  	*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 2908 + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fheap_max)*4)))*4 + 2)) = Ush(0) // root of the heap
 16626  
 16627  	for h = (*Deflate_state)(unsafe.Pointer(s)).Fheap_max + 1; h < 2*(LITERALS+1+LENGTH_CODES)+1; h++ {
 16628  		n = *(*int32)(unsafe.Pointer(s + 2908 + uintptr(h)*4))
 16629  		bits = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)))*4 + 2))) + 1
 16630  		if bits > max_length {
 16631  			bits = max_length
 16632  			overflow++
 16633  		}
 16634  		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = Ush(bits)
 16635  		// We overwrite tree[n].Dad which is no longer needed
 16636  
 16637  		if n > max_code {
 16638  			continue
 16639  		} // not a leaf node
 16640  
 16641  		*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits)*2))++
 16642  		xbits = 0
 16643  		if n >= base {
 16644  			xbits = *(*Intf)(unsafe.Pointer(extra + uintptr(n-base)*4))
 16645  		}
 16646  		f = *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))
 16647  		*(*Ulg)(unsafe.Pointer(s + 5800)) += Ulg(f) * Ulg(uint32(bits+xbits))
 16648  		if stree != 0 {
 16649  			*(*Ulg)(unsafe.Pointer(s + 5804)) += Ulg(f) * Ulg(uint32(int32(*(*Ush)(unsafe.Pointer(stree + uintptr(n)*4 + 2)))+xbits))
 16650  		}
 16651  	}
 16652  	if overflow == 0 {
 16653  		return
 16654  	}
 16655  
 16656  	// This happens for example on obj2 and pic of the Calgary corpus
 16657  
 16658  	// Find the first bit length which could increase:
 16659  	for __ccgo := true; __ccgo; __ccgo = overflow > 0 {
 16660  		bits = max_length - 1
 16661  		for int32(*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits)*2))) == 0 {
 16662  			bits--
 16663  		}
 16664  		*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits)*2))--           // move one leaf down the tree
 16665  		*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits+1)*2)) += Ush(2) // move one overflow item as its brother
 16666  		*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(max_length)*2))--
 16667  		// The brother of the overflow item also moves one step up,
 16668  		// but this does not affect bl_count[max_length]
 16669  		overflow = overflow - 2
 16670  	}
 16671  
 16672  	// Now recompute all bit lengths, scanning in increasing frequency.
 16673  	// h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
 16674  	// lengths instead of fixing only the wrong ones. This idea is taken
 16675  	// from 'ar' written by Haruhiko Okumura.)
 16676  	for bits = max_length; bits != 0; bits-- {
 16677  		n = int32(*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits)*2)))
 16678  		for n != 0 {
 16679  			m = *(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PreDecInt32(&h, 1))*4))
 16680  			if m > max_code {
 16681  				continue
 16682  			}
 16683  			if uint32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2))) != uint32(bits) {
 16684  
 16685  				*(*Ulg)(unsafe.Pointer(s + 5800)) += (Ulg(bits) - Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)))) * Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4)))
 16686  				*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)) = Ush(bits)
 16687  			}
 16688  			n--
 16689  		}
 16690  	}
 16691  }
 16692  
 16693  // ===========================================================================
 16694  // Generate the codes for a given tree and bit counts (which need not be
 16695  // optimal).
 16696  // IN assertion: the array bl_count contains the bit length statistics for
 16697  // the given tree and the field len is set for all tree elements.
 16698  // OUT assertion: the field code is set for all tree elements of non
 16699  //     zero code length.
 16700  func gen_codes(tls *libc.TLS, tree uintptr, max_code int32, bl_count uintptr) { /* trees.c:572:12: */
 16701  	bp := tls.Alloc(32)
 16702  	defer tls.Free(32)
 16703  
 16704  	// var next_code [16]Ush at bp, 32
 16705  	// next code value for each bit length
 16706  	var code uint32 = uint32(0) // running code value
 16707  	var bits int32              // bit index
 16708  	var n int32                 // code index
 16709  
 16710  	// The distribution counts are first used to generate the code values
 16711  	// without bit reversal.
 16712  	for bits = 1; bits <= MAX_BITS; bits++ {
 16713  		code = (code + uint32(*(*Ushf)(unsafe.Pointer(bl_count + uintptr(bits-1)*2)))) << 1
 16714  		*(*Ush)(unsafe.Pointer(bp + uintptr(bits)*2)) = Ush(code)
 16715  	}
 16716  	// Check that the bit counts in bl_count are consistent. The last code
 16717  	// must be all ones.
 16718  
 16719  	for n = 0; n <= max_code; n++ {
 16720  		var len int32 = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)))
 16721  		if len == 0 {
 16722  			continue
 16723  		}
 16724  		// Now reverse the bits
 16725  		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4)) = Ush(bi_reverse(tls, uint32(libc.PostIncUint16(&*(*Ush)(unsafe.Pointer(bp + uintptr(len)*2)), 1)), len))
 16726  
 16727  	}
 16728  }
 16729  
 16730  // ===========================================================================
 16731  // Construct one Huffman tree and assigns the code bit strings and lengths.
 16732  // Update the total bit length for the current block.
 16733  // IN assertion: the field freq is set for all tree elements.
 16734  // OUT assertions: the fields len and code are set to the optimal bit length
 16735  //     and corresponding code. The length opt_len is updated; static_len is
 16736  //     also updated if stree is not null. The field max_code is set.
 16737  func build_tree(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:615:12: */
 16738  	var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree
 16739  	var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree
 16740  	var elems int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems
 16741  	var n int32
 16742  	var m int32             // iterate over heap elements
 16743  	var max_code int32 = -1 // largest code with non zero frequency
 16744  	var node int32          // new node being created
 16745  
 16746  	// Construct the initial heap, with least frequent element in
 16747  	// heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
 16748  	// heap[0] is not used.
 16749  	(*Deflate_state)(unsafe.Pointer(s)).Fheap_len = 0
 16750  	(*Deflate_state)(unsafe.Pointer(s)).Fheap_max = 2*(LITERALS+1+LENGTH_CODES) + 1
 16751  
 16752  	for n = 0; n < elems; n++ {
 16753  		if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))) != 0 {
 16754  			*(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PreIncInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4)) = libc.AssignInt32(&max_code, n)
 16755  			*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(n))) = Uch(0)
 16756  		} else {
 16757  			*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = Ush(0)
 16758  		}
 16759  	}
 16760  
 16761  	// The pkzip format requires that at least one distance code exists,
 16762  	// and that at least one bit should be sent even if there is only one
 16763  	// possible code. So to avoid special checks later on we force at least
 16764  	// two codes of non zero frequency.
 16765  	for (*Deflate_state)(unsafe.Pointer(s)).Fheap_len < 2 {
 16766  		node = libc.AssignPtrInt32(s+2908+uintptr(libc.PreIncInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4, func() int32 {
 16767  			if max_code < 2 {
 16768  				return libc.PreIncInt32(&max_code, 1)
 16769  			}
 16770  			return 0
 16771  		}())
 16772  		*(*Ush)(unsafe.Pointer(tree + uintptr(node)*4)) = Ush(1)
 16773  		*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(node))) = Uch(0)
 16774  		(*Deflate_state)(unsafe.Pointer(s)).Fopt_len--
 16775  		if stree != 0 {
 16776  			*(*Ulg)(unsafe.Pointer(s + 5804)) -= Ulg(*(*Ush)(unsafe.Pointer(stree + uintptr(node)*4 + 2)))
 16777  		}
 16778  		// node is 0 or 1 so it does not have extra bits
 16779  	}
 16780  	(*Tree_desc)(unsafe.Pointer(desc)).Fmax_code = max_code
 16781  
 16782  	// The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
 16783  	// establish sub-heaps of increasing lengths:
 16784  	for n = (*Deflate_state)(unsafe.Pointer(s)).Fheap_len / 2; n >= 1; n-- {
 16785  		pqdownheap(tls, s, tree, n)
 16786  	}
 16787  
 16788  	// Construct the Huffman tree by repeatedly combining the least two
 16789  	// frequent nodes.
 16790  	node = elems // next internal node of the tree
 16791  	for __ccgo := true; __ccgo; __ccgo = (*Deflate_state)(unsafe.Pointer(s)).Fheap_len >= 2 {
 16792  		{
 16793  			n = *(*int32)(unsafe.Pointer(s + 2908 + 1*4))
 16794  			*(*int32)(unsafe.Pointer(s + 2908 + 1*4)) = *(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PostDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4))
 16795  			pqdownheap(tls, s, tree, SMALLEST)
 16796  		}
 16797  		// n = node of least frequency
 16798  		m = *(*int32)(unsafe.Pointer(s + 2908 + 1*4)) // m = node of next least frequency
 16799  
 16800  		*(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = n // keep the nodes sorted by frequency
 16801  		*(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = m
 16802  
 16803  		// Create a new node father of n and m
 16804  		*(*Ush)(unsafe.Pointer(tree + uintptr(node)*4)) = Ush(int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))) + int32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4))))
 16805  		*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(node))) = Uch(func() int32 {
 16806  			if int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(n)))) >= int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(m)))) {
 16807  				return int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(n))))
 16808  			}
 16809  			return int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(m))))
 16810  		}() + 1)
 16811  		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = libc.AssignPtrUint16(tree+uintptr(m)*4+2, Ush(node))
 16812  		// and insert the new node in the heap
 16813  		*(*int32)(unsafe.Pointer(s + 2908 + 1*4)) = libc.PostIncInt32(&node, 1)
 16814  		pqdownheap(tls, s, tree, SMALLEST)
 16815  
 16816  	}
 16817  
 16818  	*(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = *(*int32)(unsafe.Pointer(s + 2908 + 1*4))
 16819  
 16820  	// At this point, the fields freq and dad are set. We can now
 16821  	// generate the bit lengths.
 16822  	gen_bitlen(tls, s, desc)
 16823  
 16824  	// The field len is now set, we can generate the bit codes
 16825  	gen_codes(tls, tree, max_code, s+2876)
 16826  }
 16827  
 16828  // ===========================================================================
 16829  // Scan a literal or distance tree to determine the frequencies of the codes
 16830  // in the bit length tree.
 16831  func scan_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:703:12: */
 16832  	var n int32                                                  // iterates over all tree elements
 16833  	var prevlen int32 = -1                                       // last emitted length
 16834  	var curlen int32                                             // length of current code
 16835  	var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2))) // length of next code
 16836  	var count int32 = 0                                          // repeat count of the current code
 16837  	var max_count int32 = 7                                      // max repeat count
 16838  	var min_count int32 = 4                                      // min repeat count
 16839  
 16840  	if nextlen == 0 {
 16841  		max_count = 138
 16842  		min_count = 3
 16843  	}
 16844  	*(*Ush)(unsafe.Pointer(tree + uintptr(max_code+1)*4 + 2)) = Ush(0xffff) // guard
 16845  
 16846  	for n = 0; n <= max_code; n++ {
 16847  		curlen = nextlen
 16848  		nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n+1)*4 + 2)))
 16849  		if libc.PreIncInt32(&count, 1) < max_count && curlen == nextlen {
 16850  			continue
 16851  		} else if count < min_count {
 16852  			*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4)) += Ush(count)
 16853  		} else if curlen != 0 {
 16854  			if curlen != prevlen {
 16855  				*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4))++
 16856  			}
 16857  			*(*Ush)(unsafe.Pointer(s + 2684 + 16*4))++
 16858  		} else if count <= 10 {
 16859  			*(*Ush)(unsafe.Pointer(s + 2684 + 17*4))++
 16860  		} else {
 16861  			*(*Ush)(unsafe.Pointer(s + 2684 + 18*4))++
 16862  		}
 16863  		count = 0
 16864  		prevlen = curlen
 16865  		if nextlen == 0 {
 16866  			max_count = 138
 16867  			min_count = 3
 16868  		} else if curlen == nextlen {
 16869  			max_count = 6
 16870  			min_count = 3
 16871  		} else {
 16872  			max_count = 7
 16873  			min_count = 4
 16874  		}
 16875  	}
 16876  }
 16877  
 16878  // ===========================================================================
 16879  // Send a literal or distance tree in compressed form, using the codes in
 16880  // bl_tree.
 16881  func send_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:748:12: */
 16882  	var n int32                                                  // iterates over all tree elements
 16883  	var prevlen int32 = -1                                       // last emitted length
 16884  	var curlen int32                                             // length of current code
 16885  	var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2))) // length of next code
 16886  	var count int32 = 0                                          // repeat count of the current code
 16887  	var max_count int32 = 7                                      // max repeat count
 16888  	var min_count int32 = 4                                      // min repeat count
 16889  
 16890  	/* tree[max_code+1].Len = -1; */ // guard already set
 16891  	if nextlen == 0 {
 16892  		max_count = 138
 16893  		min_count = 3
 16894  	}
 16895  
 16896  	for n = 0; n <= max_code; n++ {
 16897  		curlen = nextlen
 16898  		nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n+1)*4 + 2)))
 16899  		if libc.PreIncInt32(&count, 1) < max_count && curlen == nextlen {
 16900  			continue
 16901  		} else if count < min_count {
 16902  			for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&count, 1) != 0 {
 16903  				{
 16904  					var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4 + 2)))
 16905  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 16906  						var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4)))
 16907  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16908  						{
 16909  							{
 16910  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 16911  							}
 16912  							{
 16913  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 16914  							}
 16915  
 16916  						}
 16917  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16918  						*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 16919  					} else {
 16920  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16921  						*(*int32)(unsafe.Pointer(s + 5820)) += len
 16922  					}
 16923  				}
 16924  			}
 16925  
 16926  		} else if curlen != 0 {
 16927  			if curlen != prevlen {
 16928  				{
 16929  					var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4 + 2)))
 16930  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 16931  						var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4)))
 16932  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16933  						{
 16934  							{
 16935  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 16936  							}
 16937  							{
 16938  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 16939  							}
 16940  
 16941  						}
 16942  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16943  						*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 16944  					} else {
 16945  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16946  						*(*int32)(unsafe.Pointer(s + 5820)) += len
 16947  					}
 16948  				}
 16949  				count--
 16950  			}
 16951  
 16952  			{
 16953  				var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 16*4 + 2)))
 16954  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 16955  					var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 16*4)))
 16956  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16957  					{
 16958  						{
 16959  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 16960  						}
 16961  						{
 16962  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 16963  						}
 16964  
 16965  					}
 16966  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16967  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 16968  				} else {
 16969  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + 16*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16970  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 16971  				}
 16972  			}
 16973  			{
 16974  				var len int32 = 2
 16975  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 16976  					var val int32 = count - 3
 16977  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16978  					{
 16979  						{
 16980  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 16981  						}
 16982  						{
 16983  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 16984  						}
 16985  
 16986  					}
 16987  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16988  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 16989  				} else {
 16990  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(count-3)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16991  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 16992  				}
 16993  			}
 16994  
 16995  		} else if count <= 10 {
 16996  			{
 16997  				var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 17*4 + 2)))
 16998  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 16999  					var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 17*4)))
 17000  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17001  					{
 17002  						{
 17003  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17004  						}
 17005  						{
 17006  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17007  						}
 17008  
 17009  					}
 17010  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17011  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17012  				} else {
 17013  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + 17*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17014  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 17015  				}
 17016  			}
 17017  			{
 17018  				var len int32 = 3
 17019  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17020  					var val int32 = count - 3
 17021  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17022  					{
 17023  						{
 17024  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17025  						}
 17026  						{
 17027  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17028  						}
 17029  
 17030  					}
 17031  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17032  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17033  				} else {
 17034  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(count-3)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17035  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 17036  				}
 17037  			}
 17038  
 17039  		} else {
 17040  			{
 17041  				var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 18*4 + 2)))
 17042  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17043  					var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 18*4)))
 17044  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17045  					{
 17046  						{
 17047  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17048  						}
 17049  						{
 17050  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17051  						}
 17052  
 17053  					}
 17054  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17055  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17056  				} else {
 17057  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + 18*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17058  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 17059  				}
 17060  			}
 17061  			{
 17062  				var len int32 = 7
 17063  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17064  					var val int32 = count - 11
 17065  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17066  					{
 17067  						{
 17068  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17069  						}
 17070  						{
 17071  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17072  						}
 17073  
 17074  					}
 17075  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17076  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17077  				} else {
 17078  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(count-11)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17079  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 17080  				}
 17081  			}
 17082  
 17083  		}
 17084  		count = 0
 17085  		prevlen = curlen
 17086  		if nextlen == 0 {
 17087  			max_count = 138
 17088  			min_count = 3
 17089  		} else if curlen == nextlen {
 17090  			max_count = 6
 17091  			min_count = 3
 17092  		} else {
 17093  			max_count = 7
 17094  			min_count = 4
 17095  		}
 17096  	}
 17097  }
 17098  
 17099  // ===========================================================================
 17100  // Construct the Huffman tree for the bit lengths and return the index in
 17101  // bl_order of the last bit length code to send.
 17102  func build_bl_tree(tls *libc.TLS, s uintptr) int32 { /* trees.c:799:11: */
 17103  	var max_blindex int32 // index of last bit length code of non zero freq
 17104  
 17105  	// Determine the bit length frequencies for literal and distance trees
 17106  	scan_tree(tls, s, s+148 /* &.dyn_ltree */, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code)
 17107  	scan_tree(tls, s, s+2440 /* &.dyn_dtree */, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code)
 17108  
 17109  	// Build the bit length tree:
 17110  	build_tree(tls, s, s+2864)
 17111  	// opt_len now includes the length of the tree representations, except
 17112  	// the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
 17113  
 17114  	// Determine the number of bit length codes to send. The pkzip format
 17115  	// requires that at least 4 bit length codes be sent. (appnote.txt says
 17116  	// 3 but the actual value used is 4.)
 17117  	for max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex-- {
 17118  		if int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(bl_order[max_blindex])*4 + 2))) != 0 {
 17119  			break
 17120  		}
 17121  	}
 17122  	// Update opt_len to include the bit length tree and counts
 17123  	*(*Ulg)(unsafe.Pointer(s + 5800)) += Ulg(3)*(Ulg(max_blindex)+Ulg(1)) + Ulg(5) + Ulg(5) + Ulg(4)
 17124  
 17125  	return max_blindex
 17126  }
 17127  
 17128  // ===========================================================================
 17129  // Send the header for a block using dynamic Huffman trees: the counts, the
 17130  // lengths of the bit length codes, the literal tree and the distance tree.
 17131  // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
 17132  func send_all_trees(tls *libc.TLS, s uintptr, lcodes int32, dcodes int32, blcodes int32) { /* trees.c:834:12: */
 17133  	var rank int32 // index in bl_order
 17134  
 17135  	{
 17136  		var len int32 = 5
 17137  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17138  			var val int32 = lcodes - 257
 17139  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17140  			{
 17141  				{
 17142  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17143  				}
 17144  				{
 17145  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17146  				}
 17147  
 17148  			}
 17149  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17150  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17151  		} else {
 17152  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(lcodes-257)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17153  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17154  		}
 17155  	}
 17156  	/* not +255 as stated in appnote.txt */
 17157  	{
 17158  		var len int32 = 5
 17159  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17160  			var val int32 = dcodes - 1
 17161  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17162  			{
 17163  				{
 17164  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17165  				}
 17166  				{
 17167  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17168  				}
 17169  
 17170  			}
 17171  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17172  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17173  		} else {
 17174  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(dcodes-1)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17175  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17176  		}
 17177  	}
 17178  
 17179  	{
 17180  		var len int32 = 4
 17181  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17182  			var val int32 = blcodes - 4
 17183  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17184  			{
 17185  				{
 17186  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17187  				}
 17188  				{
 17189  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17190  				}
 17191  
 17192  			}
 17193  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17194  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17195  		} else {
 17196  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(blcodes-4)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17197  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17198  		}
 17199  	}
 17200  	// not -3 as stated in appnote.txt
 17201  	for rank = 0; rank < blcodes; rank++ {
 17202  
 17203  		{
 17204  			var len int32 = 3
 17205  			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17206  				var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(bl_order[rank])*4 + 2)))
 17207  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17208  				{
 17209  					{
 17210  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17211  					}
 17212  					{
 17213  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17214  					}
 17215  
 17216  				}
 17217  				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17218  				*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17219  			} else {
 17220  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(bl_order[rank])*4 + 2))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17221  				*(*int32)(unsafe.Pointer(s + 5820)) += len
 17222  			}
 17223  		}
 17224  
 17225  	}
 17226  
 17227  	send_tree(tls, s, s+148 /* &.dyn_ltree */, lcodes-1) // literal tree
 17228  
 17229  	send_tree(tls, s, s+2440 /* &.dyn_dtree */, dcodes-1) // distance tree
 17230  
 17231  }
 17232  
 17233  // ===========================================================================
 17234  // Send a stored block
 17235  func X_tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:863:20: */
 17236  	{
 17237  		var len int32 = 3
 17238  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17239  			var val int32 = int32(STORED_BLOCK)<<1 + last
 17240  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17241  			{
 17242  				{
 17243  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17244  				}
 17245  				{
 17246  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17247  				}
 17248  
 17249  			}
 17250  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17251  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17252  		} else {
 17253  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(int32(STORED_BLOCK)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17254  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17255  		}
 17256  	}
 17257  	// send block type
 17258  	bi_windup(tls, s) /* align on byte boundary */
 17259  	{
 17260  		{
 17261  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(stored_len)) & 0xff)
 17262  		}
 17263  		{
 17264  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(stored_len)) >> 8)
 17265  		}
 17266  
 17267  	}
 17268  
 17269  	{
 17270  		{
 17271  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(^stored_len)) & 0xff)
 17272  		}
 17273  		{
 17274  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32(Ush(^stored_len)) >> 8)
 17275  		}
 17276  
 17277  	}
 17278  
 17279  	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending), buf, uint32(stored_len))
 17280  	*(*Ulg)(unsafe.Pointer(s + 20)) += stored_len
 17281  }
 17282  
 17283  // ===========================================================================
 17284  // Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
 17285  func X_tr_flush_bits(tls *libc.TLS, s uintptr) { /* trees.c:886:20: */
 17286  	bi_flush(tls, s)
 17287  }
 17288  
 17289  // ===========================================================================
 17290  // Send one empty static block to give enough lookahead for inflate.
 17291  // This takes 10 bits, of which 7 may remain in the bit buffer.
 17292  func X_tr_align(tls *libc.TLS, s uintptr) { /* trees.c:896:20: */
 17293  	{
 17294  		var len int32 = 3
 17295  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17296  			var val int32 = int32(STATIC_TREES) << 1
 17297  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17298  			{
 17299  				{
 17300  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17301  				}
 17302  				{
 17303  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17304  				}
 17305  
 17306  			}
 17307  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17308  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17309  		} else {
 17310  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(int32(Ush(int32(STATIC_TREES)<<1))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17311  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17312  		}
 17313  	}
 17314  
 17315  	{
 17316  		var len int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 + 2)))
 17317  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17318  			var val int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4)))
 17319  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17320  			{
 17321  				{
 17322  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17323  				}
 17324  				{
 17325  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17326  				}
 17327  
 17328  			}
 17329  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17330  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17331  		} else {
 17332  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17333  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17334  		}
 17335  	}
 17336  
 17337  	bi_flush(tls, s)
 17338  }
 17339  
 17340  // ===========================================================================
 17341  // Determine the best encoding for the current block: dynamic trees, static
 17342  // trees or store, and write out the encoded block.
 17343  func X_tr_flush_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:911:20: */
 17344  	var opt_lenb Ulg
 17345  	var static_lenb Ulg       // opt_len and static_len in bytes
 17346  	var max_blindex int32 = 0 // index of last bit length code of non zero freq
 17347  
 17348  	// Build the Huffman trees unless a stored block is forced
 17349  	if (*Deflate_state)(unsafe.Pointer(s)).Flevel > 0 {
 17350  
 17351  		// Check if the file is binary or text
 17352  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == Z_UNKNOWN {
 17353  			(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = detect_data_type(tls, s)
 17354  		}
 17355  
 17356  		// Construct the literal and distance trees
 17357  		build_tree(tls, s, s+2840)
 17358  
 17359  		build_tree(tls, s, s+2852)
 17360  
 17361  		// At this point, opt_len and static_len are the total bit lengths of
 17362  		// the compressed block data, excluding the tree representations.
 17363  
 17364  		// Build the bit length tree for the above two trees, and get the index
 17365  		// in bl_order of the last bit length code to send.
 17366  		max_blindex = build_bl_tree(tls, s)
 17367  
 17368  		// Determine the best encoding. Compute the block lengths in bytes.
 17369  		opt_lenb = ((*Deflate_state)(unsafe.Pointer(s)).Fopt_len + Ulg(3) + Ulg(7)) >> 3
 17370  		static_lenb = ((*Deflate_state)(unsafe.Pointer(s)).Fstatic_len + Ulg(3) + Ulg(7)) >> 3
 17371  
 17372  		if static_lenb <= opt_lenb {
 17373  			opt_lenb = static_lenb
 17374  		}
 17375  
 17376  	} else {
 17377  
 17378  		opt_lenb = libc.AssignUint32(&static_lenb, stored_len+Ulg(5)) // force a stored block
 17379  	}
 17380  
 17381  	if stored_len+Ulg(4) <= opt_lenb && buf != uintptr(0) {
 17382  		// 4: two words for the lengths
 17383  		// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
 17384  		// Otherwise we can't have processed more than WSIZE input bytes since
 17385  		// the last block flush, because compression would have been
 17386  		// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
 17387  		// transform a block into a stored block.
 17388  		X_tr_stored_block(tls, s, buf, stored_len, last)
 17389  
 17390  	} else if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FIXED || static_lenb == opt_lenb {
 17391  		{
 17392  			var len int32 = 3
 17393  			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17394  				var val int32 = int32(STATIC_TREES)<<1 + last
 17395  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17396  				{
 17397  					{
 17398  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17399  					}
 17400  					{
 17401  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17402  					}
 17403  
 17404  				}
 17405  				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17406  				*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17407  			} else {
 17408  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(int32(STATIC_TREES)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17409  				*(*int32)(unsafe.Pointer(s + 5820)) += len
 17410  			}
 17411  		}
 17412  
 17413  		compress_block(tls, s, uintptr(uintptr(unsafe.Pointer(&static_ltree))),
 17414  			uintptr(uintptr(unsafe.Pointer(&static_dtree))))
 17415  	} else {
 17416  		{
 17417  			var len int32 = 3
 17418  			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17419  				var val int32 = int32(DYN_TREES)<<1 + last
 17420  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17421  				{
 17422  					{
 17423  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17424  					}
 17425  					{
 17426  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17427  					}
 17428  
 17429  				}
 17430  				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17431  				*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17432  			} else {
 17433  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(int32(DYN_TREES)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17434  				*(*int32)(unsafe.Pointer(s + 5820)) += len
 17435  			}
 17436  		}
 17437  
 17438  		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,
 17439  			max_blindex+1)
 17440  		compress_block(tls, s, s+148, /* &.dyn_ltree */
 17441  			s+2440 /* &.dyn_dtree */)
 17442  	}
 17443  
 17444  	// The above check is made mod 2^32, for files larger than 512 MB
 17445  	// and uLong implemented on 32 bits.
 17446  	init_block(tls, s)
 17447  
 17448  	if last != 0 {
 17449  		bi_windup(tls, s)
 17450  	}
 17451  
 17452  }
 17453  
 17454  // ===========================================================================
 17455  // Save the match info and tally the frequency counts. Return true if
 17456  // the current block must be flushed.
 17457  func X_tr_tally(tls *libc.TLS, s uintptr, dist uint32, lc uint32) int32 { /* trees.c:1014:19: */
 17458  	*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ush(dist)
 17459  	*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = Uch(lc)
 17460  	if dist == uint32(0) {
 17461  		// lc is the unmatched char
 17462  		*(*Ush)(unsafe.Pointer(s + 148 + uintptr(lc)*4))++
 17463  	} else {
 17464  		(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
 17465  		// Here, lc is the match length - MIN_MATCH
 17466  		dist-- // dist = match distance - 1
 17467  
 17468  		*(*Ush)(unsafe.Pointer(s + 148 + uintptr(int32(X_length_code[lc])+LITERALS+1)*4))++
 17469  		*(*Ush)(unsafe.Pointer(s + 2440 + uintptr(func() int32 {
 17470  			if dist < uint32(256) {
 17471  				return int32(X_dist_code[dist])
 17472  			}
 17473  			return int32(X_dist_code[uint32(256)+dist>>7])
 17474  		}())*4))++
 17475  	}
 17476  
 17477  	return libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
 17478  	// We avoid equality with lit_bufsize because of wraparound at 64K
 17479  	// on 16 bit machines and because stored blocks are restricted to
 17480  	// 64K-1 bytes.
 17481  }
 17482  
 17483  // ===========================================================================
 17484  // Send the block data compressed using the given Huffman trees
 17485  func compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { /* trees.c:1064:12: */
 17486  	var dist uint32           // distance of matched string
 17487  	var lc int32              // match length or unmatched char (if dist == 0)
 17488  	var lx uint32 = uint32(0) // running index in l_buf
 17489  	var code uint32           // the code to send
 17490  	var extra int32           // number of extra bits to send
 17491  
 17492  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != UInt(0) {
 17493  		for __ccgo := true; __ccgo; __ccgo = lx < (*Deflate_state)(unsafe.Pointer(s)).Flast_lit {
 17494  			dist = uint32(*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr(lx)*2)))
 17495  			lc = int32(*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&lx, 1)))))
 17496  			if dist == uint32(0) {
 17497  				{
 17498  					var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2)))
 17499  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17500  						var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4)))
 17501  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17502  						{
 17503  							{
 17504  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17505  							}
 17506  							{
 17507  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17508  							}
 17509  
 17510  						}
 17511  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17512  						*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17513  					} else {
 17514  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17515  						*(*int32)(unsafe.Pointer(s + 5820)) += len
 17516  					}
 17517  				}
 17518  				// send a literal byte
 17519  
 17520  			} else {
 17521  				// Here, lc is the match length - MIN_MATCH
 17522  				code = uint32(X_length_code[lc])
 17523  				{
 17524  					var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4 + 2)))
 17525  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17526  						var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4)))
 17527  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17528  						{
 17529  							{
 17530  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17531  							}
 17532  							{
 17533  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17534  							}
 17535  
 17536  						}
 17537  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17538  						*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17539  					} else {
 17540  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17541  						*(*int32)(unsafe.Pointer(s + 5820)) += len
 17542  					}
 17543  				}
 17544  				// send the length code
 17545  				extra = extra_lbits[code]
 17546  				if extra != 0 {
 17547  					lc = lc - base_length[code]
 17548  					{
 17549  						var len int32 = extra
 17550  						if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17551  							var val int32 = lc
 17552  							*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17553  							{
 17554  								{
 17555  									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17556  								}
 17557  								{
 17558  									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17559  								}
 17560  
 17561  							}
 17562  							(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17563  							*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17564  						} else {
 17565  							*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(lc)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17566  							*(*int32)(unsafe.Pointer(s + 5820)) += len
 17567  						}
 17568  					}
 17569  					// send the extra length bits
 17570  				}
 17571  				dist-- // dist is now the match distance - 1
 17572  				code = func() uint32 {
 17573  					if dist < uint32(256) {
 17574  						return uint32(X_dist_code[dist])
 17575  					}
 17576  					return uint32(X_dist_code[uint32(256)+dist>>7])
 17577  				}()
 17578  
 17579  				{
 17580  					var len int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2)))
 17581  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17582  						var val int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4)))
 17583  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17584  						{
 17585  							{
 17586  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17587  							}
 17588  							{
 17589  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17590  							}
 17591  
 17592  						}
 17593  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17594  						*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17595  					} else {
 17596  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17597  						*(*int32)(unsafe.Pointer(s + 5820)) += len
 17598  					}
 17599  				}
 17600  				// send the distance code
 17601  				extra = extra_dbits[code]
 17602  				if extra != 0 {
 17603  					dist = dist - uint32(base_dist[code])
 17604  					{
 17605  						var len int32 = extra
 17606  						if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17607  							var val int32 = int32(dist)
 17608  							*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17609  							{
 17610  								{
 17611  									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17612  								}
 17613  								{
 17614  									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17615  								}
 17616  
 17617  							}
 17618  							(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17619  							*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17620  						} else {
 17621  							*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(dist)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17622  							*(*int32)(unsafe.Pointer(s + 5820)) += len
 17623  						}
 17624  					}
 17625  					// send the extra distance bits
 17626  				}
 17627  			} // literal or match pair ?
 17628  
 17629  			// Check that the overlay between pending_buf and d_buf+l_buf is ok:
 17630  
 17631  		}
 17632  	}
 17633  
 17634  	{
 17635  		var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 + 2)))
 17636  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17637  			var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4)))
 17638  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17639  			{
 17640  				{
 17641  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17642  				}
 17643  				{
 17644  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17645  				}
 17646  
 17647  			}
 17648  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17649  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17650  		} else {
 17651  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + 256*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17652  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17653  		}
 17654  	}
 17655  
 17656  }
 17657  
 17658  // ===========================================================================
 17659  // Check if the data type is TEXT or BINARY, using the following algorithm:
 17660  // - TEXT if the two conditions below are satisfied:
 17661  //    a) There are no non-portable control characters belonging to the
 17662  //       "black list" (0..6, 14..25, 28..31).
 17663  //    b) There is at least one printable character belonging to the
 17664  //       "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
 17665  // - BINARY otherwise.
 17666  // - The following partially-portable control characters form a
 17667  //   "gray list" that is ignored in this detection algorithm:
 17668  //   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
 17669  // IN assertion: the fields Freq of dyn_ltree are set.
 17670  func detect_data_type(tls *libc.TLS, s uintptr) int32 { /* trees.c:1124:11: */
 17671  	// black_mask is the bit mask of black-listed bytes
 17672  	// set bits 0..6, 14..25, and 28..31
 17673  	// 0xf3ffc07f = binary 11110011111111111100000001111111
 17674  	var black_mask uint32 = 0xf3ffc07f
 17675  	var n int32
 17676  
 17677  	// Check for non-textual ("black-listed") bytes.
 17678  	n = 0
 17679  __1:
 17680  	if !(n <= 31) {
 17681  		goto __3
 17682  	}
 17683  	if black_mask&uint32(1) != 0 && int32(*(*Ush)(unsafe.Pointer(s + 148 + uintptr(n)*4))) != 0 {
 17684  		return Z_BINARY
 17685  	}
 17686  	goto __2
 17687  __2:
 17688  	n++
 17689  	black_mask >>= 1
 17690  	goto __1
 17691  	goto __3
 17692  __3:
 17693  	;
 17694  
 17695  	// Check for textual ("white-listed") bytes.
 17696  	if int32(*(*Ush)(unsafe.Pointer(s + 148 + 9*4))) != 0 || int32(*(*Ush)(unsafe.Pointer(s + 148 + 10*4))) != 0 ||
 17697  		int32(*(*Ush)(unsafe.Pointer(s + 148 + 13*4))) != 0 {
 17698  		return Z_TEXT
 17699  	}
 17700  	for n = 32; n < LITERALS; n++ {
 17701  		if int32(*(*Ush)(unsafe.Pointer(s + 148 + uintptr(n)*4))) != 0 {
 17702  			return Z_TEXT
 17703  		}
 17704  	}
 17705  
 17706  	// There are no "black-listed" or "white-listed" bytes:
 17707  	// this stream either is empty or has tolerated ("gray-listed") bytes only.
 17708  	return Z_BINARY
 17709  }
 17710  
 17711  // ===========================================================================
 17712  // Reverse the first len bits of a code, using straightforward code (a faster
 17713  // method would use a table)
 17714  // IN assertion: 1 <= len <= 15
 17715  func bi_reverse(tls *libc.TLS, code uint32, len int32) uint32 { /* trees.c:1158:16: */
 17716  	var res uint32 = uint32(0)
 17717  	for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&len, 1) > 0 {
 17718  		res = res | code&uint32(1)
 17719  		code >>= 1
 17720  		res <<= 1
 17721  	}
 17722  	return res >> 1
 17723  }
 17724  
 17725  // ===========================================================================
 17726  // Flush the bit buffer, keeping at most 7 bits in it.
 17727  func bi_flush(tls *libc.TLS, s uintptr) { /* trees.c:1173:12: */
 17728  	if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid == 16 {
 17729  		{
 17730  			{
 17731  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17732  			}
 17733  			{
 17734  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17735  			}
 17736  
 17737  		}
 17738  
 17739  		(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
 17740  		(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
 17741  	} else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid >= 8 {
 17742  		{
 17743  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)
 17744  		}
 17745  
 17746  		libc.AssignShrPtrUint16(s+5816, int(8))
 17747  		*(*int32)(unsafe.Pointer(s + 5820)) -= 8
 17748  	}
 17749  }
 17750  
 17751  // ===========================================================================
 17752  // Flush the bit buffer and align the output on a byte boundary
 17753  func bi_windup(tls *libc.TLS, s uintptr) { /* trees.c:1190:12: */
 17754  	if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 8 {
 17755  		{
 17756  			{
 17757  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17758  			}
 17759  			{
 17760  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17761  			}
 17762  
 17763  		}
 17764  
 17765  	} else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 {
 17766  		{
 17767  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)
 17768  		}
 17769  
 17770  	}
 17771  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
 17772  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
 17773  }
 17774  
 17775  // ===========================================================================
 17776  //      Decompresses the source buffer into the destination buffer.  *sourceLen is
 17777  //    the byte length of the source buffer. Upon entry, *destLen is the total size
 17778  //    of the destination buffer, which must be large enough to hold the entire
 17779  //    uncompressed data. (The size of the uncompressed data must have been saved
 17780  //    previously by the compressor and transmitted to the decompressor by some
 17781  //    mechanism outside the scope of this compression library.) Upon exit,
 17782  //    *destLen is the size of the decompressed data and *sourceLen is the number
 17783  //    of source bytes consumed. Upon return, source + *sourceLen points to the
 17784  //    first unused input byte.
 17785  //
 17786  //      uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough
 17787  //    memory, Z_BUF_ERROR if there was not enough room in the output buffer, or
 17788  //    Z_DATA_ERROR if the input data was corrupted, including if the input data is
 17789  //    an incomplete zlib stream.
 17790  func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) int32 { /* uncompr.c:27:13: */
 17791  	bp := tls.Alloc(60)
 17792  	defer tls.Free(60)
 17793  
 17794  	// var stream Z_stream at bp+4, 56
 17795  
 17796  	var err int32
 17797  	var max UInt = libc.Uint32(libc.Uint32FromInt32(-1))
 17798  	var len ULong
 17799  	var left ULong
 17800  	// var buf [1]Byte at bp, 1
 17801  	// for detection of incomplete stream when *destLen == 0
 17802  
 17803  	len = *(*ULong)(unsafe.Pointer(sourceLen))
 17804  	if *(*ULongf)(unsafe.Pointer(destLen)) != 0 {
 17805  		left = *(*ULongf)(unsafe.Pointer(destLen))
 17806  		*(*ULongf)(unsafe.Pointer(destLen)) = ULongf(0)
 17807  	} else {
 17808  		left = ULong(1)
 17809  		dest = bp /* &buf[0] */
 17810  	}
 17811  
 17812  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fnext_in = source
 17813  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_in = UInt(0)
 17814  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fzalloc = uintptr(0)
 17815  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fzfree = uintptr(0)
 17816  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fopaque = uintptr(0)
 17817  
 17818  	err = XinflateInit_(tls, bp+4, ts, int32(unsafe.Sizeof(Z_stream{})))
 17819  	if err != Z_OK {
 17820  		return err
 17821  	}
 17822  
 17823  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fnext_out = dest
 17824  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_out = UInt(0)
 17825  
 17826  	for __ccgo := true; __ccgo; __ccgo = err == Z_OK {
 17827  		if (*Z_stream)(unsafe.Pointer(bp+4)).Favail_out == UInt(0) {
 17828  			(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_out = func() uint32 {
 17829  				if left > ULong(max) {
 17830  					return max
 17831  				}
 17832  				return UInt(left)
 17833  			}()
 17834  			left = left - ULong((*Z_stream)(unsafe.Pointer(bp+4)).Favail_out)
 17835  		}
 17836  		if (*Z_stream)(unsafe.Pointer(bp+4)).Favail_in == UInt(0) {
 17837  			(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_in = func() uint32 {
 17838  				if len > ULong(max) {
 17839  					return max
 17840  				}
 17841  				return UInt(len)
 17842  			}()
 17843  			len = len - ULong((*Z_stream)(unsafe.Pointer(bp+4)).Favail_in)
 17844  		}
 17845  		err = Xinflate(tls, bp+4, Z_NO_FLUSH)
 17846  	}
 17847  
 17848  	*(*ULong)(unsafe.Pointer(sourceLen)) -= len + ULong((*Z_stream)(unsafe.Pointer(bp+4)).Favail_in)
 17849  	if dest != bp {
 17850  		*(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Ftotal_out
 17851  	} else if (*Z_stream)(unsafe.Pointer(bp+4)).Ftotal_out != 0 && err == -5 {
 17852  		left = ULong(1)
 17853  	}
 17854  
 17855  	XinflateEnd(tls, bp+4)
 17856  	if err == Z_STREAM_END {
 17857  		return Z_OK
 17858  	}
 17859  	if err == Z_NEED_DICT {
 17860  		return -3
 17861  	}
 17862  	if err == -5 && left+ULong((*Z_stream)(unsafe.Pointer(bp+4)).Favail_out) != 0 {
 17863  		return -3
 17864  	}
 17865  	return err
 17866  }
 17867  
 17868  func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* uncompr.c:86:13: */
 17869  	bp := tls.Alloc(4)
 17870  	defer tls.Free(4)
 17871  	*(*ULong)(unsafe.Pointer(bp)) = sourceLen
 17872  
 17873  	return Xuncompress2(tls, dest, destLen, source, bp)
 17874  }
 17875  
 17876  // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
 17877  //    value -- needed when comparing unsigned to z_off64_t, which is signed
 17878  //    (possible z_off64_t types off_t, off64_t, and long are all signed)
 17879  
 17880  var Xz_errmsg = [10]uintptr{
 17881  	uintptr(ts + 876),
 17882  	uintptr(ts + 892),
 17883  	uintptr(ts + 101),
 17884  	uintptr(ts + 903),
 17885  	uintptr(ts + 914),
 17886  	uintptr(ts + 927),
 17887  	uintptr(ts + 938),
 17888  	uintptr(ts + 958),
 17889  	uintptr(ts + 971),
 17890  	uintptr(ts + 101),
 17891  } /* zutil.c:13:14 */
 17892  
 17893  func XzlibVersion(tls *libc.TLS) uintptr { /* zutil.c:27:12: */
 17894  	return ts /* "1.2.11" */
 17895  }
 17896  
 17897  func XzlibCompileFlags(tls *libc.TLS) ULong { /* zutil.c:32:15: */
 17898  	var flags ULong
 17899  
 17900  	flags = ULong(0)
 17901  	switch int32(unsafe.Sizeof(UInt(0))) {
 17902  	case 2:
 17903  		break
 17904  	case 4:
 17905  		flags = flags + ULong(1)
 17906  		break
 17907  	case 8:
 17908  		flags = flags + ULong(2)
 17909  		break
 17910  	default:
 17911  		flags = flags + ULong(3)
 17912  	}
 17913  	switch int32(unsafe.Sizeof(ULong(0))) {
 17914  	case 2:
 17915  		break
 17916  	case 4:
 17917  		flags = flags + ULong(int32(1)<<2)
 17918  		break
 17919  	case 8:
 17920  		flags = flags + ULong(int32(2)<<2)
 17921  		break
 17922  	default:
 17923  		flags = flags + ULong(int32(3)<<2)
 17924  	}
 17925  	switch int32(unsafe.Sizeof(Voidpf(0))) {
 17926  	case 2:
 17927  		break
 17928  	case 4:
 17929  		flags = flags + ULong(int32(1)<<4)
 17930  		break
 17931  	case 8:
 17932  		flags = flags + ULong(int32(2)<<4)
 17933  		break
 17934  	default:
 17935  		flags = flags + ULong(int32(3)<<4)
 17936  	}
 17937  	switch int32(unsafe.Sizeof(Off_t(0))) {
 17938  	case 2:
 17939  		break
 17940  	case 4:
 17941  		flags = flags + ULong(int32(1)<<6)
 17942  		break
 17943  	case 8:
 17944  		flags = flags + ULong(int32(2)<<6)
 17945  		break
 17946  	default:
 17947  		flags = flags + ULong(int32(3)<<6)
 17948  	}
 17949  	return flags
 17950  }
 17951  
 17952  // exported to allow conversion of error code to string for compress() and
 17953  // uncompress()
 17954  func XzError(tls *libc.TLS, err int32) uintptr { /* zutil.c:133:12: */
 17955  	return Xz_errmsg[Z_NEED_DICT-err]
 17956  }
 17957  
 17958  func Xzcalloc(tls *libc.TLS, opaque Voidpf, items uint32, size uint32) Voidpf { /* zutil.c:305:22: */
 17959  	_ = opaque
 17960  	if uint32(unsafe.Sizeof(UInt(0))) > uint32(2) {
 17961  		return libc.Xmalloc(tls, items*size)
 17962  	}
 17963  	return libc.Xcalloc(tls, items, size)
 17964  }
 17965  
 17966  func Xzcfree(tls *libc.TLS, opaque Voidpf, ptr Voidpf) { /* zutil.c:315:20: */
 17967  	_ = opaque
 17968  	libc.Xfree(tls, ptr)
 17969  }
 17970  
 17971  func init() {
 17972  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 8)) = deflate_stored  // deflate.c:136:29:
 17973  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 20)) = deflate_fast   // deflate.c:137:29:
 17974  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 32)) = deflate_fast   // deflate.c:138:29:
 17975  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 44)) = deflate_fast   // deflate.c:139:29:
 17976  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 56)) = deflate_slow   // deflate.c:141:29:
 17977  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 68)) = deflate_slow   // deflate.c:142:29:
 17978  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 80)) = deflate_slow   // deflate.c:143:29:
 17979  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 92)) = deflate_slow   // deflate.c:144:29:
 17980  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 104)) = deflate_slow  // deflate.c:145:30:
 17981  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 116)) = deflate_slow  // deflate.c:146:30:
 17982  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_bl_desc)) + 4 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_blbits)) // trees.c:132:22:
 17983  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_dtree)) // trees.c:129:2:
 17984  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 4 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_dbits))   // trees.c:129:16:
 17985  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_ltree)) // trees.c:126:2:
 17986  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 4 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_lbits))   // trees.c:126:16:
 17987  }
 17988  
 17989  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"
 17990  var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data