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

     1  // Code generated by 'ccgo -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -o lib/z_freebsd_386.go -pkgname z -trace-translation-units /tmp/go-generate-3821858036/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
    24  	BASE                                 = 65521
    25  	BC_BASE_MAX                          = 99
    26  	BC_DIM_MAX                           = 2048
    27  	BC_SCALE_MAX                         = 99
    28  	BC_STRING_MAX                        = 1000
    29  	BIG_ENDIAN                           = 4321
    30  	BYTE_ORDER                           = 1234
    31  	CHARCLASS_NAME_MAX                   = 14
    32  	CHAR_BIT                             = 8
    33  	CHAR_MAX                             = 127
    34  	CHAR_MIN                             = -128
    35  	CHILD_MAX                            = 40
    36  	COLL_WEIGHTS_MAX                     = 10
    37  	DEF_MEM_LEVEL                        = 8
    38  	DEF_WBITS                            = 15
    39  	DYN_TREES                            = 2
    40  	EXIT_FAILURE                         = 1
    41  	EXIT_SUCCESS                         = 0
    42  	EXPR_NEST_MAX                        = 32
    43  	FAR                                  = 0
    44  	FD_SETSIZE                           = 1024
    45  	F_LOCK                               = 1
    46  	F_OK                                 = 0
    47  	F_TEST                               = 3
    48  	F_TLOCK                              = 2
    49  	F_ULOCK                              = 0
    50  	GID_MAX                              = 4294967295
    51  	HAVE_HIDDEN                          = 1
    52  	HAVE_MEMCPY                          = 0
    53  	INT_MAX                              = 2147483647
    54  	INT_MIN                              = -2147483648
    55  	IOV_MAX                              = 1024
    56  	LINE_MAX                             = 2048
    57  	LITTLE_ENDIAN                        = 1234
    58  	LLONG_MAX                            = 9223372036854775807
    59  	LLONG_MIN                            = -9223372036854775808
    60  	LONG_BIT                             = 32
    61  	LONG_MAX                             = 2147483647
    62  	LONG_MIN                             = -2147483648
    63  	L_INCR                               = 1
    64  	L_SET                                = 0
    65  	L_XTND                               = 2
    66  	MAX_CANON                            = 255
    67  	MAX_INPUT                            = 255
    68  	MAX_MATCH                            = 258
    69  	MAX_MEM_LEVEL                        = 9
    70  	MAX_WBITS                            = 15
    71  	MB_LEN_MAX                           = 6
    72  	MIN_MATCH                            = 3
    73  	MQ_PRIO_MAX                          = 64
    74  	NAME_MAX                             = 255
    75  	NGROUPS_MAX                          = 1023
    76  	NL_ARGMAX                            = 4096
    77  	NL_LANGMAX                           = 31
    78  	NL_MSGMAX                            = 32767
    79  	NL_NMAX                              = 1
    80  	NL_SETMAX                            = 255
    81  	NL_TEXTMAX                           = 2048
    82  	NMAX                                 = 5552
    83  	OFF_MAX                              = 9223372036854775807
    84  	OFF_MIN                              = -9223372036854775808
    85  	OPEN_MAX                             = 64
    86  	OS_CODE                              = 3
    87  	PASS_MAX                             = 128
    88  	PATH_MAX                             = 1024
    89  	PDP_ENDIAN                           = 3412
    90  	PIPE_BUF                             = 512
    91  	PRESET_DICT                          = 0x20
    92  	QUAD_MAX                             = 9223372036854775807
    93  	QUAD_MIN                             = -9223372036854775808
    94  	RAND_MAX                             = 0x7fffffff
    95  	RE_DUP_MAX                           = 255
    96  	RFCENVG                              = 2048
    97  	RFCFDG                               = 4096
    98  	RFCNAMEG                             = 1024
    99  	RFENVG                               = 2
   100  	RFFDG                                = 4
   101  	RFFLAGS                              = 2416930932
   102  	RFHIGHPID                            = 262144
   103  	RFKERNELONLY                         = 268828672
   104  	RFLINUXTHPN                          = 65536
   105  	RFMEM                                = 32
   106  	RFNAMEG                              = 1
   107  	RFNOTEG                              = 8
   108  	RFNOWAIT                             = 64
   109  	RFPPWAIT                             = 2147483648
   110  	RFPROC                               = 16
   111  	RFPROCDESC                           = 268435456
   112  	RFSIGSHARE                           = 16384
   113  	RFSPAWN                              = 2147483648
   114  	RFSTOPPED                            = 131072
   115  	RFTHREAD                             = 8192
   116  	RFTSIGMASK                           = 0xFF
   117  	RFTSIGSHIFT                          = 20
   118  	RFTSIGZMB                            = 524288
   119  	R_OK                                 = 0x04
   120  	SCHAR_MAX                            = 127
   121  	SCHAR_MIN                            = -128
   122  	SEEK_CUR                             = 1
   123  	SEEK_DATA                            = 3
   124  	SEEK_END                             = 2
   125  	SEEK_HOLE                            = 4
   126  	SEEK_SET                             = 0
   127  	SHRT_MAX                             = 32767
   128  	SHRT_MIN                             = -32768
   129  	SIZE_T_MAX                           = 4294967295
   130  	SSIZE_MAX                            = 2147483647
   131  	STATIC_TREES                         = 1
   132  	STDC                                 = 0
   133  	STDC99                               = 0
   134  	STDERR_FILENO                        = 2
   135  	STDIN_FILENO                         = 0
   136  	STDOUT_FILENO                        = 1
   137  	STORED_BLOCK                         = 0
   138  	SWAPOFF_FORCE                        = 0x00000001
   139  	UCHAR_MAX                            = 255
   140  	UID_MAX                              = 4294967295
   141  	UINT_MAX                             = 4294967295
   142  	ULLONG_MAX                           = 18446744073709551615
   143  	ULONG_MAX                            = 4294967295
   144  	UQUAD_MAX                            = 18446744073709551615
   145  	USHRT_MAX                            = 65535
   146  	WORD_BIT                             = 32
   147  	W_OK                                 = 0x02
   148  	X_OK                                 = 0x01
   149  	ZCONF_H                              = 0
   150  	ZEXPORT                              = 0
   151  	ZEXPORTVA                            = 0
   152  	ZLIB_H                               = 0
   153  	ZLIB_VERNUM                          = 0x12b0
   154  	ZLIB_VERSION                         = "1.2.11"
   155  	ZLIB_VER_MAJOR                       = 1
   156  	ZLIB_VER_MINOR                       = 2
   157  	ZLIB_VER_REVISION                    = 11
   158  	ZLIB_VER_SUBREVISION                 = 0
   159  	ZUTIL_H                              = 0
   160  	Z_ASCII                              = 1
   161  	Z_BEST_COMPRESSION                   = 9
   162  	Z_BEST_SPEED                         = 1
   163  	Z_BINARY                             = 0
   164  	Z_BLOCK                              = 5
   165  	Z_BUF_ERROR                          = -5
   166  	Z_DATA_ERROR                         = -3
   167  	Z_DEFAULT_COMPRESSION                = -1
   168  	Z_DEFAULT_STRATEGY                   = 0
   169  	Z_DEFLATED                           = 8
   170  	Z_ERRNO                              = -1
   171  	Z_FILTERED                           = 1
   172  	Z_FINISH                             = 4
   173  	Z_FIXED                              = 4
   174  	Z_FULL_FLUSH                         = 3
   175  	Z_HAVE_STDARG_H                      = 0
   176  	Z_HAVE_UNISTD_H                      = 0
   177  	Z_HUFFMAN_ONLY                       = 2
   178  	Z_MEM_ERROR                          = -4
   179  	Z_NEED_DICT                          = 2
   180  	Z_NO_COMPRESSION                     = 0
   181  	Z_NO_FLUSH                           = 0
   182  	Z_NULL                               = 0
   183  	Z_OK                                 = 0
   184  	Z_PARTIAL_FLUSH                      = 1
   185  	Z_RLE                                = 3
   186  	Z_STREAM_END                         = 1
   187  	Z_STREAM_ERROR                       = -2
   188  	Z_SYNC_FLUSH                         = 2
   189  	Z_TEXT                               = 1
   190  	Z_TREES                              = 6
   191  	Z_UNKNOWN                            = 2
   192  	Z_VERSION_ERROR                      = -6
   193  	X_ACCMODE_T_DECLARED                 = 0
   194  	X_BIG_ENDIAN                         = 4321
   195  	X_BLKCNT_T_DECLARED                  = 0
   196  	X_BLKSIZE_T_DECLARED                 = 0
   197  	X_BYTE_ORDER                         = 1234
   198  	X_CAP_IOCTL_T_DECLARED               = 0
   199  	X_CAP_RIGHTS_T_DECLARED              = 0
   200  	X_CLOCKID_T_DECLARED                 = 0
   201  	X_CLOCK_T_DECLARED                   = 0
   202  	X_CS_PATH                            = 1
   203  	X_CS_POSIX_V6_ILP32_OFF32_CFLAGS     = 2
   204  	X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS    = 3
   205  	X_CS_POSIX_V6_ILP32_OFF32_LIBS       = 4
   206  	X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS    = 5
   207  	X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS   = 6
   208  	X_CS_POSIX_V6_ILP32_OFFBIG_LIBS      = 7
   209  	X_CS_POSIX_V6_LP64_OFF64_CFLAGS      = 8
   210  	X_CS_POSIX_V6_LP64_OFF64_LDFLAGS     = 9
   211  	X_CS_POSIX_V6_LP64_OFF64_LIBS        = 10
   212  	X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS    = 11
   213  	X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS   = 12
   214  	X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS      = 13
   215  	X_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS  = 14
   216  	X_DEV_T_DECLARED                     = 0
   217  	X_ERRNO_T_DEFINED                    = 0
   218  	X_FFLAGS_T_DECLARED                  = 0
   219  	X_FILE_OFFSET_BITS                   = 64
   220  	X_FSBLKCNT_T_DECLARED                = 0
   221  	X_FTRUNCATE_DECLARED                 = 0
   222  	X_GCC_MAX_ALIGN_T                    = 0
   223  	X_GETOPT_DECLARED                    = 0
   224  	X_GID_T_DECLARED                     = 0
   225  	X_ID_T_DECLARED                      = 0
   226  	X_ILP32                              = 1
   227  	X_INO_T_DECLARED                     = 0
   228  	X_INT16_T_DECLARED                   = 0
   229  	X_INT32_T_DECLARED                   = 0
   230  	X_INT64_T_DECLARED                   = 0
   231  	X_INT8_T_DECLARED                    = 0
   232  	X_INTMAX_T_DECLARED                  = 0
   233  	X_INTPTR_T_DECLARED                  = 0
   234  	X_IN_ADDR_T_DECLARED                 = 0
   235  	X_IN_PORT_T_DECLARED                 = 0
   236  	X_KEY_T_DECLARED                     = 0
   237  	X_LARGEFILE64_SOURCE                 = 1
   238  	X_LIMITS_H_                          = 0
   239  	X_LITTLE_ENDIAN                      = 1234
   240  	X_LOCALE_T_DEFINED                   = 0
   241  	X_LSEEK_DECLARED                     = 0
   242  	X_LWPID_T_DECLARED                   = 0
   243  	X_MACHINE_ENDIAN_H_                  = 0
   244  	X_MACHINE_STDARG_H_                  = 0
   245  	X_MACHINE__LIMITS_H_                 = 0
   246  	X_MACHINE__TYPES_H_                  = 0
   247  	X_MKDTEMP_DECLARED                   = 0
   248  	X_MKNOD_DECLARED                     = 0
   249  	X_MKSTEMP_DECLARED                   = 0
   250  	X_MKTEMP_DECLARED                    = 0
   251  	X_MMAP_DECLARED                      = 0
   252  	X_MODE_T_DECLARED                    = 0
   253  	X_MQD_T_DECLARED                     = 0
   254  	X_NLINK_T_DECLARED                   = 0
   255  	X_Nonnull                            = 0
   256  	X_Null_unspecified                   = 0
   257  	X_Nullable                           = 0
   258  	X_OFF64_T_DECLARED                   = 0
   259  	X_OFF_T_DECLARED                     = 0
   260  	X_OPTRESET_DECLARED                  = 0
   261  	X_PC_ACL_EXTENDED                    = 59
   262  	X_PC_ACL_NFS4                        = 64
   263  	X_PC_ACL_PATH_MAX                    = 60
   264  	X_PC_ALLOC_SIZE_MIN                  = 10
   265  	X_PC_ASYNC_IO                        = 53
   266  	X_PC_CAP_PRESENT                     = 61
   267  	X_PC_CHOWN_RESTRICTED                = 7
   268  	X_PC_FILESIZEBITS                    = 12
   269  	X_PC_INF_PRESENT                     = 62
   270  	X_PC_LINK_MAX                        = 1
   271  	X_PC_MAC_PRESENT                     = 63
   272  	X_PC_MAX_CANON                       = 2
   273  	X_PC_MAX_INPUT                       = 3
   274  	X_PC_MIN_HOLE_SIZE                   = 21
   275  	X_PC_NAME_MAX                        = 4
   276  	X_PC_NO_TRUNC                        = 8
   277  	X_PC_PATH_MAX                        = 5
   278  	X_PC_PIPE_BUF                        = 6
   279  	X_PC_PRIO_IO                         = 54
   280  	X_PC_REC_INCR_XFER_SIZE              = 14
   281  	X_PC_REC_MAX_XFER_SIZE               = 15
   282  	X_PC_REC_MIN_XFER_SIZE               = 16
   283  	X_PC_REC_XFER_ALIGN                  = 17
   284  	X_PC_SYMLINK_MAX                     = 18
   285  	X_PC_SYNC_IO                         = 55
   286  	X_PC_VDISABLE                        = 9
   287  	X_PDP_ENDIAN                         = 3412
   288  	X_PID_T_DECLARED                     = 0
   289  	X_POSIX2_BC_BASE_MAX                 = 99
   290  	X_POSIX2_BC_DIM_MAX                  = 2048
   291  	X_POSIX2_BC_SCALE_MAX                = 99
   292  	X_POSIX2_BC_STRING_MAX               = 1000
   293  	X_POSIX2_CHARCLASS_NAME_MAX          = 14
   294  	X_POSIX2_CHAR_TERM                   = 1
   295  	X_POSIX2_COLL_WEIGHTS_MAX            = 2
   296  	X_POSIX2_C_BIND                      = 200112
   297  	X_POSIX2_C_DEV                       = -1
   298  	X_POSIX2_EQUIV_CLASS_MAX             = 2
   299  	X_POSIX2_EXPR_NEST_MAX               = 32
   300  	X_POSIX2_FORT_DEV                    = -1
   301  	X_POSIX2_FORT_RUN                    = 200112
   302  	X_POSIX2_LINE_MAX                    = 2048
   303  	X_POSIX2_LOCALEDEF                   = -1
   304  	X_POSIX2_PBS                         = -1
   305  	X_POSIX2_PBS_ACCOUNTING              = -1
   306  	X_POSIX2_PBS_CHECKPOINT              = -1
   307  	X_POSIX2_PBS_LOCATE                  = -1
   308  	X_POSIX2_PBS_MESSAGE                 = -1
   309  	X_POSIX2_PBS_TRACK                   = -1
   310  	X_POSIX2_RE_DUP_MAX                  = 255
   311  	X_POSIX2_SW_DEV                      = -1
   312  	X_POSIX2_UPE                         = 200112
   313  	X_POSIX2_VERSION                     = 199212
   314  	X_POSIX_ADVISORY_INFO                = 200112
   315  	X_POSIX_AIO_LISTIO_MAX               = 2
   316  	X_POSIX_AIO_MAX                      = 1
   317  	X_POSIX_ARG_MAX                      = 4096
   318  	X_POSIX_ASYNCHRONOUS_IO              = 200112
   319  	X_POSIX_BARRIERS                     = 200112
   320  	X_POSIX_CHILD_MAX                    = 25
   321  	X_POSIX_CHOWN_RESTRICTED             = 1
   322  	X_POSIX_CLOCKRES_MIN                 = 20000000
   323  	X_POSIX_CLOCK_SELECTION              = -1
   324  	X_POSIX_CPUTIME                      = 200112
   325  	X_POSIX_DELAYTIMER_MAX               = 32
   326  	X_POSIX_FSYNC                        = 200112
   327  	X_POSIX_HOST_NAME_MAX                = 255
   328  	X_POSIX_IPV6                         = 0
   329  	X_POSIX_JOB_CONTROL                  = 1
   330  	X_POSIX_LINK_MAX                     = 8
   331  	X_POSIX_LOGIN_NAME_MAX               = 9
   332  	X_POSIX_MAPPED_FILES                 = 200112
   333  	X_POSIX_MAX_CANON                    = 255
   334  	X_POSIX_MAX_INPUT                    = 255
   335  	X_POSIX_MEMLOCK                      = -1
   336  	X_POSIX_MEMLOCK_RANGE                = 200112
   337  	X_POSIX_MEMORY_PROTECTION            = 200112
   338  	X_POSIX_MESSAGE_PASSING              = 200112
   339  	X_POSIX_MONOTONIC_CLOCK              = 200112
   340  	X_POSIX_MQ_OPEN_MAX                  = 8
   341  	X_POSIX_MQ_PRIO_MAX                  = 32
   342  	X_POSIX_NAME_MAX                     = 14
   343  	X_POSIX_NGROUPS_MAX                  = 8
   344  	X_POSIX_NO_TRUNC                     = 1
   345  	X_POSIX_OPEN_MAX                     = 20
   346  	X_POSIX_PATH_MAX                     = 256
   347  	X_POSIX_PIPE_BUF                     = 512
   348  	X_POSIX_PRIORITIZED_IO               = -1
   349  	X_POSIX_PRIORITY_SCHEDULING          = 0
   350  	X_POSIX_RAW_SOCKETS                  = 200112
   351  	X_POSIX_READER_WRITER_LOCKS          = 200112
   352  	X_POSIX_REALTIME_SIGNALS             = 200112
   353  	X_POSIX_REGEXP                       = 1
   354  	X_POSIX_RE_DUP_MAX                   = 255
   355  	X_POSIX_RTSIG_MAX                    = 8
   356  	X_POSIX_SEMAPHORES                   = 200112
   357  	X_POSIX_SEM_NSEMS_MAX                = 256
   358  	X_POSIX_SEM_VALUE_MAX                = 32767
   359  	X_POSIX_SHARED_MEMORY_OBJECTS        = 200112
   360  	X_POSIX_SHELL                        = 1
   361  	X_POSIX_SIGQUEUE_MAX                 = 32
   362  	X_POSIX_SPAWN                        = 200112
   363  	X_POSIX_SPIN_LOCKS                   = 200112
   364  	X_POSIX_SPORADIC_SERVER              = -1
   365  	X_POSIX_SSIZE_MAX                    = 32767
   366  	X_POSIX_SS_REPL_MAX                  = 4
   367  	X_POSIX_STREAM_MAX                   = 8
   368  	X_POSIX_SYMLINK_MAX                  = 255
   369  	X_POSIX_SYMLOOP_MAX                  = 8
   370  	X_POSIX_SYNCHRONIZED_IO              = -1
   371  	X_POSIX_THREADS                      = 200112
   372  	X_POSIX_THREAD_ATTR_STACKADDR        = 200112
   373  	X_POSIX_THREAD_ATTR_STACKSIZE        = 200112
   374  	X_POSIX_THREAD_CPUTIME               = 200112
   375  	X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
   376  	X_POSIX_THREAD_KEYS_MAX              = 128
   377  	X_POSIX_THREAD_PRIORITY_SCHEDULING   = 200112
   378  	X_POSIX_THREAD_PRIO_INHERIT          = 200112
   379  	X_POSIX_THREAD_PRIO_PROTECT          = 200112
   380  	X_POSIX_THREAD_PROCESS_SHARED        = 200112
   381  	X_POSIX_THREAD_SAFE_FUNCTIONS        = -1
   382  	X_POSIX_THREAD_SPORADIC_SERVER       = -1
   383  	X_POSIX_THREAD_THREADS_MAX           = 64
   384  	X_POSIX_TIMEOUTS                     = 200112
   385  	X_POSIX_TIMERS                       = 200112
   386  	X_POSIX_TIMER_MAX                    = 32
   387  	X_POSIX_TRACE                        = -1
   388  	X_POSIX_TRACE_EVENT_FILTER           = -1
   389  	X_POSIX_TRACE_EVENT_NAME_MAX         = 30
   390  	X_POSIX_TRACE_INHERIT                = -1
   391  	X_POSIX_TRACE_LOG                    = -1
   392  	X_POSIX_TRACE_NAME_MAX               = 8
   393  	X_POSIX_TRACE_SYS_MAX                = 8
   394  	X_POSIX_TRACE_USER_EVENT_MAX         = 32
   395  	X_POSIX_TTY_NAME_MAX                 = 9
   396  	X_POSIX_TYPED_MEMORY_OBJECTS         = -1
   397  	X_POSIX_TZNAME_MAX                   = 6
   398  	X_POSIX_VDISABLE                     = 0xff
   399  	X_POSIX_VERSION                      = 200112
   400  	X_PTHREAD_T_DECLARED                 = 0
   401  	X_PTRDIFF_T_DECLARED                 = 0
   402  	X_QUAD_HIGHWORD                      = 1
   403  	X_QUAD_LOWWORD                       = 0
   404  	X_RLIM_T_DECLARED                    = 0
   405  	X_RSIZE_T_DEFINED                    = 0
   406  	X_RUNE_T_DECLARED                    = 0
   407  	X_SC_2_CHAR_TERM                     = 20
   408  	X_SC_2_C_BIND                        = 18
   409  	X_SC_2_C_DEV                         = 19
   410  	X_SC_2_FORT_DEV                      = 21
   411  	X_SC_2_FORT_RUN                      = 22
   412  	X_SC_2_LOCALEDEF                     = 23
   413  	X_SC_2_PBS                           = 59
   414  	X_SC_2_PBS_ACCOUNTING                = 60
   415  	X_SC_2_PBS_CHECKPOINT                = 61
   416  	X_SC_2_PBS_LOCATE                    = 62
   417  	X_SC_2_PBS_MESSAGE                   = 63
   418  	X_SC_2_PBS_TRACK                     = 64
   419  	X_SC_2_SW_DEV                        = 24
   420  	X_SC_2_UPE                           = 25
   421  	X_SC_2_VERSION                       = 17
   422  	X_SC_ADVISORY_INFO                   = 65
   423  	X_SC_AIO_LISTIO_MAX                  = 42
   424  	X_SC_AIO_MAX                         = 43
   425  	X_SC_AIO_PRIO_DELTA_MAX              = 44
   426  	X_SC_ARG_MAX                         = 1
   427  	X_SC_ASYNCHRONOUS_IO                 = 28
   428  	X_SC_ATEXIT_MAX                      = 107
   429  	X_SC_BARRIERS                        = 66
   430  	X_SC_BC_BASE_MAX                     = 9
   431  	X_SC_BC_DIM_MAX                      = 10
   432  	X_SC_BC_SCALE_MAX                    = 11
   433  	X_SC_BC_STRING_MAX                   = 12
   434  	X_SC_CHILD_MAX                       = 2
   435  	X_SC_CLK_TCK                         = 3
   436  	X_SC_CLOCK_SELECTION                 = 67
   437  	X_SC_COLL_WEIGHTS_MAX                = 13
   438  	X_SC_CPUSET_SIZE                     = 122
   439  	X_SC_CPUTIME                         = 68
   440  	X_SC_DELAYTIMER_MAX                  = 45
   441  	X_SC_EXPR_NEST_MAX                   = 14
   442  	X_SC_FILE_LOCKING                    = 69
   443  	X_SC_FSYNC                           = 38
   444  	X_SC_GETGR_R_SIZE_MAX                = 70
   445  	X_SC_GETPW_R_SIZE_MAX                = 71
   446  	X_SC_HOST_NAME_MAX                   = 72
   447  	X_SC_IOV_MAX                         = 56
   448  	X_SC_IPV6                            = 118
   449  	X_SC_JOB_CONTROL                     = 6
   450  	X_SC_LINE_MAX                        = 15
   451  	X_SC_LOGIN_NAME_MAX                  = 73
   452  	X_SC_MAPPED_FILES                    = 29
   453  	X_SC_MEMLOCK                         = 30
   454  	X_SC_MEMLOCK_RANGE                   = 31
   455  	X_SC_MEMORY_PROTECTION               = 32
   456  	X_SC_MESSAGE_PASSING                 = 33
   457  	X_SC_MONOTONIC_CLOCK                 = 74
   458  	X_SC_MQ_OPEN_MAX                     = 46
   459  	X_SC_MQ_PRIO_MAX                     = 75
   460  	X_SC_NGROUPS_MAX                     = 4
   461  	X_SC_NPROCESSORS_CONF                = 57
   462  	X_SC_NPROCESSORS_ONLN                = 58
   463  	X_SC_OPEN_MAX                        = 5
   464  	X_SC_PAGESIZE                        = 47
   465  	X_SC_PAGE_SIZE                       = 47
   466  	X_SC_PHYS_PAGES                      = 121
   467  	X_SC_PRIORITIZED_IO                  = 34
   468  	X_SC_PRIORITY_SCHEDULING             = 35
   469  	X_SC_RAW_SOCKETS                     = 119
   470  	X_SC_READER_WRITER_LOCKS             = 76
   471  	X_SC_REALTIME_SIGNALS                = 36
   472  	X_SC_REGEXP                          = 77
   473  	X_SC_RE_DUP_MAX                      = 16
   474  	X_SC_RTSIG_MAX                       = 48
   475  	X_SC_SAVED_IDS                       = 7
   476  	X_SC_SEMAPHORES                      = 37
   477  	X_SC_SEM_NSEMS_MAX                   = 49
   478  	X_SC_SEM_VALUE_MAX                   = 50
   479  	X_SC_SHARED_MEMORY_OBJECTS           = 39
   480  	X_SC_SHELL                           = 78
   481  	X_SC_SIGQUEUE_MAX                    = 51
   482  	X_SC_SPAWN                           = 79
   483  	X_SC_SPIN_LOCKS                      = 80
   484  	X_SC_SPORADIC_SERVER                 = 81
   485  	X_SC_STREAM_MAX                      = 26
   486  	X_SC_SYMLOOP_MAX                     = 120
   487  	X_SC_SYNCHRONIZED_IO                 = 40
   488  	X_SC_THREADS                         = 96
   489  	X_SC_THREAD_ATTR_STACKADDR           = 82
   490  	X_SC_THREAD_ATTR_STACKSIZE           = 83
   491  	X_SC_THREAD_CPUTIME                  = 84
   492  	X_SC_THREAD_DESTRUCTOR_ITERATIONS    = 85
   493  	X_SC_THREAD_KEYS_MAX                 = 86
   494  	X_SC_THREAD_PRIORITY_SCHEDULING      = 89
   495  	X_SC_THREAD_PRIO_INHERIT             = 87
   496  	X_SC_THREAD_PRIO_PROTECT             = 88
   497  	X_SC_THREAD_PROCESS_SHARED           = 90
   498  	X_SC_THREAD_SAFE_FUNCTIONS           = 91
   499  	X_SC_THREAD_SPORADIC_SERVER          = 92
   500  	X_SC_THREAD_STACK_MIN                = 93
   501  	X_SC_THREAD_THREADS_MAX              = 94
   502  	X_SC_TIMEOUTS                        = 95
   503  	X_SC_TIMERS                          = 41
   504  	X_SC_TIMER_MAX                       = 52
   505  	X_SC_TRACE                           = 97
   506  	X_SC_TRACE_EVENT_FILTER              = 98
   507  	X_SC_TRACE_INHERIT                   = 99
   508  	X_SC_TRACE_LOG                       = 100
   509  	X_SC_TTY_NAME_MAX                    = 101
   510  	X_SC_TYPED_MEMORY_OBJECTS            = 102
   511  	X_SC_TZNAME_MAX                      = 27
   512  	X_SC_V6_ILP32_OFF32                  = 103
   513  	X_SC_V6_ILP32_OFFBIG                 = 104
   514  	X_SC_V6_LP64_OFF64                   = 105
   515  	X_SC_V6_LPBIG_OFFBIG                 = 106
   516  	X_SC_VERSION                         = 8
   517  	X_SC_XOPEN_CRYPT                     = 108
   518  	X_SC_XOPEN_ENH_I18N                  = 109
   519  	X_SC_XOPEN_LEGACY                    = 110
   520  	X_SC_XOPEN_REALTIME                  = 111
   521  	X_SC_XOPEN_REALTIME_THREADS          = 112
   522  	X_SC_XOPEN_SHM                       = 113
   523  	X_SC_XOPEN_STREAMS                   = 114
   524  	X_SC_XOPEN_UNIX                      = 115
   525  	X_SC_XOPEN_VERSION                   = 116
   526  	X_SC_XOPEN_XCU_VERSION               = 117
   527  	X_SELECT_DECLARED                    = 0
   528  	X_SIGSET_T_DECLARED                  = 0
   529  	X_SIG_MAXSIG                         = 128
   530  	X_SIG_WORDS                          = 4
   531  	X_SIZE_T_DECLARED                    = 0
   532  	X_SSIZE_T_DECLARED                   = 0
   533  	X_STDDEF_H_                          = 0
   534  	X_STDLIB_H_                          = 0
   535  	X_STRINGS_H_                         = 0
   536  	X_STRING_H_                          = 0
   537  	X_SUSECONDS_T_DECLARED               = 0
   538  	X_SWAB_DECLARED                      = 0
   539  	X_SYS_CDEFS_H_                       = 0
   540  	X_SYS_LIMITS_H_                      = 0
   541  	X_SYS_SELECT_H_                      = 0
   542  	X_SYS_SYSLIMITS_H_                   = 0
   543  	X_SYS_TIMESPEC_H_                    = 0
   544  	X_SYS_TYPES_H_                       = 0
   545  	X_SYS_UNISTD_H_                      = 0
   546  	X_SYS__ENDIAN_H_                     = 0
   547  	X_SYS__PTHREADTYPES_H_               = 0
   548  	X_SYS__SIGSET_H_                     = 0
   549  	X_SYS__STDARG_H_                     = 0
   550  	X_SYS__STDINT_H_                     = 0
   551  	X_SYS__TIMESPEC_H_                   = 0
   552  	X_SYS__TIMEVAL_H_                    = 0
   553  	X_SYS__TYPES_H_                      = 0
   554  	X_TIMER_T_DECLARED                   = 0
   555  	X_TIME_T_DECLARED                    = 0
   556  	X_TRUNCATE_DECLARED                  = 0
   557  	X_UID_T_DECLARED                     = 0
   558  	X_UINT16_T_DECLARED                  = 0
   559  	X_UINT32_T_DECLARED                  = 0
   560  	X_UINT64_T_DECLARED                  = 0
   561  	X_UINT8_T_DECLARED                   = 0
   562  	X_UINTMAX_T_DECLARED                 = 0
   563  	X_UINTPTR_T_DECLARED                 = 0
   564  	X_UNISTD_H_                          = 0
   565  	X_USECONDS_T_DECLARED                = 0
   566  	X_V6_ILP32_OFF32                     = -1
   567  	X_V6_ILP32_OFFBIG                    = 0
   568  	X_V6_LP64_OFF64                      = 0
   569  	X_V6_LPBIG_OFFBIG                    = -1
   570  	X_VA_LIST_DECLARED                   = 0
   571  	X_WCHAR_T_DECLARED                   = 0
   572  	X_XLOCALE_STRING1_H                  = 0
   573  	X_XLOCALE_STRINGS1_H                 = 0
   574  	X_XOPEN_CRYPT                        = -1
   575  	X_XOPEN_ENH_I18N                     = -1
   576  	X_XOPEN_IOV_MAX                      = 16
   577  	X_XOPEN_LEGACY                       = -1
   578  	X_XOPEN_NAME_MAX                     = 255
   579  	X_XOPEN_PATH_MAX                     = 1024
   580  	X_XOPEN_REALTIME                     = -1
   581  	X_XOPEN_REALTIME_THREADS             = -1
   582  	X_XOPEN_SHM                          = 1
   583  	X_XOPEN_STREAMS                      = -1
   584  	X_XOPEN_UNIX                         = -1
   585  	I386                                 = 1
   586  	Unix                                 = 1
   587  	Z_const                              = 0
   588  	BYFOUR                               = 0
   589  	GF2_DIM                              = 32
   590  	TBLS                                 = 8
   591  	BL_CODES                             = 19
   592  	BUSY_STATE                           = 113
   593  	Buf_size                             = 16
   594  	COMMENT_STATE                        = 91
   595  	DEFLATE_H                            = 0
   596  	D_CODES                              = 30
   597  	EXTRA_STATE                          = 69
   598  	FINISH_STATE                         = 666
   599  	GZIP                                 = 0
   600  	GZIP_STATE                           = 57
   601  	HCRC_STATE                           = 103
   602  	HEAP_SIZE                            = 573
   603  	INIT_STATE                           = 42
   604  	LENGTH_CODES                         = 29
   605  	LITERALS                             = 256
   606  	L_CODES                              = 286
   607  	MAX_BITS                             = 15
   608  	MAX_STORED                           = 65535
   609  	MIN_LOOKAHEAD                        = 262
   610  	NAME_STATE                           = 73
   611  	NIL                                  = 0
   612  	TOO_FAR                              = 4096
   613  	WIN_INIT                             = 258
   614  	AT_EACCESS                           = 0x0100
   615  	AT_EMPTY_PATH                        = 0x4000
   616  	AT_FDCWD                             = -100
   617  	AT_REMOVEDIR                         = 0x0800
   618  	AT_RESOLVE_BENEATH                   = 0x2000
   619  	AT_SYMLINK_FOLLOW                    = 0x0400
   620  	AT_SYMLINK_NOFOLLOW                  = 0x0200
   621  	BUFSIZ                               = 1024
   622  	COPY1                                = 1
   623  	E2BIG                                = 7
   624  	EACCES                               = 13
   625  	EAGAIN                               = 35
   626  	EBADF                                = 9
   627  	EBADMSG                              = 89
   628  	EBUSY                                = 16
   629  	ECHILD                               = 10
   630  	EDEADLK                              = 11
   631  	EDOM                                 = 33
   632  	EEXIST                               = 17
   633  	EFAULT                               = 14
   634  	EFBIG                                = 27
   635  	EINTR                                = 4
   636  	EINVAL                               = 22
   637  	EIO                                  = 5
   638  	EISDIR                               = 21
   639  	EMFILE                               = 24
   640  	EMLINK                               = 31
   641  	EMULTIHOP                            = 90
   642  	ENAMETOOLONG                         = 63
   643  	ENFILE                               = 23
   644  	ENODEV                               = 19
   645  	ENOENT                               = 2
   646  	ENOEXEC                              = 8
   647  	ENOLCK                               = 77
   648  	ENOLINK                              = 91
   649  	ENOMEM                               = 12
   650  	ENOSPC                               = 28
   651  	ENOSYS                               = 78
   652  	ENOTDIR                              = 20
   653  	ENOTEMPTY                            = 66
   654  	ENOTTY                               = 25
   655  	ENXIO                                = 6
   656  	EOF                                  = -1
   657  	EPERM                                = 1
   658  	EPIPE                                = 32
   659  	EPROTO                               = 92
   660  	ERANGE                               = 34
   661  	EROFS                                = 30
   662  	ESPIPE                               = 29
   663  	ESRCH                                = 3
   664  	EXDEV                                = 18
   665  	FAPPEND                              = 8
   666  	FASYNC                               = 64
   667  	FDSYNC                               = 16777216
   668  	FD_CLOEXEC                           = 1
   669  	FD_NONE                              = -200
   670  	FFSYNC                               = 128
   671  	FILENAME_MAX                         = 1024
   672  	FNDELAY                              = 4
   673  	FNONBLOCK                            = 4
   674  	FOPEN_MAX                            = 20
   675  	FRDAHEAD                             = 512
   676  	FREAD                                = 0x0001
   677  	FWRITE                               = 0x0002
   678  	F_ADD_SEALS                          = 19
   679  	F_CANCEL                             = 5
   680  	F_DUP2FD                             = 10
   681  	F_DUP2FD_CLOEXEC                     = 18
   682  	F_DUPFD                              = 0
   683  	F_DUPFD_CLOEXEC                      = 17
   684  	F_GETFD                              = 1
   685  	F_GETFL                              = 3
   686  	F_GETLK                              = 11
   687  	F_GETOWN                             = 5
   688  	F_GET_SEALS                          = 20
   689  	F_ISUNIONSTACK                       = 21
   690  	F_KINFO                              = 22
   691  	F_OGETLK                             = 7
   692  	F_OSETLK                             = 8
   693  	F_OSETLKW                            = 9
   694  	F_RDAHEAD                            = 16
   695  	F_RDLCK                              = 1
   696  	F_READAHEAD                          = 15
   697  	F_SEAL_GROW                          = 0x0004
   698  	F_SEAL_SEAL                          = 0x0001
   699  	F_SEAL_SHRINK                        = 0x0002
   700  	F_SEAL_WRITE                         = 0x0008
   701  	F_SETFD                              = 2
   702  	F_SETFL                              = 4
   703  	F_SETLK                              = 12
   704  	F_SETLKW                             = 13
   705  	F_SETLK_REMOTE                       = 14
   706  	F_SETOWN                             = 6
   707  	F_UNLCK                              = 2
   708  	F_UNLCKSYS                           = 4
   709  	F_WRLCK                              = 3
   710  	GZBUFSIZE                            = 8192
   711  	GZ_APPEND                            = 1
   712  	GZ_NONE                              = 0
   713  	GZ_READ                              = 7247
   714  	GZ_WRITE                             = 31153
   715  	HAVE_VSNPRINTF                       = 0
   716  	LOCK_EX                              = 0x02
   717  	LOCK_NB                              = 0x04
   718  	LOCK_SH                              = 0x01
   719  	LOCK_UN                              = 0x08
   720  	LOOK                                 = 0
   721  	L_ctermid                            = 1024
   722  	L_cuserid                            = 17
   723  	L_tmpnam                             = 1024
   724  	O_ACCMODE                            = 0x0003
   725  	O_APPEND                             = 0x0008
   726  	O_ASYNC                              = 0x0040
   727  	O_CLOEXEC                            = 0x00100000
   728  	O_CREAT                              = 0x0200
   729  	O_DIRECT                             = 0x00010000
   730  	O_DIRECTORY                          = 0x00020000
   731  	O_DSYNC                              = 0x01000000
   732  	O_EMPTY_PATH                         = 0x02000000
   733  	O_EXCL                               = 0x0800
   734  	O_EXEC                               = 0x00040000
   735  	O_EXLOCK                             = 0x0020
   736  	O_FSYNC                              = 0x0080
   737  	O_NDELAY                             = 4
   738  	O_NOCTTY                             = 0x8000
   739  	O_NOFOLLOW                           = 0x0100
   740  	O_NONBLOCK                           = 0x0004
   741  	O_PATH                               = 0x00400000
   742  	O_RDONLY                             = 0x0000
   743  	O_RDWR                               = 0x0002
   744  	O_RESOLVE_BENEATH                    = 0x00800000
   745  	O_SEARCH                             = 262144
   746  	O_SHLOCK                             = 0x0010
   747  	O_SYNC                               = 0x0080
   748  	O_TRUNC                              = 0x0400
   749  	O_TTY_INIT                           = 0x00080000
   750  	O_VERIFY                             = 0x00200000
   751  	O_WRONLY                             = 0x0001
   752  	POSIX_FADV_DONTNEED                  = 4
   753  	POSIX_FADV_NOREUSE                   = 5
   754  	POSIX_FADV_NORMAL                    = 0
   755  	POSIX_FADV_RANDOM                    = 1
   756  	POSIX_FADV_SEQUENTIAL                = 2
   757  	POSIX_FADV_WILLNEED                  = 3
   758  	P_tmpdir                             = "/tmp/"
   759  	TMP_MAX                              = 308915776
   760  	X_FSTDIO                             = 0
   761  	X_IOFBF                              = 0
   762  	X_IOLBF                              = 1
   763  	X_IONBF                              = 2
   764  	X_LARGEFILE_SOURCE                   = 1
   765  	X_POSIX_SOURCE                       = 0
   766  	X_STDFILE_DECLARED                   = 0
   767  	X_STDIO_H_                           = 0
   768  	X_STDSTREAM_DECLARED                 = 0
   769  	X_SYS_ERRNO_H_                       = 0
   770  	X_SYS_FCNTL_H_                       = 0
   771  	ENOUGH                               = 1444
   772  	ENOUGH_DISTS                         = 592
   773  	ENOUGH_LENS                          = 852
   774  	GUNZIP                               = 0
   775  	MAXBITS                              = 15
   776  	DIST_CODE_LEN                        = 512
   777  	END_BLOCK                            = 256
   778  	MAX_BL_BITS                          = 7
   779  	REPZ_11_138                          = 18
   780  	REPZ_3_10                            = 17
   781  	REP_3_6                              = 16
   782  	SMALLEST                             = 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 = int32 /* <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  // This file is in the public domain.
  1302  // $FreeBSD$
  1303  
  1304  // -
  1305  // SPDX-License-Identifier: BSD-4-Clause
  1306  //
  1307  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  1308  // Copyright (c) 1990, 1993
  1309  //	The Regents of the University of California.  All rights reserved.
  1310  //
  1311  // Redistribution and use in source and binary forms, with or without
  1312  // modification, are permitted provided that the following conditions
  1313  // are met:
  1314  // 1. Redistributions of source code must retain the above copyright
  1315  //    notice, this list of conditions and the following disclaimer.
  1316  // 2. Redistributions in binary form must reproduce the above copyright
  1317  //    notice, this list of conditions and the following disclaimer in the
  1318  //    documentation and/or other materials provided with the distribution.
  1319  // 3. All advertising materials mentioning features or use of this software
  1320  //    must display the following acknowledgement:
  1321  //	This product includes software developed by the University of
  1322  //	California, Berkeley and its contributors.
  1323  // 4. Neither the name of the University nor the names of its contributors
  1324  //    may be used to endorse or promote products derived from this software
  1325  //    without specific prior written permission.
  1326  //
  1327  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1328  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1329  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1330  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1331  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1332  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1333  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1334  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1335  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1336  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1337  // SUCH DAMAGE.
  1338  //
  1339  //	From: @(#)ansi.h	8.2 (Berkeley) 1/4/94
  1340  //	From: @(#)types.h	8.3 (Berkeley) 1/5/94
  1341  // $FreeBSD$
  1342  
  1343  // -
  1344  // This file is in the public domain.
  1345  // $FreeBSD$
  1346  
  1347  // -
  1348  // SPDX-License-Identifier: BSD-3-Clause
  1349  //
  1350  // Copyright (c) 1988, 1993
  1351  //	The Regents of the University of California.  All rights reserved.
  1352  //
  1353  // Redistribution and use in source and binary forms, with or without
  1354  // modification, are permitted provided that the following conditions
  1355  // are met:
  1356  // 1. Redistributions of source code must retain the above copyright
  1357  //    notice, this list of conditions and the following disclaimer.
  1358  // 2. Redistributions in binary form must reproduce the above copyright
  1359  //    notice, this list of conditions and the following disclaimer in the
  1360  //    documentation and/or other materials provided with the distribution.
  1361  // 3. Neither the name of the University nor the names of its contributors
  1362  //    may be used to endorse or promote products derived from this software
  1363  //    without specific prior written permission.
  1364  //
  1365  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1366  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1367  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1368  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1369  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1370  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1371  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1372  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1373  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1374  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1375  // SUCH DAMAGE.
  1376  //
  1377  //	@(#)limits.h	8.3 (Berkeley) 1/4/94
  1378  // $FreeBSD$
  1379  
  1380  // According to ANSI (section 2.2.4.2), the values below must be usable by
  1381  // #if preprocessing directives.  Additionally, the expression must have the
  1382  // same type as would an expression that is an object of the corresponding
  1383  // type converted according to the integral promotions.  The subtraction for
  1384  // INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an
  1385  // unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
  1386  
  1387  // max value for an unsigned long long
  1388  
  1389  // Minimum signal stack size.
  1390  
  1391  // Basic types upon which most other types are built.
  1392  type X__int8_t = int8     /* _types.h:55:22 */
  1393  type X__uint8_t = uint8   /* _types.h:56:24 */
  1394  type X__int16_t = int16   /* _types.h:57:17 */
  1395  type X__uint16_t = uint16 /* _types.h:58:25 */
  1396  type X__int32_t = int32   /* _types.h:59:15 */
  1397  type X__uint32_t = uint32 /* _types.h:60:23 */
  1398  
  1399  type X__int64_t = int64 /* _types.h:66:20 */
  1400  
  1401  type X__uint64_t = uint64 /* _types.h:68:28 */
  1402  
  1403  // Standard type definitions.
  1404  type X__clock_t = uint32             /* _types.h:84:23 */
  1405  type X__critical_t = X__int32_t      /* _types.h:85:19 */
  1406  type X__double_t = float64           /* _types.h:87:21 */
  1407  type X__float_t = float64            /* _types.h:88:21 */
  1408  type X__intfptr_t = X__int32_t       /* _types.h:90:19 */
  1409  type X__intptr_t = X__int32_t        /* _types.h:91:19 */
  1410  type X__intmax_t = X__int64_t        /* _types.h:93:19 */
  1411  type X__int_fast8_t = X__int32_t     /* _types.h:94:19 */
  1412  type X__int_fast16_t = X__int32_t    /* _types.h:95:19 */
  1413  type X__int_fast32_t = X__int32_t    /* _types.h:96:19 */
  1414  type X__int_fast64_t = X__int64_t    /* _types.h:97:19 */
  1415  type X__int_least8_t = X__int8_t     /* _types.h:98:18 */
  1416  type X__int_least16_t = X__int16_t   /* _types.h:99:19 */
  1417  type X__int_least32_t = X__int32_t   /* _types.h:100:19 */
  1418  type X__int_least64_t = X__int64_t   /* _types.h:101:19 */
  1419  type X__ptrdiff_t = X__int32_t       /* _types.h:112:19 */
  1420  type X__register_t = X__int32_t      /* _types.h:113:19 */
  1421  type X__segsz_t = X__int32_t         /* _types.h:114:19 */
  1422  type X__size_t = X__uint32_t         /* _types.h:115:20 */
  1423  type X__ssize_t = X__int32_t         /* _types.h:116:19 */
  1424  type X__time_t = X__int32_t          /* _types.h:117:19 */
  1425  type X__uintfptr_t = X__uint32_t     /* _types.h:118:20 */
  1426  type X__uintptr_t = X__uint32_t      /* _types.h:119:20 */
  1427  type X__uintmax_t = X__uint64_t      /* _types.h:121:20 */
  1428  type X__uint_fast8_t = X__uint32_t   /* _types.h:122:20 */
  1429  type X__uint_fast16_t = X__uint32_t  /* _types.h:123:20 */
  1430  type X__uint_fast32_t = X__uint32_t  /* _types.h:124:20 */
  1431  type X__uint_fast64_t = X__uint64_t  /* _types.h:125:20 */
  1432  type X__uint_least8_t = X__uint8_t   /* _types.h:126:19 */
  1433  type X__uint_least16_t = X__uint16_t /* _types.h:127:20 */
  1434  type X__uint_least32_t = X__uint32_t /* _types.h:128:20 */
  1435  type X__uint_least64_t = X__uint64_t /* _types.h:129:20 */
  1436  type X__u_register_t = X__uint32_t   /* _types.h:136:20 */
  1437  type X__vm_offset_t = X__uint32_t    /* _types.h:137:20 */
  1438  type X__vm_paddr_t = X__uint64_t     /* _types.h:138:20 */
  1439  type X__vm_size_t = X__uint32_t      /* _types.h:139:20 */
  1440  type X___wchar_t = int32             /* _types.h:141:14 */
  1441  
  1442  // Standard type definitions.
  1443  type X__blksize_t = X__int32_t   /* _types.h:40:19 */ // file block size
  1444  type X__blkcnt_t = X__int64_t    /* _types.h:41:19 */ // file block count
  1445  type X__clockid_t = X__int32_t   /* _types.h:42:19 */ // clock_gettime()...
  1446  type X__fflags_t = X__uint32_t   /* _types.h:43:20 */ // file flags
  1447  type X__fsblkcnt_t = X__uint64_t /* _types.h:44:20 */
  1448  type X__fsfilcnt_t = X__uint64_t /* _types.h:45:20 */
  1449  type X__gid_t = X__uint32_t      /* _types.h:46:20 */
  1450  type X__id_t = X__int64_t        /* _types.h:47:19 */ // can hold a gid_t, pid_t, or uid_t
  1451  type X__ino_t = X__uint64_t      /* _types.h:48:20 */ // inode number
  1452  type X__key_t = int32            /* _types.h:49:15 */ // IPC key (for Sys V IPC)
  1453  type X__lwpid_t = X__int32_t     /* _types.h:50:19 */ // Thread ID (a.k.a. LWP)
  1454  type X__mode_t = X__uint16_t     /* _types.h:51:20 */ // permissions
  1455  type X__accmode_t = int32        /* _types.h:52:14 */ // access permissions
  1456  type X__nl_item = int32          /* _types.h:53:14 */
  1457  type X__nlink_t = X__uint64_t    /* _types.h:54:20 */ // link count
  1458  type X__off_t = X__int64_t       /* _types.h:55:19 */ // file offset
  1459  type X__off64_t = X__int64_t     /* _types.h:56:19 */ // file offset (alias)
  1460  type X__pid_t = X__int32_t       /* _types.h:57:19 */ // process [group]
  1461  type X__rlim_t = X__int64_t      /* _types.h:58:19 */ // resource limit - intentionally
  1462  // signed, because of legacy code
  1463  // that uses -1 for RLIM_INFINITY
  1464  type X__sa_family_t = X__uint8_t /* _types.h:61:19 */
  1465  type X__socklen_t = X__uint32_t  /* _types.h:62:20 */
  1466  type X__suseconds_t = int32      /* _types.h:63:15 */ // microseconds (signed)
  1467  type X__timer_t = uintptr        /* _types.h:64:24 */ // timer_gettime()...
  1468  type X__mqd_t = uintptr          /* _types.h:65:21 */ // mq_open()...
  1469  type X__uid_t = X__uint32_t      /* _types.h:66:20 */
  1470  type X__useconds_t = uint32      /* _types.h:67:22 */ // microseconds (unsigned)
  1471  type X__cpuwhich_t = int32       /* _types.h:68:14 */ // which parameter for cpuset.
  1472  type X__cpulevel_t = int32       /* _types.h:69:14 */ // level parameter for cpuset.
  1473  type X__cpusetid_t = int32       /* _types.h:70:14 */ // cpuset identifier.
  1474  type X__daddr_t = X__int64_t     /* _types.h:71:19 */ // bwrite(3), FIOBMAP2, etc
  1475  
  1476  // Unusual type definitions.
  1477  // rune_t is declared to be an ``int'' instead of the more natural
  1478  // ``unsigned long'' or ``long''.  Two things are happening here.  It is not
  1479  // unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
  1480  // it looks like 10646 will be a 31 bit standard.  This means that if your
  1481  // ints cannot hold 32 bits, you will be in trouble.  The reason an int was
  1482  // chosen over a long is that the is*() and to*() routines take ints (says
  1483  // ANSI C), but they use __ct_rune_t instead of int.
  1484  //
  1485  // NOTE: rune_t is not covered by ANSI nor other standards, and should not
  1486  // be instantiated outside of lib/libc/locale.  Use wchar_t.  wint_t and
  1487  // rune_t must be the same type.  Also, wint_t should be able to hold all
  1488  // members of the largest character set plus one extra value (WEOF), and
  1489  // must be at least 16 bits.
  1490  type X__ct_rune_t = int32     /* _types.h:91:14 */ // arg type for ctype funcs
  1491  type X__rune_t = X__ct_rune_t /* _types.h:92:21 */ // rune_t (see above)
  1492  type X__wint_t = X__ct_rune_t /* _types.h:93:21 */ // wint_t (see above)
  1493  
  1494  // Clang already provides these types as built-ins, but only in C++ mode.
  1495  type X__char16_t = X__uint_least16_t /* _types.h:97:26 */
  1496  type X__char32_t = X__uint_least32_t /* _types.h:98:26 */
  1497  // In C++11, char16_t and char32_t are built-in types.
  1498  
  1499  type X__max_align_t = struct {
  1500  	F__max_align1 int64
  1501  	F__max_align2 float64
  1502  } /* _types.h:111:3 */
  1503  
  1504  type X__dev_t = X__uint64_t /* _types.h:113:20 */ // device number
  1505  
  1506  type X__fixpt_t = X__uint32_t /* _types.h:115:20 */ // fixed point number
  1507  
  1508  // mbstate_t is an opaque object to keep conversion state during multibyte
  1509  // stream conversions.
  1510  type X__mbstate_t = struct {
  1511  	F__ccgo_pad1 [0]uint32
  1512  	F__mbstate8  [128]int8
  1513  } /* _types.h:124:3 */
  1514  
  1515  type X__rman_res_t = X__uintmax_t /* _types.h:126:25 */
  1516  
  1517  // Types for varargs. These are all provided by builtin types these
  1518  // days, so centralize their definition.
  1519  type X__va_list = X__builtin_va_list /* _types.h:133:27 */ // internally known to gcc
  1520  type X__gnuc_va_list = X__va_list    /* _types.h:140:20 */
  1521  
  1522  type Rune_t = X__rune_t /* stddef.h:50:18 */
  1523  
  1524  type Max_align_t = X__max_align_t /* stddef.h:69:23 */
  1525  
  1526  // ISO/IEC 9899:2011 K.3.3.2
  1527  type Rsize_t = Size_t /* stddef.h:81:16 */
  1528  
  1529  type Z_size_t = Size_t /* zconf.h:248:21 */
  1530  
  1531  // Maximum value for memLevel in deflateInit2
  1532  
  1533  // Maximum value for windowBits in deflateInit2 and inflateInit2.
  1534  // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
  1535  // created by gzip. (Files created by minigzip can still be extracted by
  1536  // gzip.)
  1537  
  1538  // The memory requirements for deflate are (in bytes):
  1539  //             (1 << (windowBits+2)) +  (1 << (memLevel+9))
  1540  //  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
  1541  //  plus a few kilobytes for small objects. For example, if you want to reduce
  1542  //  the default memory requirements from 256K to 128K, compile with
  1543  //      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
  1544  //  Of course this will generally degrade compression (there's no free lunch).
  1545  //
  1546  //    The memory requirements for inflate are (in bytes) 1 << windowBits
  1547  //  that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
  1548  //  for small objects.
  1549  
  1550  // Type declarations
  1551  
  1552  // The following definitions for FAR are needed only for MSDOS mixed
  1553  // model programming (small or medium model with some far allocations).
  1554  // This was tested only with MSC; for other MSDOS compilers you may have
  1555  // to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
  1556  // just define FAR to be empty.
  1557  
  1558  type Byte = uint8   /* zconf.h:391:24 */ // 8 bits
  1559  type UInt = uint32  /* zconf.h:393:24 */ // 16 bits or more
  1560  type ULong = uint32 /* zconf.h:394:24 */ // 32 bits or more
  1561  
  1562  type Bytef = Byte   /* zconf.h:400:22 */
  1563  type Charf = int8   /* zconf.h:402:19 */
  1564  type Intf = int32   /* zconf.h:403:19 */
  1565  type UIntf = UInt   /* zconf.h:404:19 */
  1566  type ULongf = ULong /* zconf.h:405:19 */
  1567  
  1568  type Voidpc = uintptr /* zconf.h:408:23 */
  1569  type Voidpf = uintptr /* zconf.h:409:23 */
  1570  type Voidp = uintptr  /* zconf.h:410:23 */
  1571  
  1572  // -
  1573  // SPDX-License-Identifier: BSD-3-Clause
  1574  //
  1575  // Copyright (c) 1988, 1993
  1576  //	The Regents of the University of California.  All rights reserved.
  1577  //
  1578  // Redistribution and use in source and binary forms, with or without
  1579  // modification, are permitted provided that the following conditions
  1580  // are met:
  1581  // 1. Redistributions of source code must retain the above copyright
  1582  //    notice, this list of conditions and the following disclaimer.
  1583  // 2. Redistributions in binary form must reproduce the above copyright
  1584  //    notice, this list of conditions and the following disclaimer in the
  1585  //    documentation and/or other materials provided with the distribution.
  1586  // 3. Neither the name of the University nor the names of its contributors
  1587  //    may be used to endorse or promote products derived from this software
  1588  //    without specific prior written permission.
  1589  //
  1590  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1591  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1592  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1593  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1594  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1595  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1596  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1597  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1598  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1599  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1600  // SUCH DAMAGE.
  1601  //
  1602  //	@(#)limits.h	8.2 (Berkeley) 1/4/94
  1603  // $FreeBSD$
  1604  
  1605  // -
  1606  // SPDX-License-Identifier: BSD-3-Clause
  1607  //
  1608  // Copyright (c) 1991, 1993
  1609  //	The Regents of the University of California.  All rights reserved.
  1610  //
  1611  // This code is derived from software contributed to Berkeley by
  1612  // Berkeley Software Design, Inc.
  1613  //
  1614  // Redistribution and use in source and binary forms, with or without
  1615  // modification, are permitted provided that the following conditions
  1616  // are met:
  1617  // 1. Redistributions of source code must retain the above copyright
  1618  //    notice, this list of conditions and the following disclaimer.
  1619  // 2. Redistributions in binary form must reproduce the above copyright
  1620  //    notice, this list of conditions and the following disclaimer in the
  1621  //    documentation and/or other materials provided with the distribution.
  1622  // 3. Neither the name of the University nor the names of its contributors
  1623  //    may be used to endorse or promote products derived from this software
  1624  //    without specific prior written permission.
  1625  //
  1626  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1627  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1628  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1629  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1630  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1631  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1632  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1633  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1634  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1635  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1636  // SUCH DAMAGE.
  1637  //
  1638  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1639  // $FreeBSD$
  1640  
  1641  // -
  1642  // SPDX-License-Identifier: BSD-3-Clause
  1643  //
  1644  // Copyright (c) 1988, 1993
  1645  //	The Regents of the University of California.  All rights reserved.
  1646  //
  1647  // Redistribution and use in source and binary forms, with or without
  1648  // modification, are permitted provided that the following conditions
  1649  // are met:
  1650  // 1. Redistributions of source code must retain the above copyright
  1651  //    notice, this list of conditions and the following disclaimer.
  1652  // 2. Redistributions in binary form must reproduce the above copyright
  1653  //    notice, this list of conditions and the following disclaimer in the
  1654  //    documentation and/or other materials provided with the distribution.
  1655  // 3. Neither the name of the University nor the names of its contributors
  1656  //    may be used to endorse or promote products derived from this software
  1657  //    without specific prior written permission.
  1658  //
  1659  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1660  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1661  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1662  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1663  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1664  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1665  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1666  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1667  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1668  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1669  // SUCH DAMAGE.
  1670  //
  1671  // $FreeBSD$
  1672  
  1673  // -
  1674  // SPDX-License-Identifier: BSD-3-Clause
  1675  //
  1676  // Copyright (c) 1991, 1993
  1677  //	The Regents of the University of California.  All rights reserved.
  1678  //
  1679  // This code is derived from software contributed to Berkeley by
  1680  // Berkeley Software Design, Inc.
  1681  //
  1682  // Redistribution and use in source and binary forms, with or without
  1683  // modification, are permitted provided that the following conditions
  1684  // are met:
  1685  // 1. Redistributions of source code must retain the above copyright
  1686  //    notice, this list of conditions and the following disclaimer.
  1687  // 2. Redistributions in binary form must reproduce the above copyright
  1688  //    notice, this list of conditions and the following disclaimer in the
  1689  //    documentation and/or other materials provided with the distribution.
  1690  // 3. Neither the name of the University nor the names of its contributors
  1691  //    may be used to endorse or promote products derived from this software
  1692  //    without specific prior written permission.
  1693  //
  1694  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1695  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1696  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1697  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1698  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1699  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1700  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1701  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1702  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1703  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1704  // SUCH DAMAGE.
  1705  //
  1706  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  1707  // $FreeBSD$
  1708  
  1709  // -
  1710  // This file is in the public domain.
  1711  // $FreeBSD$
  1712  
  1713  // -
  1714  // SPDX-License-Identifier: BSD-3-Clause
  1715  //
  1716  // Copyright (c) 1988, 1993
  1717  //	The Regents of the University of California.  All rights reserved.
  1718  //
  1719  // Redistribution and use in source and binary forms, with or without
  1720  // modification, are permitted provided that the following conditions
  1721  // are met:
  1722  // 1. Redistributions of source code must retain the above copyright
  1723  //    notice, this list of conditions and the following disclaimer.
  1724  // 2. Redistributions in binary form must reproduce the above copyright
  1725  //    notice, this list of conditions and the following disclaimer in the
  1726  //    documentation and/or other materials provided with the distribution.
  1727  // 3. Neither the name of the University nor the names of its contributors
  1728  //    may be used to endorse or promote products derived from this software
  1729  //    without specific prior written permission.
  1730  //
  1731  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1732  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1733  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1734  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1735  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1736  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1737  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1738  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1739  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1740  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1741  // SUCH DAMAGE.
  1742  //
  1743  //	@(#)limits.h	8.3 (Berkeley) 1/4/94
  1744  // $FreeBSD$
  1745  
  1746  // -
  1747  // SPDX-License-Identifier: BSD-3-Clause
  1748  //
  1749  // Copyright (c) 1988, 1993
  1750  //	The Regents of the University of California.  All rights reserved.
  1751  //
  1752  // Redistribution and use in source and binary forms, with or without
  1753  // modification, are permitted provided that the following conditions
  1754  // are met:
  1755  // 1. Redistributions of source code must retain the above copyright
  1756  //    notice, this list of conditions and the following disclaimer.
  1757  // 2. Redistributions in binary form must reproduce the above copyright
  1758  //    notice, this list of conditions and the following disclaimer in the
  1759  //    documentation and/or other materials provided with the distribution.
  1760  // 3. Neither the name of the University nor the names of its contributors
  1761  //    may be used to endorse or promote products derived from this software
  1762  //    without specific prior written permission.
  1763  //
  1764  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1765  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1766  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1767  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1768  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1769  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1770  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1771  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1772  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1773  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1774  // SUCH DAMAGE.
  1775  //
  1776  //	@(#)syslimits.h	8.1 (Berkeley) 6/2/93
  1777  // $FreeBSD$
  1778  
  1779  // Do not add any new variables here.  (See the comment at the end of
  1780  // the file for why.)
  1781  
  1782  // We leave the following values undefined to force applications to either
  1783  // assume conservative values or call sysconf() to get the current value.
  1784  //
  1785  // HOST_NAME_MAX
  1786  //
  1787  // (We should do this for most of the values currently defined here,
  1788  // but many programs are not prepared to deal with this yet.)
  1789  
  1790  type Z_crc_t = uint32 /* zconf.h:429:17 */
  1791  type Pthread_once = struct {
  1792  	Fstate int32
  1793  	Fmutex Pthread_mutex_t
  1794  } /* _pthreadtypes.h:52:1 */
  1795  
  1796  // Primitive system data type definitions required by P1003.1c.
  1797  //
  1798  // Note that P1003.1c specifies that there are no defined comparison
  1799  // or assignment operators for the types pthread_attr_t, pthread_cond_t,
  1800  // pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t.
  1801  type Pthread_t = uintptr             /* _pthreadtypes.h:67:26 */
  1802  type Pthread_attr_t = uintptr        /* _pthreadtypes.h:70:30 */
  1803  type Pthread_mutex_t = uintptr       /* _pthreadtypes.h:71:31 */
  1804  type Pthread_mutexattr_t = uintptr   /* _pthreadtypes.h:72:35 */
  1805  type Pthread_cond_t = uintptr        /* _pthreadtypes.h:73:30 */
  1806  type Pthread_condattr_t = uintptr    /* _pthreadtypes.h:74:34 */
  1807  type Pthread_key_t = int32           /* _pthreadtypes.h:75:20 */
  1808  type Pthread_once_t = Pthread_once   /* _pthreadtypes.h:76:30 */
  1809  type Pthread_rwlock_t = uintptr      /* _pthreadtypes.h:77:32 */
  1810  type Pthread_rwlockattr_t = uintptr  /* _pthreadtypes.h:78:35 */
  1811  type Pthread_barrier_t = uintptr     /* _pthreadtypes.h:79:33 */
  1812  type Pthread_barrierattr_t = uintptr /* _pthreadtypes.h:80:36 */
  1813  type Pthread_spinlock_t = uintptr    /* _pthreadtypes.h:81:33 */
  1814  
  1815  // Additional type definitions:
  1816  //
  1817  // Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for
  1818  // use in header symbols.
  1819  type Pthread_addr_t = uintptr         /* _pthreadtypes.h:89:14 */
  1820  type Pthread_startroutine_t = uintptr /* _pthreadtypes.h:90:14 */
  1821  
  1822  type U_char = uint8   /* types.h:52:23 */
  1823  type U_short = uint16 /* types.h:53:24 */
  1824  type U_int = uint32   /* types.h:54:22 */
  1825  type U_long = uint32  /* types.h:55:23 */
  1826  type Ushort = uint16  /* types.h:57:24 */ // Sys V compatibility
  1827  type Uint = uint32    /* types.h:58:22 */ // Sys V compatibility
  1828  
  1829  // XXX POSIX sized integrals that should appear only in <sys/stdint.h>.
  1830  // -
  1831  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  1832  //
  1833  // Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org>
  1834  // Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
  1835  // All rights reserved.
  1836  //
  1837  // Redistribution and use in source and binary forms, with or without
  1838  // modification, are permitted provided that the following conditions
  1839  // are met:
  1840  // 1. Redistributions of source code must retain the above copyright
  1841  //    notice, this list of conditions and the following disclaimer.
  1842  // 2. Redistributions in binary form must reproduce the above copyright
  1843  //    notice, this list of conditions and the following disclaimer in the
  1844  //    documentation and/or other materials provided with the distribution.
  1845  //
  1846  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  1847  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1848  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1849  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  1850  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1851  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1852  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1853  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1854  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1855  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1856  // SUCH DAMAGE.
  1857  //
  1858  // $FreeBSD$
  1859  
  1860  type Int8_t = X__int8_t /* _stdint.h:36:19 */
  1861  
  1862  type Int16_t = X__int16_t /* _stdint.h:41:20 */
  1863  
  1864  type Int32_t = X__int32_t /* _stdint.h:46:20 */
  1865  
  1866  type Int64_t = X__int64_t /* _stdint.h:51:20 */
  1867  
  1868  type Uint8_t = X__uint8_t /* _stdint.h:56:20 */
  1869  
  1870  type Uint16_t = X__uint16_t /* _stdint.h:61:21 */
  1871  
  1872  type Uint32_t = X__uint32_t /* _stdint.h:66:21 */
  1873  
  1874  type Uint64_t = X__uint64_t /* _stdint.h:71:21 */
  1875  
  1876  type Intptr_t = X__intptr_t   /* _stdint.h:76:21 */
  1877  type Uintptr_t = X__uintptr_t /* _stdint.h:80:22 */
  1878  type Intmax_t = X__intmax_t   /* _stdint.h:84:21 */
  1879  type Uintmax_t = X__uintmax_t /* _stdint.h:88:22 */
  1880  
  1881  type U_int8_t = X__uint8_t   /* types.h:67:19 */ // unsigned integrals (deprecated)
  1882  type U_int16_t = X__uint16_t /* types.h:68:20 */
  1883  type U_int32_t = X__uint32_t /* types.h:69:20 */
  1884  type U_int64_t = X__uint64_t /* types.h:70:20 */
  1885  
  1886  type U_quad_t = X__uint64_t /* types.h:72:20 */ // quads (deprecated)
  1887  type Quad_t = X__int64_t    /* types.h:73:19 */
  1888  type Qaddr_t = uintptr      /* types.h:74:16 */
  1889  
  1890  type Caddr_t = uintptr   /* types.h:76:14 */ // core address
  1891  type C_caddr_t = uintptr /* types.h:77:20 */ // core address, pointer to const
  1892  
  1893  type Blksize_t = X__blksize_t /* types.h:80:21 */
  1894  
  1895  type Cpuwhich_t = X__cpuwhich_t /* types.h:84:22 */
  1896  type Cpulevel_t = X__cpulevel_t /* types.h:85:22 */
  1897  type Cpusetid_t = X__cpusetid_t /* types.h:86:22 */
  1898  
  1899  type Blkcnt_t = X__blkcnt_t /* types.h:89:20 */
  1900  
  1901  type Clock_t = X__clock_t /* types.h:94:19 */
  1902  
  1903  type Clockid_t = X__clockid_t /* types.h:99:21 */
  1904  
  1905  type Critical_t = X__critical_t /* types.h:103:22 */ // Critical section value
  1906  type Daddr_t = X__daddr_t       /* types.h:104:19 */ // disk address
  1907  
  1908  type Dev_t = X__dev_t /* types.h:107:18 */ // device number or struct cdev
  1909  
  1910  type Fflags_t = X__fflags_t /* types.h:112:20 */ // file flags
  1911  
  1912  type Fixpt_t = X__fixpt_t /* types.h:116:19 */ // fixed point number
  1913  
  1914  type Fsblkcnt_t = X__fsblkcnt_t /* types.h:119:22 */
  1915  type Fsfilcnt_t = X__fsfilcnt_t /* types.h:120:22 */
  1916  
  1917  type Gid_t = X__gid_t /* types.h:125:18 */ // group id
  1918  
  1919  type In_addr_t = X__uint32_t /* types.h:130:20 */ // base type for internet address
  1920  
  1921  type In_port_t = X__uint16_t /* types.h:135:20 */
  1922  
  1923  type Id_t = X__id_t /* types.h:140:17 */ // can hold a uid_t or pid_t
  1924  
  1925  type Ino_t = X__ino_t /* types.h:145:18 */ // inode number
  1926  
  1927  type Key_t = X__key_t /* types.h:150:18 */ // IPC key (for Sys V IPC)
  1928  
  1929  type Lwpid_t = X__lwpid_t /* types.h:155:19 */ // Thread ID (a.k.a. LWP)
  1930  
  1931  type Mode_t = X__mode_t /* types.h:160:18 */ // permissions
  1932  
  1933  type Accmode_t = X__accmode_t /* types.h:165:21 */ // access permissions
  1934  
  1935  type Nlink_t = X__nlink_t /* types.h:170:19 */ // link count
  1936  
  1937  type Off_t = X__off_t /* types.h:175:18 */ // file offset
  1938  
  1939  type Off64_t = X__off64_t /* types.h:180:19 */ // file offset (alias)
  1940  
  1941  type Pid_t = X__pid_t /* types.h:185:18 */ // process id
  1942  
  1943  type Register_t = X__register_t /* types.h:189:22 */
  1944  
  1945  type Rlim_t = X__rlim_t /* types.h:192:18 */ // resource limit
  1946  
  1947  type Sbintime_t = X__int64_t /* types.h:196:19 */
  1948  
  1949  type Segsz_t = X__segsz_t /* types.h:198:19 */ // segment size (in pages)
  1950  
  1951  type Ssize_t = X__ssize_t /* types.h:206:19 */
  1952  
  1953  type Suseconds_t = X__suseconds_t /* types.h:211:23 */ // microseconds (signed)
  1954  
  1955  type Time_t = X__time_t /* types.h:216:18 */
  1956  
  1957  type Timer_t = X__timer_t /* types.h:221:19 */
  1958  
  1959  type Mqd_t = X__mqd_t /* types.h:226:17 */
  1960  
  1961  type U_register_t = X__u_register_t /* types.h:230:24 */
  1962  
  1963  type Uid_t = X__uid_t /* types.h:233:18 */ // user id
  1964  
  1965  type Useconds_t = X__useconds_t /* types.h:238:22 */ // microseconds (unsigned)
  1966  
  1967  type Cap_ioctl_t = uint32 /* types.h:244:23 */
  1968  
  1969  // Types suitable for exporting physical addresses, virtual addresses
  1970  // (pointers), and memory object sizes from the kernel independent of native
  1971  // word size.  These should be used in place of vm_paddr_t, (u)intptr_t, and
  1972  // size_t in structs which contain such types that are shared with userspace.
  1973  type Kpaddr_t = X__uint64_t /* types.h:260:20 */
  1974  type Kvaddr_t = X__uint64_t /* types.h:261:20 */
  1975  type Ksize_t = X__uint64_t  /* types.h:262:20 */
  1976  type Kssize_t = X__int64_t  /* types.h:263:19 */
  1977  
  1978  type Vm_offset_t = X__vm_offset_t /* types.h:265:23 */
  1979  type Vm_ooffset_t = X__uint64_t   /* types.h:266:20 */
  1980  type Vm_paddr_t = X__vm_paddr_t   /* types.h:267:22 */
  1981  type Vm_pindex_t = X__uint64_t    /* types.h:268:20 */
  1982  type Vm_size_t = X__vm_size_t     /* types.h:269:21 */
  1983  
  1984  type Rman_res_t = X__rman_res_t /* types.h:271:25 */
  1985  
  1986  func __bitcount32(tls *libc.TLS, _x X__uint32_t) X__uint32_t { /* types.h:335:1: */
  1987  
  1988  	_x = _x&X__uint32_t(0x55555555) + _x&0xaaaaaaaa>>1
  1989  	_x = _x&X__uint32_t(0x33333333) + _x&0xcccccccc>>2
  1990  	_x = (_x + _x>>4) & X__uint32_t(0x0f0f0f0f)
  1991  	_x = _x + _x>>8
  1992  	_x = (_x + _x>>16) & X__uint32_t(0x000000ff)
  1993  	return _x
  1994  }
  1995  
  1996  // -
  1997  // SPDX-License-Identifier: BSD-3-Clause
  1998  //
  1999  // Copyright (c) 1992, 1993
  2000  //	The Regents of the University of California.  All rights reserved.
  2001  //
  2002  // Redistribution and use in source and binary forms, with or without
  2003  // modification, are permitted provided that the following conditions
  2004  // are met:
  2005  // 1. Redistributions of source code must retain the above copyright
  2006  //    notice, this list of conditions and the following disclaimer.
  2007  // 2. Redistributions in binary form must reproduce the above copyright
  2008  //    notice, this list of conditions and the following disclaimer in the
  2009  //    documentation and/or other materials provided with the distribution.
  2010  // 3. Neither the name of the University nor the names of its contributors
  2011  //    may be used to endorse or promote products derived from this software
  2012  //    without specific prior written permission.
  2013  //
  2014  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2015  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2016  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2017  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2018  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2019  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2020  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2021  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2022  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2023  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2024  // SUCH DAMAGE.
  2025  //
  2026  // $FreeBSD$
  2027  
  2028  // -
  2029  // SPDX-License-Identifier: BSD-3-Clause
  2030  //
  2031  // Copyright (c) 1991, 1993
  2032  //	The Regents of the University of California.  All rights reserved.
  2033  //
  2034  // This code is derived from software contributed to Berkeley by
  2035  // Berkeley Software Design, Inc.
  2036  //
  2037  // Redistribution and use in source and binary forms, with or without
  2038  // modification, are permitted provided that the following conditions
  2039  // are met:
  2040  // 1. Redistributions of source code must retain the above copyright
  2041  //    notice, this list of conditions and the following disclaimer.
  2042  // 2. Redistributions in binary form must reproduce the above copyright
  2043  //    notice, this list of conditions and the following disclaimer in the
  2044  //    documentation and/or other materials provided with the distribution.
  2045  // 3. Neither the name of the University nor the names of its contributors
  2046  //    may be used to endorse or promote products derived from this software
  2047  //    without specific prior written permission.
  2048  //
  2049  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2050  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2051  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2052  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2053  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2054  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2055  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2056  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2057  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2058  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2059  // SUCH DAMAGE.
  2060  //
  2061  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  2062  // $FreeBSD$
  2063  
  2064  // -
  2065  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2066  //
  2067  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2068  // All rights reserved.
  2069  //
  2070  // Redistribution and use in source and binary forms, with or without
  2071  // modification, are permitted provided that the following conditions
  2072  // are met:
  2073  // 1. Redistributions of source code must retain the above copyright
  2074  //    notice, this list of conditions and the following disclaimer.
  2075  // 2. Redistributions in binary form must reproduce the above copyright
  2076  //    notice, this list of conditions and the following disclaimer in the
  2077  //    documentation and/or other materials provided with the distribution.
  2078  //
  2079  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2080  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2081  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2082  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2083  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2084  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2085  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2086  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2087  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2088  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2089  // SUCH DAMAGE.
  2090  //
  2091  // $FreeBSD$
  2092  
  2093  // -
  2094  // SPDX-License-Identifier: BSD-3-Clause
  2095  //
  2096  // Copyright (c) 1982, 1986, 1989, 1991, 1993
  2097  //	The Regents of the University of California.  All rights reserved.
  2098  // (c) UNIX System Laboratories, Inc.
  2099  // All or some portions of this file are derived from material licensed
  2100  // to the University of California by American Telephone and Telegraph
  2101  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  2102  // the permission of UNIX System Laboratories, Inc.
  2103  //
  2104  // Redistribution and use in source and binary forms, with or without
  2105  // modification, are permitted provided that the following conditions
  2106  // are met:
  2107  // 1. Redistributions of source code must retain the above copyright
  2108  //    notice, this list of conditions and the following disclaimer.
  2109  // 2. Redistributions in binary form must reproduce the above copyright
  2110  //    notice, this list of conditions and the following disclaimer in the
  2111  //    documentation and/or other materials provided with the distribution.
  2112  // 3. Neither the name of the University nor the names of its contributors
  2113  //    may be used to endorse or promote products derived from this software
  2114  //    without specific prior written permission.
  2115  //
  2116  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2117  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2118  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2119  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2120  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2121  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2122  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2123  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2124  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2125  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2126  // SUCH DAMAGE.
  2127  //
  2128  //	@(#)signal.h	8.4 (Berkeley) 5/4/95
  2129  // $FreeBSD$
  2130  
  2131  // sigset_t macros.
  2132  
  2133  type X__sigset = struct{ F__bits [4]X__uint32_t } /* _sigset.h:53:9 */
  2134  
  2135  // -
  2136  // SPDX-License-Identifier: BSD-3-Clause
  2137  //
  2138  // Copyright (c) 1992, 1993
  2139  //	The Regents of the University of California.  All rights reserved.
  2140  //
  2141  // Redistribution and use in source and binary forms, with or without
  2142  // modification, are permitted provided that the following conditions
  2143  // are met:
  2144  // 1. Redistributions of source code must retain the above copyright
  2145  //    notice, this list of conditions and the following disclaimer.
  2146  // 2. Redistributions in binary form must reproduce the above copyright
  2147  //    notice, this list of conditions and the following disclaimer in the
  2148  //    documentation and/or other materials provided with the distribution.
  2149  // 3. Neither the name of the University nor the names of its contributors
  2150  //    may be used to endorse or promote products derived from this software
  2151  //    without specific prior written permission.
  2152  //
  2153  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2154  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2155  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2156  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2157  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2158  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2159  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2160  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2161  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2162  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2163  // SUCH DAMAGE.
  2164  //
  2165  // $FreeBSD$
  2166  
  2167  // -
  2168  // SPDX-License-Identifier: BSD-3-Clause
  2169  //
  2170  // Copyright (c) 1991, 1993
  2171  //	The Regents of the University of California.  All rights reserved.
  2172  //
  2173  // This code is derived from software contributed to Berkeley by
  2174  // Berkeley Software Design, Inc.
  2175  //
  2176  // Redistribution and use in source and binary forms, with or without
  2177  // modification, are permitted provided that the following conditions
  2178  // are met:
  2179  // 1. Redistributions of source code must retain the above copyright
  2180  //    notice, this list of conditions and the following disclaimer.
  2181  // 2. Redistributions in binary form must reproduce the above copyright
  2182  //    notice, this list of conditions and the following disclaimer in the
  2183  //    documentation and/or other materials provided with the distribution.
  2184  // 3. Neither the name of the University nor the names of its contributors
  2185  //    may be used to endorse or promote products derived from this software
  2186  //    without specific prior written permission.
  2187  //
  2188  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2189  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2190  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2191  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2192  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2193  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2194  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2195  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2196  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2197  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2198  // SUCH DAMAGE.
  2199  //
  2200  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  2201  // $FreeBSD$
  2202  
  2203  // -
  2204  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2205  //
  2206  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2207  // All rights reserved.
  2208  //
  2209  // Redistribution and use in source and binary forms, with or without
  2210  // modification, are permitted provided that the following conditions
  2211  // are met:
  2212  // 1. Redistributions of source code must retain the above copyright
  2213  //    notice, this list of conditions and the following disclaimer.
  2214  // 2. Redistributions in binary form must reproduce the above copyright
  2215  //    notice, this list of conditions and the following disclaimer in the
  2216  //    documentation and/or other materials provided with the distribution.
  2217  //
  2218  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2219  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2220  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2221  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2222  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2223  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2224  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2225  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2226  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2227  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2228  // SUCH DAMAGE.
  2229  //
  2230  // $FreeBSD$
  2231  
  2232  // -
  2233  // SPDX-License-Identifier: BSD-3-Clause
  2234  //
  2235  // Copyright (c) 1982, 1986, 1989, 1991, 1993
  2236  //	The Regents of the University of California.  All rights reserved.
  2237  // (c) UNIX System Laboratories, Inc.
  2238  // All or some portions of this file are derived from material licensed
  2239  // to the University of California by American Telephone and Telegraph
  2240  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  2241  // the permission of UNIX System Laboratories, Inc.
  2242  //
  2243  // Redistribution and use in source and binary forms, with or without
  2244  // modification, are permitted provided that the following conditions
  2245  // are met:
  2246  // 1. Redistributions of source code must retain the above copyright
  2247  //    notice, this list of conditions and the following disclaimer.
  2248  // 2. Redistributions in binary form must reproduce the above copyright
  2249  //    notice, this list of conditions and the following disclaimer in the
  2250  //    documentation and/or other materials provided with the distribution.
  2251  // 3. Neither the name of the University nor the names of its contributors
  2252  //    may be used to endorse or promote products derived from this software
  2253  //    without specific prior written permission.
  2254  //
  2255  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2256  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2257  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2258  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2259  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2260  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2261  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2262  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2263  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2264  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2265  // SUCH DAMAGE.
  2266  //
  2267  //	@(#)signal.h	8.4 (Berkeley) 5/4/95
  2268  // $FreeBSD$
  2269  
  2270  // sigset_t macros.
  2271  
  2272  type X__sigset_t = X__sigset /* _sigset.h:55:3 */
  2273  
  2274  // -
  2275  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2276  //
  2277  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2278  // All rights reserved.
  2279  //
  2280  // Redistribution and use in source and binary forms, with or without
  2281  // modification, are permitted provided that the following conditions
  2282  // are met:
  2283  // 1. Redistributions of source code must retain the above copyright
  2284  //    notice, this list of conditions and the following disclaimer.
  2285  // 2. Redistributions in binary form must reproduce the above copyright
  2286  //    notice, this list of conditions and the following disclaimer in the
  2287  //    documentation and/or other materials provided with the distribution.
  2288  //
  2289  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2290  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2291  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2292  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2293  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2294  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2295  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2296  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2297  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2298  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2299  // SUCH DAMAGE.
  2300  //
  2301  // $FreeBSD$
  2302  
  2303  // -
  2304  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2305  //
  2306  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2307  // All rights reserved.
  2308  //
  2309  // Redistribution and use in source and binary forms, with or without
  2310  // modification, are permitted provided that the following conditions
  2311  // are met:
  2312  // 1. Redistributions of source code must retain the above copyright
  2313  //    notice, this list of conditions and the following disclaimer.
  2314  // 2. Redistributions in binary form must reproduce the above copyright
  2315  //    notice, this list of conditions and the following disclaimer in the
  2316  //    documentation and/or other materials provided with the distribution.
  2317  //
  2318  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2319  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2320  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2321  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2322  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2323  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2324  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2325  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2326  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2327  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2328  // SUCH DAMAGE.
  2329  //
  2330  // $FreeBSD$
  2331  
  2332  // Structure returned by gettimeofday(2) system call, and used in other calls.
  2333  type Timeval = struct {
  2334  	Ftv_sec  Time_t
  2335  	Ftv_usec Suseconds_t
  2336  } /* _timeval.h:49:1 */
  2337  
  2338  // -
  2339  // SPDX-License-Identifier: BSD-3-Clause
  2340  //
  2341  // Copyright (c) 1982, 1986, 1993
  2342  //	The Regents of the University of California.  All rights reserved.
  2343  //
  2344  // Redistribution and use in source and binary forms, with or without
  2345  // modification, are permitted provided that the following conditions
  2346  // are met:
  2347  // 1. Redistributions of source code must retain the above copyright
  2348  //    notice, this list of conditions and the following disclaimer.
  2349  // 2. Redistributions in binary form must reproduce the above copyright
  2350  //    notice, this list of conditions and the following disclaimer in the
  2351  //    documentation and/or other materials provided with the distribution.
  2352  // 3. Neither the name of the University nor the names of its contributors
  2353  //    may be used to endorse or promote products derived from this software
  2354  //    without specific prior written permission.
  2355  //
  2356  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2357  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2358  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2359  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2360  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2361  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2362  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2363  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2364  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2365  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2366  // SUCH DAMAGE.
  2367  //
  2368  //	@(#)time.h	8.5 (Berkeley) 5/4/95
  2369  // from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp
  2370  //	$FreeBSD$
  2371  
  2372  // -
  2373  // SPDX-License-Identifier: BSD-3-Clause
  2374  //
  2375  // Copyright (c) 1991, 1993
  2376  //	The Regents of the University of California.  All rights reserved.
  2377  //
  2378  // This code is derived from software contributed to Berkeley by
  2379  // Berkeley Software Design, Inc.
  2380  //
  2381  // Redistribution and use in source and binary forms, with or without
  2382  // modification, are permitted provided that the following conditions
  2383  // are met:
  2384  // 1. Redistributions of source code must retain the above copyright
  2385  //    notice, this list of conditions and the following disclaimer.
  2386  // 2. Redistributions in binary form must reproduce the above copyright
  2387  //    notice, this list of conditions and the following disclaimer in the
  2388  //    documentation and/or other materials provided with the distribution.
  2389  // 3. Neither the name of the University nor the names of its contributors
  2390  //    may be used to endorse or promote products derived from this software
  2391  //    without specific prior written permission.
  2392  //
  2393  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2394  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2395  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2396  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2397  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2398  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2399  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2400  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2401  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2402  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2403  // SUCH DAMAGE.
  2404  //
  2405  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  2406  // $FreeBSD$
  2407  
  2408  // -
  2409  // SPDX-License-Identifier: BSD-3-Clause
  2410  //
  2411  // Copyright (c) 1982, 1986, 1993
  2412  //	The Regents of the University of California.  All rights reserved.
  2413  //
  2414  // Redistribution and use in source and binary forms, with or without
  2415  // modification, are permitted provided that the following conditions
  2416  // are met:
  2417  // 1. Redistributions of source code must retain the above copyright
  2418  //    notice, this list of conditions and the following disclaimer.
  2419  // 2. Redistributions in binary form must reproduce the above copyright
  2420  //    notice, this list of conditions and the following disclaimer in the
  2421  //    documentation and/or other materials provided with the distribution.
  2422  // 3. Neither the name of the University nor the names of its contributors
  2423  //    may be used to endorse or promote products derived from this software
  2424  //    without specific prior written permission.
  2425  //
  2426  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2427  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2428  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2429  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2430  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2431  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2432  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2433  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2434  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2435  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2436  // SUCH DAMAGE.
  2437  //
  2438  //	@(#)time.h	8.5 (Berkeley) 5/4/95
  2439  // from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp
  2440  //	$FreeBSD$
  2441  
  2442  // -
  2443  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2444  //
  2445  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2446  // All rights reserved.
  2447  //
  2448  // Redistribution and use in source and binary forms, with or without
  2449  // modification, are permitted provided that the following conditions
  2450  // are met:
  2451  // 1. Redistributions of source code must retain the above copyright
  2452  //    notice, this list of conditions and the following disclaimer.
  2453  // 2. Redistributions in binary form must reproduce the above copyright
  2454  //    notice, this list of conditions and the following disclaimer in the
  2455  //    documentation and/or other materials provided with the distribution.
  2456  //
  2457  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2458  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2459  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2460  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2461  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2462  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2463  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2464  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2465  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2466  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2467  // SUCH DAMAGE.
  2468  //
  2469  // $FreeBSD$
  2470  
  2471  type Timespec = struct {
  2472  	Ftv_sec  Time_t
  2473  	Ftv_nsec int32
  2474  } /* _timespec.h:46:1 */
  2475  
  2476  // Structure defined by POSIX.1b to be like a itimerval, but with
  2477  // timespecs. Used in the timer_*() system calls.
  2478  type Itimerspec = struct {
  2479  	Fit_interval struct {
  2480  		Ftv_sec  Time_t
  2481  		Ftv_nsec int32
  2482  	}
  2483  	Fit_value struct {
  2484  		Ftv_sec  Time_t
  2485  		Ftv_nsec int32
  2486  	}
  2487  } /* timespec.h:60:1 */
  2488  
  2489  type X__fd_mask = uint32  /* select.h:44:23 */
  2490  type Fd_mask = X__fd_mask /* select.h:46:19 */
  2491  
  2492  type Sigset_t = X__sigset_t /* select.h:51:20 */
  2493  
  2494  // Select uses bit masks of file descriptors in longs.  These macros
  2495  // manipulate such bit fields (the filesystem macros use chars).
  2496  // FD_SETSIZE may be defined by the user, but the default here should
  2497  // be enough for most uses.
  2498  
  2499  type Fd_set1 = struct{ F__fds_bits [32]X__fd_mask } /* select.h:73:9 */
  2500  
  2501  // Select uses bit masks of file descriptors in longs.  These macros
  2502  // manipulate such bit fields (the filesystem macros use chars).
  2503  // FD_SETSIZE may be defined by the user, but the default here should
  2504  // be enough for most uses.
  2505  
  2506  type Fd_set = Fd_set1 /* select.h:75:3 */
  2507  
  2508  // -
  2509  // This file is in the public domain.
  2510  // $FreeBSD$
  2511  
  2512  // -
  2513  // SPDX-License-Identifier: BSD-2-Clause
  2514  //
  2515  // Copyright (c) 2017 Poul-Henning Kamp.  All rights reserved.
  2516  //
  2517  // Redistribution and use in source and binary forms, with or without
  2518  // modification, are permitted provided that the following conditions
  2519  // are met:
  2520  // 1. Redistributions of source code must retain the above copyright
  2521  //    notice, this list of conditions and the following disclaimer.
  2522  // 2. Redistributions in binary form must reproduce the above copyright
  2523  //    notice, this list of conditions and the following disclaimer in the
  2524  //    documentation and/or other materials provided with the distribution.
  2525  //
  2526  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2527  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2528  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2529  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2530  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2531  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2532  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2533  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2534  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2535  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2536  // SUCH DAMAGE.
  2537  //
  2538  // $FreeBSD$
  2539  
  2540  // -
  2541  // SPDX-License-Identifier: BSD-3-Clause
  2542  //
  2543  // Copyright (c) 2002 David E. O'Brien.  All rights reserved.
  2544  //
  2545  // Redistribution and use in source and binary forms, with or without
  2546  // modification, are permitted provided that the following conditions
  2547  // are met:
  2548  // 1. Redistributions of source code must retain the above copyright
  2549  //    notice, this list of conditions and the following disclaimer.
  2550  // 2. Redistributions in binary form must reproduce the above copyright
  2551  //    notice, this list of conditions and the following disclaimer in the
  2552  //    documentation and/or other materials provided with the distribution.
  2553  // 3. Neither the name of the University nor the names of its contributors
  2554  //    may be used to endorse or promote products derived from this software
  2555  //    without specific prior written permission.
  2556  //
  2557  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2558  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2559  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2560  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2561  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2562  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2563  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2564  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2565  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2566  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2567  // SUCH DAMAGE.
  2568  //
  2569  // $FreeBSD$
  2570  
  2571  // -
  2572  // SPDX-License-Identifier: BSD-3-Clause
  2573  //
  2574  // Copyright (c) 1991, 1993
  2575  //	The Regents of the University of California.  All rights reserved.
  2576  //
  2577  // This code is derived from software contributed to Berkeley by
  2578  // Berkeley Software Design, Inc.
  2579  //
  2580  // Redistribution and use in source and binary forms, with or without
  2581  // modification, are permitted provided that the following conditions
  2582  // are met:
  2583  // 1. Redistributions of source code must retain the above copyright
  2584  //    notice, this list of conditions and the following disclaimer.
  2585  // 2. Redistributions in binary form must reproduce the above copyright
  2586  //    notice, this list of conditions and the following disclaimer in the
  2587  //    documentation and/or other materials provided with the distribution.
  2588  // 3. Neither the name of the University nor the names of its contributors
  2589  //    may be used to endorse or promote products derived from this software
  2590  //    without specific prior written permission.
  2591  //
  2592  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2593  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2594  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2595  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2596  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2597  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2598  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2599  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2600  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2601  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2602  // SUCH DAMAGE.
  2603  //
  2604  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  2605  // $FreeBSD$
  2606  
  2607  // -
  2608  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  2609  //
  2610  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  2611  // All rights reserved.
  2612  //
  2613  // Redistribution and use in source and binary forms, with or without
  2614  // modification, are permitted provided that the following conditions
  2615  // are met:
  2616  // 1. Redistributions of source code must retain the above copyright
  2617  //    notice, this list of conditions and the following disclaimer.
  2618  // 2. Redistributions in binary form must reproduce the above copyright
  2619  //    notice, this list of conditions and the following disclaimer in the
  2620  //    documentation and/or other materials provided with the distribution.
  2621  //
  2622  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2623  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2624  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2625  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2626  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2627  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2628  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2629  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2630  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2631  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2632  // SUCH DAMAGE.
  2633  //
  2634  // $FreeBSD$
  2635  
  2636  type Va_list = X__va_list /* _stdarg.h:41:27 */ // select(2)
  2637  
  2638  type Crypt_data = struct {
  2639  	Finitialized int32
  2640  	F__buf       [256]int8
  2641  } /* unistd.h:489:1 */
  2642  
  2643  // getopt(3) external variable
  2644  
  2645  // MVS linker does not support external names larger than 8 bytes
  2646  
  2647  //
  2648  //     The 'zlib' compression library provides in-memory compression and
  2649  //   decompression functions, including integrity checks of the uncompressed data.
  2650  //   This version of the library supports only one compression method (deflation)
  2651  //   but other algorithms will be added later and will have the same stream
  2652  //   interface.
  2653  //
  2654  //     Compression can be done in a single step if the buffers are large enough,
  2655  //   or can be done by repeated calls of the compression function.  In the latter
  2656  //   case, the application must provide more input and/or consume the output
  2657  //   (providing more output space) before each call.
  2658  //
  2659  //     The compressed data format used by default by the in-memory functions is
  2660  //   the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
  2661  //   around a deflate stream, which is itself documented in RFC 1951.
  2662  //
  2663  //     The library also supports reading and writing files in gzip (.gz) format
  2664  //   with an interface similar to that of stdio using the functions that start
  2665  //   with "gz".  The gzip format is different from the zlib format.  gzip is a
  2666  //   gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
  2667  //
  2668  //     This library can optionally read and write gzip and raw deflate streams in
  2669  //   memory as well.
  2670  //
  2671  //     The zlib format was designed to be compact and fast for use in memory
  2672  //   and on communications channels.  The gzip format was designed for single-
  2673  //   file compression on file systems, has a larger header than zlib to maintain
  2674  //   directory information, and uses a different, slower check method than zlib.
  2675  //
  2676  //     The library does not install any signal handler.  The decoder checks
  2677  //   the consistency of the compressed data, so the library should never crash
  2678  //   even in the case of corrupted input.
  2679  
  2680  type Alloc_func = uintptr /* zlib.h:81:16 */
  2681  type Free_func = uintptr  /* zlib.h:82:16 */
  2682  
  2683  type Internal_state = struct {
  2684  	Fstrm             Z_streamp
  2685  	Fstatus           int32
  2686  	Fpending_buf      uintptr
  2687  	Fpending_buf_size Ulg
  2688  	Fpending_out      uintptr
  2689  	Fpending          Ulg
  2690  	Fwrap             int32
  2691  	Fgzhead           Gz_headerp
  2692  	Fgzindex          Ulg
  2693  	Fmethod           Byte
  2694  	F__ccgo_pad1      [3]byte
  2695  	Flast_flush       int32
  2696  	Fw_size           UInt
  2697  	Fw_bits           UInt
  2698  	Fw_mask           UInt
  2699  	Fwindow           uintptr
  2700  	Fwindow_size      Ulg
  2701  	Fprev             uintptr
  2702  	Fhead             uintptr
  2703  	Fins_h            UInt
  2704  	Fhash_size        UInt
  2705  	Fhash_bits        UInt
  2706  	Fhash_mask        UInt
  2707  	Fhash_shift       UInt
  2708  	Fblock_start      int32
  2709  	Fmatch_length     UInt
  2710  	Fprev_match       IPos
  2711  	Fmatch_available  int32
  2712  	Fstrstart         UInt
  2713  	Fmatch_start      UInt
  2714  	Flookahead        UInt
  2715  	Fprev_length      UInt
  2716  	Fmax_chain_length UInt
  2717  	Fmax_lazy_match   UInt
  2718  	Flevel            int32
  2719  	Fstrategy         int32
  2720  	Fgood_match       UInt
  2721  	Fnice_match       int32
  2722  	Fdyn_ltree        [573]struct {
  2723  		Ffc struct{ Ffreq Ush }
  2724  		Fdl struct{ Fdad Ush }
  2725  	}
  2726  	Fdyn_dtree [61]struct {
  2727  		Ffc struct{ Ffreq Ush }
  2728  		Fdl struct{ Fdad Ush }
  2729  	}
  2730  	Fbl_tree [39]struct {
  2731  		Ffc struct{ Ffreq Ush }
  2732  		Fdl struct{ Fdad Ush }
  2733  	}
  2734  	Fl_desc struct {
  2735  		Fdyn_tree  uintptr
  2736  		Fmax_code  int32
  2737  		Fstat_desc uintptr
  2738  	}
  2739  	Fd_desc struct {
  2740  		Fdyn_tree  uintptr
  2741  		Fmax_code  int32
  2742  		Fstat_desc uintptr
  2743  	}
  2744  	Fbl_desc struct {
  2745  		Fdyn_tree  uintptr
  2746  		Fmax_code  int32
  2747  		Fstat_desc uintptr
  2748  	}
  2749  	Fbl_count    [16]Ush
  2750  	Fheap        [573]int32
  2751  	Fheap_len    int32
  2752  	Fheap_max    int32
  2753  	Fdepth       [573]Uch
  2754  	F__ccgo_pad2 [3]byte
  2755  	Fl_buf       uintptr
  2756  	Flit_bufsize UInt
  2757  	Flast_lit    UInt
  2758  	Fd_buf       uintptr
  2759  	Fopt_len     Ulg
  2760  	Fstatic_len  Ulg
  2761  	Fmatches     UInt
  2762  	Finsert      UInt
  2763  	Fbi_buf      Ush
  2764  	F__ccgo_pad3 [2]byte
  2765  	Fbi_valid    int32
  2766  	Fhigh_water  Ulg
  2767  } /* zlib.h:84:1 */
  2768  
  2769  type Z_stream_s = struct {
  2770  	Fnext_in   uintptr
  2771  	Favail_in  UInt
  2772  	Ftotal_in  ULong
  2773  	Fnext_out  uintptr
  2774  	Favail_out UInt
  2775  	Ftotal_out ULong
  2776  	Fmsg       uintptr
  2777  	Fstate     uintptr
  2778  	Fzalloc    Alloc_func
  2779  	Fzfree     Free_func
  2780  	Fopaque    Voidpf
  2781  	Fdata_type int32
  2782  	Fadler     ULong
  2783  	Freserved  ULong
  2784  } /* zlib.h:86:9 */
  2785  
  2786  type Z_stream = Z_stream_s /* zlib.h:106:3 */
  2787  
  2788  type Z_streamp = uintptr /* zlib.h:108:22 */
  2789  
  2790  //
  2791  //      gzip header information passed to and from zlib routines.  See RFC 1952
  2792  //   for more details on the meanings of these fields.
  2793  type Gz_header_s = struct {
  2794  	Ftext      int32
  2795  	Ftime      ULong
  2796  	Fxflags    int32
  2797  	Fos        int32
  2798  	Fextra     uintptr
  2799  	Fextra_len UInt
  2800  	Fextra_max UInt
  2801  	Fname      uintptr
  2802  	Fname_max  UInt
  2803  	Fcomment   uintptr
  2804  	Fcomm_max  UInt
  2805  	Fhcrc      int32
  2806  	Fdone      int32
  2807  } /* zlib.h:114:9 */
  2808  
  2809  //
  2810  //      gzip header information passed to and from zlib routines.  See RFC 1952
  2811  //   for more details on the meanings of these fields.
  2812  type Gz_header = Gz_header_s /* zlib.h:129:3 */
  2813  
  2814  type Gz_headerp = uintptr /* zlib.h:131:23 */
  2815  //
  2816  //      inflateGetHeader() requests that gzip header information be stored in the
  2817  //    provided gz_header structure.  inflateGetHeader() may be called after
  2818  //    inflateInit2() or inflateReset(), and before the first call of inflate().
  2819  //    As inflate() processes the gzip stream, head->done is zero until the header
  2820  //    is completed, at which time head->done is set to one.  If a zlib stream is
  2821  //    being decoded, then head->done is set to -1 to indicate that there will be
  2822  //    no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
  2823  //    used to force inflate() to return immediately after header processing is
  2824  //    complete and before any actual data is decompressed.
  2825  //
  2826  //      The text, time, xflags, and os fields are filled in with the gzip header
  2827  //    contents.  hcrc is set to true if there is a header CRC.  (The header CRC
  2828  //    was valid if done is set to one.) If extra is not Z_NULL, then extra_max
  2829  //    contains the maximum number of bytes to write to extra.  Once done is true,
  2830  //    extra_len contains the actual extra field length, and extra contains the
  2831  //    extra field, or that field truncated if extra_max is less than extra_len.
  2832  //    If name is not Z_NULL, then up to name_max characters are written there,
  2833  //    terminated with a zero unless the length is greater than name_max.  If
  2834  //    comment is not Z_NULL, then up to comm_max characters are written there,
  2835  //    terminated with a zero unless the length is greater than comm_max.  When any
  2836  //    of extra, name, or comment are not Z_NULL and the respective field is not
  2837  //    present in the header, then that field is set to Z_NULL to signal its
  2838  //    absence.  This allows the use of deflateSetHeader() with the returned
  2839  //    structure to duplicate the header.  However if those fields are set to
  2840  //    allocated memory, then the application will need to save those pointers
  2841  //    elsewhere so that they can be eventually freed.
  2842  //
  2843  //      If inflateGetHeader is not used, then the header information is simply
  2844  //    discarded.  The header is always checked for validity, including the header
  2845  //    CRC if present.  inflateReset() will reset the process to discard the header
  2846  //    information.  The application would need to call inflateGetHeader() again to
  2847  //    retrieve the header from the next gzip stream.
  2848  //
  2849  //      inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
  2850  //    stream state was inconsistent.
  2851  
  2852  //
  2853  // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
  2854  //                                         unsigned char FAR *window));
  2855  //
  2856  //      Initialize the internal stream state for decompression using inflateBack()
  2857  //    calls.  The fields zalloc, zfree and opaque in strm must be initialized
  2858  //    before the call.  If zalloc and zfree are Z_NULL, then the default library-
  2859  //    derived memory allocation routines are used.  windowBits is the base two
  2860  //    logarithm of the window size, in the range 8..15.  window is a caller
  2861  //    supplied buffer of that size.  Except for special applications where it is
  2862  //    assured that deflate was used with small window sizes, windowBits must be 15
  2863  //    and a 32K byte window must be supplied to be able to decompress general
  2864  //    deflate streams.
  2865  //
  2866  //      See inflateBack() for the usage of these routines.
  2867  //
  2868  //      inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
  2869  //    the parameters are invalid, Z_MEM_ERROR if the internal state could not be
  2870  //    allocated, or Z_VERSION_ERROR if the version of the library does not match
  2871  //    the version of the header file.
  2872  
  2873  type In_func = uintptr  /* zlib.h:1092:18 */
  2874  type Out_func = uintptr /* zlib.h:1094:13 */
  2875  //
  2876  //      Same as uncompress, except that sourceLen is a pointer, where the
  2877  //    length of the source is *sourceLen.  On return, *sourceLen is the number of
  2878  //    source bytes consumed.
  2879  
  2880  // gzip file access functions
  2881  
  2882  //
  2883  //      This library supports reading and writing files in gzip (.gz) format with
  2884  //    an interface similar to that of stdio, using the functions that start with
  2885  //    "gz".  The gzip format is different from the zlib format.  gzip is a gzip
  2886  //    wrapper, documented in RFC 1952, wrapped around a deflate stream.
  2887  
  2888  type GzFile_s = struct {
  2889  	Fhave uint32
  2890  	Fnext uintptr
  2891  	Fpos  Off_t
  2892  } /* zlib.h:1300:9 */
  2893  
  2894  //
  2895  //      Same as uncompress, except that sourceLen is a pointer, where the
  2896  //    length of the source is *sourceLen.  On return, *sourceLen is the number of
  2897  //    source bytes consumed.
  2898  
  2899  // gzip file access functions
  2900  
  2901  //
  2902  //      This library supports reading and writing files in gzip (.gz) format with
  2903  //    an interface similar to that of stdio, using the functions that start with
  2904  //    "gz".  The gzip format is different from the zlib format.  gzip is a gzip
  2905  //    wrapper, documented in RFC 1952, wrapped around a deflate stream.
  2906  
  2907  type GzFile = uintptr /* zlib.h:1300:25 */
  2908  
  2909  // -
  2910  // Copyright (c) 2011, 2012 The FreeBSD Foundation
  2911  // All rights reserved.
  2912  //
  2913  // Redistribution and use in source and binary forms, with or without
  2914  // modification, are permitted provided that the following conditions
  2915  // are met:
  2916  // 1. Redistributions of source code must retain the above copyright
  2917  //    notice, this list of conditions and the following disclaimer.
  2918  // 2. Redistributions in binary form must reproduce the above copyright
  2919  //    notice, this list of conditions and the following disclaimer in the
  2920  //    documentation and/or other materials provided with the distribution.
  2921  //
  2922  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  2923  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2924  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2925  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  2926  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2927  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2928  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2929  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2930  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2931  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2932  // SUCH DAMAGE.
  2933  //
  2934  // $FreeBSD$
  2935  
  2936  type Locale_t = uintptr /* _strings.h:31:25 */
  2937  
  2938  // xlocale extensions
  2939  
  2940  type Errno_t = int32 /* string.h:159:13 */
  2941  
  2942  // -
  2943  // SPDX-License-Identifier: BSD-3-Clause
  2944  //
  2945  // Copyright (c) 1990, 1993
  2946  //	The Regents of the University of California.  All rights reserved.
  2947  //
  2948  // Redistribution and use in source and binary forms, with or without
  2949  // modification, are permitted provided that the following conditions
  2950  // are met:
  2951  // 1. Redistributions of source code must retain the above copyright
  2952  //    notice, this list of conditions and the following disclaimer.
  2953  // 2. Redistributions in binary form must reproduce the above copyright
  2954  //    notice, this list of conditions and the following disclaimer in the
  2955  //    documentation and/or other materials provided with the distribution.
  2956  // 3. Neither the name of the University nor the names of its contributors
  2957  //    may be used to endorse or promote products derived from this software
  2958  //    without specific prior written permission.
  2959  //
  2960  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2961  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2962  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2963  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  2964  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  2965  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  2966  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  2967  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  2968  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  2969  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  2970  // SUCH DAMAGE.
  2971  //
  2972  //	@(#)stdlib.h	8.5 (Berkeley) 5/19/95
  2973  // $FreeBSD$
  2974  
  2975  // -
  2976  // SPDX-License-Identifier: BSD-3-Clause
  2977  //
  2978  // Copyright (c) 1991, 1993
  2979  //	The Regents of the University of California.  All rights reserved.
  2980  //
  2981  // This code is derived from software contributed to Berkeley by
  2982  // Berkeley Software Design, Inc.
  2983  //
  2984  // Redistribution and use in source and binary forms, with or without
  2985  // modification, are permitted provided that the following conditions
  2986  // are met:
  2987  // 1. Redistributions of source code must retain the above copyright
  2988  //    notice, this list of conditions and the following disclaimer.
  2989  // 2. Redistributions in binary form must reproduce the above copyright
  2990  //    notice, this list of conditions and the following disclaimer in the
  2991  //    documentation and/or other materials provided with the distribution.
  2992  // 3. Neither the name of the University nor the names of its contributors
  2993  //    may be used to endorse or promote products derived from this software
  2994  //    without specific prior written permission.
  2995  //
  2996  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  2997  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  2998  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  2999  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  3000  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3001  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3002  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3003  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3004  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3005  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3006  // SUCH DAMAGE.
  3007  //
  3008  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  3009  // $FreeBSD$
  3010  
  3011  // -
  3012  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  3013  //
  3014  // Copyright (c) 2003 Marcel Moolenaar
  3015  // All rights reserved.
  3016  //
  3017  // Redistribution and use in source and binary forms, with or without
  3018  // modification, are permitted provided that the following conditions
  3019  // are met:
  3020  //
  3021  // 1. Redistributions of source code must retain the above copyright
  3022  //    notice, this list of conditions and the following disclaimer.
  3023  // 2. Redistributions in binary form must reproduce the above copyright
  3024  //    notice, this list of conditions and the following disclaimer in the
  3025  //    documentation and/or other materials provided with the distribution.
  3026  //
  3027  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  3028  // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  3029  // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  3030  // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  3031  // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  3032  // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  3033  // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  3034  // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  3035  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  3036  // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  3037  //
  3038  // $FreeBSD$
  3039  
  3040  // -
  3041  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  3042  //
  3043  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  3044  // All rights reserved.
  3045  //
  3046  // Redistribution and use in source and binary forms, with or without
  3047  // modification, are permitted provided that the following conditions
  3048  // are met:
  3049  // 1. Redistributions of source code must retain the above copyright
  3050  //    notice, this list of conditions and the following disclaimer.
  3051  // 2. Redistributions in binary form must reproduce the above copyright
  3052  //    notice, this list of conditions and the following disclaimer in the
  3053  //    documentation and/or other materials provided with the distribution.
  3054  //
  3055  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  3056  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  3057  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  3058  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  3059  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  3060  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  3061  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  3062  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  3063  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  3064  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  3065  // SUCH DAMAGE.
  3066  //
  3067  // $FreeBSD$
  3068  
  3069  type Div_t = struct {
  3070  	Fquot int32
  3071  	Frem  int32
  3072  } /* stdlib.h:66:3 */
  3073  
  3074  type Ldiv_t = struct {
  3075  	Fquot int32
  3076  	Frem  int32
  3077  } /* stdlib.h:71:3 */
  3078  
  3079  // Functions added in C99 which we make conditionally available in the
  3080  // BSD^C89 namespace if the compiler supports `long long'.
  3081  // The #if test is more complicated than it ought to be because
  3082  // __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long'
  3083  // is not supported in the compilation environment (which therefore means
  3084  // that it can't really be ISO C99).
  3085  //
  3086  // (The only other extension made by C99 in thie header is _Exit().)
  3087  // LONGLONG
  3088  type Lldiv_t = struct {
  3089  	Fquot int64
  3090  	Frem  int64
  3091  } /* stdlib.h:142:3 */ // getsubopt(3) external variable
  3092  
  3093  // K.3.6
  3094  type Constraint_handler_t = uintptr /* stdlib.h:349:14 */
  3095  
  3096  // since "static" is used to mean two completely different things in C, we
  3097  //    define "local" for the non-static meaning of "static", for readability
  3098  //    (compile with -Dlocal if your debugger can't find static symbols)
  3099  
  3100  type Uch = uint8  /* zutil.h:43:24 */
  3101  type Uchf = Uch   /* zutil.h:44:17 */
  3102  type Ush = uint16 /* zutil.h:45:24 */
  3103  type Ushf = Ush   /* zutil.h:46:17 */
  3104  type Ulg = uint32 /* zutil.h:47:24 */
  3105  
  3106  // NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1
  3107  
  3108  // use NO_DIVIDE if your processor does not do division in hardware --
  3109  //    try it both ways to see which is faster
  3110  
  3111  // =========================================================================
  3112  func Xadler32_z(tls *libc.TLS, adler ULong, buf uintptr, len Z_size_t) ULong { /* adler32.c:63:15: */
  3113  	var sum2 uint32
  3114  	var n uint32
  3115  
  3116  	// split Adler-32 into component sums
  3117  	sum2 = adler >> 16 & ULong(0xffff)
  3118  	adler = adler & ULong(0xffff)
  3119  
  3120  	// in case user likes doing a byte at a time, keep it fast
  3121  	if len == Z_size_t(1) {
  3122  		adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf)))
  3123  		if adler >= BASE {
  3124  			adler = adler - BASE
  3125  		}
  3126  		sum2 = sum2 + adler
  3127  		if sum2 >= BASE {
  3128  			sum2 = sum2 - BASE
  3129  		}
  3130  		return adler | sum2<<16
  3131  	}
  3132  
  3133  	// initial Adler-32 value (deferred check for len == 1 speed)
  3134  	if buf == uintptr(Z_NULL) {
  3135  		return ULong(1)
  3136  	}
  3137  
  3138  	// in case short lengths are provided, keep it somewhat fast
  3139  	if len < Z_size_t(16) {
  3140  		for libc.PostDecUint32(&len, 1) != 0 {
  3141  			adler = adler + ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))
  3142  			sum2 = sum2 + adler
  3143  		}
  3144  		if adler >= BASE {
  3145  			adler = adler - BASE
  3146  		}
  3147  		sum2 = sum2 % BASE // only added so many BASE's
  3148  		return adler | sum2<<16
  3149  	}
  3150  
  3151  	// do length NMAX blocks -- requires just one modulo operation
  3152  	for len >= Z_size_t(NMAX) {
  3153  		len = len - Z_size_t(NMAX)
  3154  		n = uint32(NMAX / 16) // NMAX is divisible by 16
  3155  		for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
  3156  			{
  3157  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf)))
  3158  				sum2 = sum2 + adler
  3159  			}
  3160  			{
  3161  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 1)))
  3162  				sum2 = sum2 + adler
  3163  			}
  3164  
  3165  			{
  3166  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 2)))
  3167  				sum2 = sum2 + adler
  3168  			}
  3169  			{
  3170  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 3)))
  3171  				sum2 = sum2 + adler
  3172  			}
  3173  
  3174  			{
  3175  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 4)))
  3176  				sum2 = sum2 + adler
  3177  			}
  3178  			{
  3179  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 5)))
  3180  				sum2 = sum2 + adler
  3181  			}
  3182  
  3183  			{
  3184  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 6)))
  3185  				sum2 = sum2 + adler
  3186  			}
  3187  			{
  3188  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 7)))
  3189  				sum2 = sum2 + adler
  3190  			}
  3191  
  3192  			{
  3193  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 8)))
  3194  				sum2 = sum2 + adler
  3195  			}
  3196  			{
  3197  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 9)))
  3198  				sum2 = sum2 + adler
  3199  			}
  3200  
  3201  			{
  3202  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 10)))
  3203  				sum2 = sum2 + adler
  3204  			}
  3205  			{
  3206  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 11)))
  3207  				sum2 = sum2 + adler
  3208  			}
  3209  
  3210  			{
  3211  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 12)))
  3212  				sum2 = sum2 + adler
  3213  			}
  3214  			{
  3215  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 13)))
  3216  				sum2 = sum2 + adler
  3217  			}
  3218  
  3219  			{
  3220  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 14)))
  3221  				sum2 = sum2 + adler
  3222  			}
  3223  			{
  3224  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 15)))
  3225  				sum2 = sum2 + adler
  3226  			}
  3227  
  3228  			// 16 sums unrolled
  3229  			buf += uintptr(16)
  3230  		}
  3231  		adler = adler % BASE
  3232  		sum2 = sum2 % BASE
  3233  	}
  3234  
  3235  	// do remaining bytes (less than NMAX, still just one modulo)
  3236  	if len != 0 { // avoid modulos if none remaining
  3237  		for len >= Z_size_t(16) {
  3238  			len = len - Z_size_t(16)
  3239  			{
  3240  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf)))
  3241  				sum2 = sum2 + adler
  3242  			}
  3243  			{
  3244  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 1)))
  3245  				sum2 = sum2 + adler
  3246  			}
  3247  
  3248  			{
  3249  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 2)))
  3250  				sum2 = sum2 + adler
  3251  			}
  3252  			{
  3253  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 3)))
  3254  				sum2 = sum2 + adler
  3255  			}
  3256  
  3257  			{
  3258  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 4)))
  3259  				sum2 = sum2 + adler
  3260  			}
  3261  			{
  3262  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 5)))
  3263  				sum2 = sum2 + adler
  3264  			}
  3265  
  3266  			{
  3267  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 6)))
  3268  				sum2 = sum2 + adler
  3269  			}
  3270  			{
  3271  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 7)))
  3272  				sum2 = sum2 + adler
  3273  			}
  3274  
  3275  			{
  3276  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 8)))
  3277  				sum2 = sum2 + adler
  3278  			}
  3279  			{
  3280  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 9)))
  3281  				sum2 = sum2 + adler
  3282  			}
  3283  
  3284  			{
  3285  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 10)))
  3286  				sum2 = sum2 + adler
  3287  			}
  3288  			{
  3289  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 11)))
  3290  				sum2 = sum2 + adler
  3291  			}
  3292  
  3293  			{
  3294  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 12)))
  3295  				sum2 = sum2 + adler
  3296  			}
  3297  			{
  3298  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 13)))
  3299  				sum2 = sum2 + adler
  3300  			}
  3301  
  3302  			{
  3303  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 14)))
  3304  				sum2 = sum2 + adler
  3305  			}
  3306  			{
  3307  				adler = adler + ULong(*(*Bytef)(unsafe.Pointer(buf + 15)))
  3308  				sum2 = sum2 + adler
  3309  			}
  3310  
  3311  			buf += uintptr(16)
  3312  		}
  3313  		for libc.PostDecUint32(&len, 1) != 0 {
  3314  			adler = adler + ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))
  3315  			sum2 = sum2 + adler
  3316  		}
  3317  		adler = adler % BASE
  3318  		sum2 = sum2 % BASE
  3319  	}
  3320  
  3321  	// return recombined sums
  3322  	return adler | sum2<<16
  3323  }
  3324  
  3325  // =========================================================================
  3326  func Xadler32(tls *libc.TLS, adler ULong, buf uintptr, len UInt) ULong { /* adler32.c:134:15: */
  3327  	return Xadler32_z(tls, adler, buf, len)
  3328  }
  3329  
  3330  // =========================================================================
  3331  func adler32_combine_(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:143:13: */
  3332  	var sum1 uint32
  3333  	var sum2 uint32
  3334  	var rem uint32
  3335  
  3336  	// for negative len, return invalid adler32 as a clue for debugging
  3337  	if len2 < int64(0) {
  3338  		return 0xffffffff
  3339  	}
  3340  
  3341  	// the derivation of this formula is left as an exercise for the reader
  3342  	len2 = len2 % int64(BASE) // assumes len2 >= 0
  3343  	rem = uint32(len2)
  3344  	sum1 = adler1 & ULong(0xffff)
  3345  	sum2 = uint32(rem) * sum1
  3346  	sum2 = sum2 % BASE
  3347  	sum1 = sum1 + (adler2&ULong(0xffff) + BASE - ULong(1))
  3348  	sum2 = sum2 + (adler1>>16&ULong(0xffff) + adler2>>16&ULong(0xffff) + BASE - ULong(rem))
  3349  	if sum1 >= BASE {
  3350  		sum1 = sum1 - BASE
  3351  	}
  3352  	if sum1 >= BASE {
  3353  		sum1 = sum1 - BASE
  3354  	}
  3355  	if sum2 >= uint32(BASE)<<1 {
  3356  		sum2 = sum2 - uint32(BASE)<<1
  3357  	}
  3358  	if sum2 >= BASE {
  3359  		sum2 = sum2 - BASE
  3360  	}
  3361  	return sum1 | sum2<<16
  3362  }
  3363  
  3364  // =========================================================================
  3365  func Xadler32_combine(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:172:15: */
  3366  	return adler32_combine_(tls, adler1, adler2, len2)
  3367  }
  3368  
  3369  func Xadler32_combine64(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:180:15: */
  3370  	return adler32_combine_(tls, adler1, adler2, len2)
  3371  }
  3372  
  3373  // ===========================================================================
  3374  //      Compresses the source buffer into the destination buffer. The level
  3375  //    parameter has the same meaning as in deflateInit.  sourceLen is the byte
  3376  //    length of the source buffer. Upon entry, destLen is the total size of the
  3377  //    destination buffer, which must be at least 0.1% larger than sourceLen plus
  3378  //    12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
  3379  //
  3380  //      compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
  3381  //    memory, Z_BUF_ERROR if there was not enough room in the output buffer,
  3382  //    Z_STREAM_ERROR if the level parameter is invalid.
  3383  func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong, level int32) int32 { /* compress.c:22:13: */
  3384  	bp := tls.Alloc(56)
  3385  	defer tls.Free(56)
  3386  
  3387  	// var stream Z_stream at bp, 56
  3388  
  3389  	var err int32
  3390  	var max UInt = libc.Uint32(libc.Uint32FromInt32(-1))
  3391  	var left ULong
  3392  
  3393  	left = *(*ULongf)(unsafe.Pointer(destLen))
  3394  	*(*ULongf)(unsafe.Pointer(destLen)) = ULongf(0)
  3395  
  3396  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzalloc = uintptr(0)
  3397  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzfree = uintptr(0)
  3398  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fopaque = uintptr(0)
  3399  
  3400  	err = XdeflateInit_(tls, bp, level, ts, int32(unsafe.Sizeof(Z_stream{})))
  3401  	if err != Z_OK {
  3402  		return err
  3403  	}
  3404  
  3405  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_out = dest
  3406  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = UInt(0)
  3407  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_in = source
  3408  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = UInt(0)
  3409  
  3410  	for ok := true; ok; ok = err == Z_OK {
  3411  		if (*Z_stream)(unsafe.Pointer(bp)).Favail_out == UInt(0) {
  3412  			(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = func() uint32 {
  3413  				if left > ULong(max) {
  3414  					return max
  3415  				}
  3416  				return UInt(left)
  3417  			}()
  3418  			left = left - ULong((*Z_stream)(unsafe.Pointer(bp)).Favail_out)
  3419  		}
  3420  		if (*Z_stream)(unsafe.Pointer(bp)).Favail_in == UInt(0) {
  3421  			(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = func() uint32 {
  3422  				if sourceLen > ULong(max) {
  3423  					return max
  3424  				}
  3425  				return UInt(sourceLen)
  3426  			}()
  3427  			sourceLen = sourceLen - ULong((*Z_stream)(unsafe.Pointer(bp)).Favail_in)
  3428  		}
  3429  		err = Xdeflate(tls, bp, func() int32 {
  3430  			if sourceLen != 0 {
  3431  				return Z_NO_FLUSH
  3432  			}
  3433  			return Z_FINISH
  3434  		}())
  3435  	}
  3436  
  3437  	*(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Ftotal_out
  3438  	XdeflateEnd(tls, bp)
  3439  	if err == Z_STREAM_END {
  3440  		return Z_OK
  3441  	}
  3442  	return err
  3443  }
  3444  
  3445  // ===========================================================================
  3446  func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* compress.c:68:13: */
  3447  	return Xcompress2(tls, dest, destLen, source, sourceLen, -1)
  3448  }
  3449  
  3450  // ===========================================================================
  3451  //      If the default memLevel or windowBits for deflateInit() is changed, then
  3452  //    this function needs to be updated.
  3453  //
  3454  func XcompressBound(tls *libc.TLS, sourceLen ULong) ULong { /* compress.c:81:15: */
  3455  	return sourceLen + sourceLen>>12 + sourceLen>>14 + sourceLen>>25 + ULong(13)
  3456  }
  3457  
  3458  // ========================================================================
  3459  // Tables of CRC-32s of all single-byte values, made by make_crc_table().
  3460  // crc32.h -- tables for rapid CRC calculation
  3461  // Generated automatically by crc32.c
  3462  
  3463  var crc_table = [8][256]Z_crc_t{
  3464  	{
  3465  		0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
  3466  		0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
  3467  		0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
  3468  		0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
  3469  		0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
  3470  		0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
  3471  		0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
  3472  		0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
  3473  		0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
  3474  		0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
  3475  		0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
  3476  		0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
  3477  		0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
  3478  		0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
  3479  		0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
  3480  		0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
  3481  		0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
  3482  		0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
  3483  		0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
  3484  		0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
  3485  		0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
  3486  		0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
  3487  		0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
  3488  		0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
  3489  		0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
  3490  		0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
  3491  		0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
  3492  		0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
  3493  		0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
  3494  		0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
  3495  		0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
  3496  		0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
  3497  		0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
  3498  		0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
  3499  		0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
  3500  		0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
  3501  		0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
  3502  		0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
  3503  		0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
  3504  		0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
  3505  		0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
  3506  		0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
  3507  		0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
  3508  		0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
  3509  		0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
  3510  		0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
  3511  		0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
  3512  		0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
  3513  		0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
  3514  		0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
  3515  		0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
  3516  		0x2d02ef8d,
  3517  	},
  3518  	{
  3519  		0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504,
  3520  		0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49,
  3521  		0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e,
  3522  		0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192,
  3523  		0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859,
  3524  		0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c,
  3525  		0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620,
  3526  		0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265,
  3527  		0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae,
  3528  		0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2,
  3529  		0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175,
  3530  		0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38,
  3531  		0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05,
  3532  		0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40,
  3533  		0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f,
  3534  		0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca,
  3535  		0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850,
  3536  		0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d,
  3537  		0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da,
  3538  		0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864,
  3539  		0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af,
  3540  		0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea,
  3541  		0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74,
  3542  		0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31,
  3543  		0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa,
  3544  		0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a,
  3545  		0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd,
  3546  		0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180,
  3547  		0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a,
  3548  		0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f,
  3549  		0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290,
  3550  		0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5,
  3551  		0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed,
  3552  		0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0,
  3553  		0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167,
  3554  		0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b,
  3555  		0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0,
  3556  		0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5,
  3557  		0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc,
  3558  		0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189,
  3559  		0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842,
  3560  		0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e,
  3561  		0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299,
  3562  		0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4,
  3563  		0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec,
  3564  		0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9,
  3565  		0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66,
  3566  		0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23,
  3567  		0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9,
  3568  		0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4,
  3569  		0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33,
  3570  		0x9324fd72,
  3571  	},
  3572  	{
  3573  		0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc,
  3574  		0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f,
  3575  		0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a,
  3576  		0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29,
  3577  		0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8,
  3578  		0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023,
  3579  		0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e,
  3580  		0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065,
  3581  		0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84,
  3582  		0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7,
  3583  		0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922,
  3584  		0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71,
  3585  		0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0,
  3586  		0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b,
  3587  		0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816,
  3588  		0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd,
  3589  		0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c,
  3590  		0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f,
  3591  		0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba,
  3592  		0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579,
  3593  		0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98,
  3594  		0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873,
  3595  		0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e,
  3596  		0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5,
  3597  		0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134,
  3598  		0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7,
  3599  		0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732,
  3600  		0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461,
  3601  		0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0,
  3602  		0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b,
  3603  		0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26,
  3604  		0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd,
  3605  		0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc,
  3606  		0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef,
  3607  		0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a,
  3608  		0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049,
  3609  		0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8,
  3610  		0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43,
  3611  		0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e,
  3612  		0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5,
  3613  		0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24,
  3614  		0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07,
  3615  		0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982,
  3616  		0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1,
  3617  		0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0,
  3618  		0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b,
  3619  		0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576,
  3620  		0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d,
  3621  		0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c,
  3622  		0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f,
  3623  		0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda,
  3624  		0xbe9834ed,
  3625  	},
  3626  	{
  3627  		0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757,
  3628  		0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a,
  3629  		0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733,
  3630  		0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871,
  3631  		0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70,
  3632  		0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42,
  3633  		0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5,
  3634  		0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787,
  3635  		0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086,
  3636  		0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4,
  3637  		0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d,
  3638  		0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0,
  3639  		0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d,
  3640  		0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f,
  3641  		0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859,
  3642  		0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b,
  3643  		0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5,
  3644  		0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028,
  3645  		0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891,
  3646  		0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed,
  3647  		0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec,
  3648  		0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde,
  3649  		0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817,
  3650  		0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825,
  3651  		0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24,
  3652  		0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e,
  3653  		0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7,
  3654  		0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a,
  3655  		0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4,
  3656  		0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196,
  3657  		0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0,
  3658  		0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2,
  3659  		0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52,
  3660  		0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f,
  3661  		0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36,
  3662  		0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174,
  3663  		0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675,
  3664  		0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647,
  3665  		0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d,
  3666  		0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf,
  3667  		0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be,
  3668  		0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc,
  3669  		0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645,
  3670  		0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98,
  3671  		0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138,
  3672  		0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a,
  3673  		0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c,
  3674  		0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e,
  3675  		0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0,
  3676  		0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d,
  3677  		0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194,
  3678  		0xde0506f1,
  3679  	},
  3680  	{
  3681  		0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07,
  3682  		0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79,
  3683  		0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7,
  3684  		0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84,
  3685  		0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13,
  3686  		0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663,
  3687  		0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5,
  3688  		0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5,
  3689  		0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832,
  3690  		0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51,
  3691  		0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf,
  3692  		0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1,
  3693  		0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76,
  3694  		0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606,
  3695  		0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996,
  3696  		0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6,
  3697  		0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c,
  3698  		0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712,
  3699  		0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c,
  3700  		0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4,
  3701  		0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943,
  3702  		0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333,
  3703  		0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe,
  3704  		0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce,
  3705  		0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359,
  3706  		0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a,
  3707  		0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04,
  3708  		0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a,
  3709  		0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0,
  3710  		0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580,
  3711  		0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10,
  3712  		0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060,
  3713  		0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1,
  3714  		0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf,
  3715  		0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31,
  3716  		0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852,
  3717  		0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5,
  3718  		0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5,
  3719  		0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75,
  3720  		0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005,
  3721  		0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292,
  3722  		0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1,
  3723  		0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f,
  3724  		0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111,
  3725  		0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0,
  3726  		0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0,
  3727  		0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40,
  3728  		0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530,
  3729  		0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba,
  3730  		0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4,
  3731  		0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a,
  3732  		0x8def022d,
  3733  	},
  3734  	{
  3735  		0x00000000, 0x41311b19, 0x82623632, 0xc3532d2b, 0x04c56c64,
  3736  		0x45f4777d, 0x86a75a56, 0xc796414f, 0x088ad9c8, 0x49bbc2d1,
  3737  		0x8ae8effa, 0xcbd9f4e3, 0x0c4fb5ac, 0x4d7eaeb5, 0x8e2d839e,
  3738  		0xcf1c9887, 0x5112c24a, 0x1023d953, 0xd370f478, 0x9241ef61,
  3739  		0x55d7ae2e, 0x14e6b537, 0xd7b5981c, 0x96848305, 0x59981b82,
  3740  		0x18a9009b, 0xdbfa2db0, 0x9acb36a9, 0x5d5d77e6, 0x1c6c6cff,
  3741  		0xdf3f41d4, 0x9e0e5acd, 0xa2248495, 0xe3159f8c, 0x2046b2a7,
  3742  		0x6177a9be, 0xa6e1e8f1, 0xe7d0f3e8, 0x2483dec3, 0x65b2c5da,
  3743  		0xaaae5d5d, 0xeb9f4644, 0x28cc6b6f, 0x69fd7076, 0xae6b3139,
  3744  		0xef5a2a20, 0x2c09070b, 0x6d381c12, 0xf33646df, 0xb2075dc6,
  3745  		0x715470ed, 0x30656bf4, 0xf7f32abb, 0xb6c231a2, 0x75911c89,
  3746  		0x34a00790, 0xfbbc9f17, 0xba8d840e, 0x79dea925, 0x38efb23c,
  3747  		0xff79f373, 0xbe48e86a, 0x7d1bc541, 0x3c2ade58, 0x054f79f0,
  3748  		0x447e62e9, 0x872d4fc2, 0xc61c54db, 0x018a1594, 0x40bb0e8d,
  3749  		0x83e823a6, 0xc2d938bf, 0x0dc5a038, 0x4cf4bb21, 0x8fa7960a,
  3750  		0xce968d13, 0x0900cc5c, 0x4831d745, 0x8b62fa6e, 0xca53e177,
  3751  		0x545dbbba, 0x156ca0a3, 0xd63f8d88, 0x970e9691, 0x5098d7de,
  3752  		0x11a9ccc7, 0xd2fae1ec, 0x93cbfaf5, 0x5cd76272, 0x1de6796b,
  3753  		0xdeb55440, 0x9f844f59, 0x58120e16, 0x1923150f, 0xda703824,
  3754  		0x9b41233d, 0xa76bfd65, 0xe65ae67c, 0x2509cb57, 0x6438d04e,
  3755  		0xa3ae9101, 0xe29f8a18, 0x21cca733, 0x60fdbc2a, 0xafe124ad,
  3756  		0xeed03fb4, 0x2d83129f, 0x6cb20986, 0xab2448c9, 0xea1553d0,
  3757  		0x29467efb, 0x687765e2, 0xf6793f2f, 0xb7482436, 0x741b091d,
  3758  		0x352a1204, 0xf2bc534b, 0xb38d4852, 0x70de6579, 0x31ef7e60,
  3759  		0xfef3e6e7, 0xbfc2fdfe, 0x7c91d0d5, 0x3da0cbcc, 0xfa368a83,
  3760  		0xbb07919a, 0x7854bcb1, 0x3965a7a8, 0x4b98833b, 0x0aa99822,
  3761  		0xc9fab509, 0x88cbae10, 0x4f5def5f, 0x0e6cf446, 0xcd3fd96d,
  3762  		0x8c0ec274, 0x43125af3, 0x022341ea, 0xc1706cc1, 0x804177d8,
  3763  		0x47d73697, 0x06e62d8e, 0xc5b500a5, 0x84841bbc, 0x1a8a4171,
  3764  		0x5bbb5a68, 0x98e87743, 0xd9d96c5a, 0x1e4f2d15, 0x5f7e360c,
  3765  		0x9c2d1b27, 0xdd1c003e, 0x120098b9, 0x533183a0, 0x9062ae8b,
  3766  		0xd153b592, 0x16c5f4dd, 0x57f4efc4, 0x94a7c2ef, 0xd596d9f6,
  3767  		0xe9bc07ae, 0xa88d1cb7, 0x6bde319c, 0x2aef2a85, 0xed796bca,
  3768  		0xac4870d3, 0x6f1b5df8, 0x2e2a46e1, 0xe136de66, 0xa007c57f,
  3769  		0x6354e854, 0x2265f34d, 0xe5f3b202, 0xa4c2a91b, 0x67918430,
  3770  		0x26a09f29, 0xb8aec5e4, 0xf99fdefd, 0x3accf3d6, 0x7bfde8cf,
  3771  		0xbc6ba980, 0xfd5ab299, 0x3e099fb2, 0x7f3884ab, 0xb0241c2c,
  3772  		0xf1150735, 0x32462a1e, 0x73773107, 0xb4e17048, 0xf5d06b51,
  3773  		0x3683467a, 0x77b25d63, 0x4ed7facb, 0x0fe6e1d2, 0xccb5ccf9,
  3774  		0x8d84d7e0, 0x4a1296af, 0x0b238db6, 0xc870a09d, 0x8941bb84,
  3775  		0x465d2303, 0x076c381a, 0xc43f1531, 0x850e0e28, 0x42984f67,
  3776  		0x03a9547e, 0xc0fa7955, 0x81cb624c, 0x1fc53881, 0x5ef42398,
  3777  		0x9da70eb3, 0xdc9615aa, 0x1b0054e5, 0x5a314ffc, 0x996262d7,
  3778  		0xd85379ce, 0x174fe149, 0x567efa50, 0x952dd77b, 0xd41ccc62,
  3779  		0x138a8d2d, 0x52bb9634, 0x91e8bb1f, 0xd0d9a006, 0xecf37e5e,
  3780  		0xadc26547, 0x6e91486c, 0x2fa05375, 0xe836123a, 0xa9070923,
  3781  		0x6a542408, 0x2b653f11, 0xe479a796, 0xa548bc8f, 0x661b91a4,
  3782  		0x272a8abd, 0xe0bccbf2, 0xa18dd0eb, 0x62defdc0, 0x23efe6d9,
  3783  		0xbde1bc14, 0xfcd0a70d, 0x3f838a26, 0x7eb2913f, 0xb924d070,
  3784  		0xf815cb69, 0x3b46e642, 0x7a77fd5b, 0xb56b65dc, 0xf45a7ec5,
  3785  		0x370953ee, 0x763848f7, 0xb1ae09b8, 0xf09f12a1, 0x33cc3f8a,
  3786  		0x72fd2493,
  3787  	},
  3788  	{
  3789  		0x00000000, 0x376ac201, 0x6ed48403, 0x59be4602, 0xdca80907,
  3790  		0xebc2cb06, 0xb27c8d04, 0x85164f05, 0xb851130e, 0x8f3bd10f,
  3791  		0xd685970d, 0xe1ef550c, 0x64f91a09, 0x5393d808, 0x0a2d9e0a,
  3792  		0x3d475c0b, 0x70a3261c, 0x47c9e41d, 0x1e77a21f, 0x291d601e,
  3793  		0xac0b2f1b, 0x9b61ed1a, 0xc2dfab18, 0xf5b56919, 0xc8f23512,
  3794  		0xff98f713, 0xa626b111, 0x914c7310, 0x145a3c15, 0x2330fe14,
  3795  		0x7a8eb816, 0x4de47a17, 0xe0464d38, 0xd72c8f39, 0x8e92c93b,
  3796  		0xb9f80b3a, 0x3cee443f, 0x0b84863e, 0x523ac03c, 0x6550023d,
  3797  		0x58175e36, 0x6f7d9c37, 0x36c3da35, 0x01a91834, 0x84bf5731,
  3798  		0xb3d59530, 0xea6bd332, 0xdd011133, 0x90e56b24, 0xa78fa925,
  3799  		0xfe31ef27, 0xc95b2d26, 0x4c4d6223, 0x7b27a022, 0x2299e620,
  3800  		0x15f32421, 0x28b4782a, 0x1fdeba2b, 0x4660fc29, 0x710a3e28,
  3801  		0xf41c712d, 0xc376b32c, 0x9ac8f52e, 0xada2372f, 0xc08d9a70,
  3802  		0xf7e75871, 0xae591e73, 0x9933dc72, 0x1c259377, 0x2b4f5176,
  3803  		0x72f11774, 0x459bd575, 0x78dc897e, 0x4fb64b7f, 0x16080d7d,
  3804  		0x2162cf7c, 0xa4748079, 0x931e4278, 0xcaa0047a, 0xfdcac67b,
  3805  		0xb02ebc6c, 0x87447e6d, 0xdefa386f, 0xe990fa6e, 0x6c86b56b,
  3806  		0x5bec776a, 0x02523168, 0x3538f369, 0x087faf62, 0x3f156d63,
  3807  		0x66ab2b61, 0x51c1e960, 0xd4d7a665, 0xe3bd6464, 0xba032266,
  3808  		0x8d69e067, 0x20cbd748, 0x17a11549, 0x4e1f534b, 0x7975914a,
  3809  		0xfc63de4f, 0xcb091c4e, 0x92b75a4c, 0xa5dd984d, 0x989ac446,
  3810  		0xaff00647, 0xf64e4045, 0xc1248244, 0x4432cd41, 0x73580f40,
  3811  		0x2ae64942, 0x1d8c8b43, 0x5068f154, 0x67023355, 0x3ebc7557,
  3812  		0x09d6b756, 0x8cc0f853, 0xbbaa3a52, 0xe2147c50, 0xd57ebe51,
  3813  		0xe839e25a, 0xdf53205b, 0x86ed6659, 0xb187a458, 0x3491eb5d,
  3814  		0x03fb295c, 0x5a456f5e, 0x6d2fad5f, 0x801b35e1, 0xb771f7e0,
  3815  		0xeecfb1e2, 0xd9a573e3, 0x5cb33ce6, 0x6bd9fee7, 0x3267b8e5,
  3816  		0x050d7ae4, 0x384a26ef, 0x0f20e4ee, 0x569ea2ec, 0x61f460ed,
  3817  		0xe4e22fe8, 0xd388ede9, 0x8a36abeb, 0xbd5c69ea, 0xf0b813fd,
  3818  		0xc7d2d1fc, 0x9e6c97fe, 0xa90655ff, 0x2c101afa, 0x1b7ad8fb,
  3819  		0x42c49ef9, 0x75ae5cf8, 0x48e900f3, 0x7f83c2f2, 0x263d84f0,
  3820  		0x115746f1, 0x944109f4, 0xa32bcbf5, 0xfa958df7, 0xcdff4ff6,
  3821  		0x605d78d9, 0x5737bad8, 0x0e89fcda, 0x39e33edb, 0xbcf571de,
  3822  		0x8b9fb3df, 0xd221f5dd, 0xe54b37dc, 0xd80c6bd7, 0xef66a9d6,
  3823  		0xb6d8efd4, 0x81b22dd5, 0x04a462d0, 0x33cea0d1, 0x6a70e6d3,
  3824  		0x5d1a24d2, 0x10fe5ec5, 0x27949cc4, 0x7e2adac6, 0x494018c7,
  3825  		0xcc5657c2, 0xfb3c95c3, 0xa282d3c1, 0x95e811c0, 0xa8af4dcb,
  3826  		0x9fc58fca, 0xc67bc9c8, 0xf1110bc9, 0x740744cc, 0x436d86cd,
  3827  		0x1ad3c0cf, 0x2db902ce, 0x4096af91, 0x77fc6d90, 0x2e422b92,
  3828  		0x1928e993, 0x9c3ea696, 0xab546497, 0xf2ea2295, 0xc580e094,
  3829  		0xf8c7bc9f, 0xcfad7e9e, 0x9613389c, 0xa179fa9d, 0x246fb598,
  3830  		0x13057799, 0x4abb319b, 0x7dd1f39a, 0x3035898d, 0x075f4b8c,
  3831  		0x5ee10d8e, 0x698bcf8f, 0xec9d808a, 0xdbf7428b, 0x82490489,
  3832  		0xb523c688, 0x88649a83, 0xbf0e5882, 0xe6b01e80, 0xd1dadc81,
  3833  		0x54cc9384, 0x63a65185, 0x3a181787, 0x0d72d586, 0xa0d0e2a9,
  3834  		0x97ba20a8, 0xce0466aa, 0xf96ea4ab, 0x7c78ebae, 0x4b1229af,
  3835  		0x12ac6fad, 0x25c6adac, 0x1881f1a7, 0x2feb33a6, 0x765575a4,
  3836  		0x413fb7a5, 0xc429f8a0, 0xf3433aa1, 0xaafd7ca3, 0x9d97bea2,
  3837  		0xd073c4b5, 0xe71906b4, 0xbea740b6, 0x89cd82b7, 0x0cdbcdb2,
  3838  		0x3bb10fb3, 0x620f49b1, 0x55658bb0, 0x6822d7bb, 0x5f4815ba,
  3839  		0x06f653b8, 0x319c91b9, 0xb48adebc, 0x83e01cbd, 0xda5e5abf,
  3840  		0xed3498be,
  3841  	},
  3842  	{
  3843  		0x00000000, 0x6567bcb8, 0x8bc809aa, 0xeeafb512, 0x5797628f,
  3844  		0x32f0de37, 0xdc5f6b25, 0xb938d79d, 0xef28b4c5, 0x8a4f087d,
  3845  		0x64e0bd6f, 0x018701d7, 0xb8bfd64a, 0xddd86af2, 0x3377dfe0,
  3846  		0x56106358, 0x9f571950, 0xfa30a5e8, 0x149f10fa, 0x71f8ac42,
  3847  		0xc8c07bdf, 0xada7c767, 0x43087275, 0x266fcecd, 0x707fad95,
  3848  		0x1518112d, 0xfbb7a43f, 0x9ed01887, 0x27e8cf1a, 0x428f73a2,
  3849  		0xac20c6b0, 0xc9477a08, 0x3eaf32a0, 0x5bc88e18, 0xb5673b0a,
  3850  		0xd00087b2, 0x6938502f, 0x0c5fec97, 0xe2f05985, 0x8797e53d,
  3851  		0xd1878665, 0xb4e03add, 0x5a4f8fcf, 0x3f283377, 0x8610e4ea,
  3852  		0xe3775852, 0x0dd8ed40, 0x68bf51f8, 0xa1f82bf0, 0xc49f9748,
  3853  		0x2a30225a, 0x4f579ee2, 0xf66f497f, 0x9308f5c7, 0x7da740d5,
  3854  		0x18c0fc6d, 0x4ed09f35, 0x2bb7238d, 0xc518969f, 0xa07f2a27,
  3855  		0x1947fdba, 0x7c204102, 0x928ff410, 0xf7e848a8, 0x3d58149b,
  3856  		0x583fa823, 0xb6901d31, 0xd3f7a189, 0x6acf7614, 0x0fa8caac,
  3857  		0xe1077fbe, 0x8460c306, 0xd270a05e, 0xb7171ce6, 0x59b8a9f4,
  3858  		0x3cdf154c, 0x85e7c2d1, 0xe0807e69, 0x0e2fcb7b, 0x6b4877c3,
  3859  		0xa20f0dcb, 0xc768b173, 0x29c70461, 0x4ca0b8d9, 0xf5986f44,
  3860  		0x90ffd3fc, 0x7e5066ee, 0x1b37da56, 0x4d27b90e, 0x284005b6,
  3861  		0xc6efb0a4, 0xa3880c1c, 0x1ab0db81, 0x7fd76739, 0x9178d22b,
  3862  		0xf41f6e93, 0x03f7263b, 0x66909a83, 0x883f2f91, 0xed589329,
  3863  		0x546044b4, 0x3107f80c, 0xdfa84d1e, 0xbacff1a6, 0xecdf92fe,
  3864  		0x89b82e46, 0x67179b54, 0x027027ec, 0xbb48f071, 0xde2f4cc9,
  3865  		0x3080f9db, 0x55e74563, 0x9ca03f6b, 0xf9c783d3, 0x176836c1,
  3866  		0x720f8a79, 0xcb375de4, 0xae50e15c, 0x40ff544e, 0x2598e8f6,
  3867  		0x73888bae, 0x16ef3716, 0xf8408204, 0x9d273ebc, 0x241fe921,
  3868  		0x41785599, 0xafd7e08b, 0xcab05c33, 0x3bb659ed, 0x5ed1e555,
  3869  		0xb07e5047, 0xd519ecff, 0x6c213b62, 0x094687da, 0xe7e932c8,
  3870  		0x828e8e70, 0xd49eed28, 0xb1f95190, 0x5f56e482, 0x3a31583a,
  3871  		0x83098fa7, 0xe66e331f, 0x08c1860d, 0x6da63ab5, 0xa4e140bd,
  3872  		0xc186fc05, 0x2f294917, 0x4a4ef5af, 0xf3762232, 0x96119e8a,
  3873  		0x78be2b98, 0x1dd99720, 0x4bc9f478, 0x2eae48c0, 0xc001fdd2,
  3874  		0xa566416a, 0x1c5e96f7, 0x79392a4f, 0x97969f5d, 0xf2f123e5,
  3875  		0x05196b4d, 0x607ed7f5, 0x8ed162e7, 0xebb6de5f, 0x528e09c2,
  3876  		0x37e9b57a, 0xd9460068, 0xbc21bcd0, 0xea31df88, 0x8f566330,
  3877  		0x61f9d622, 0x049e6a9a, 0xbda6bd07, 0xd8c101bf, 0x366eb4ad,
  3878  		0x53090815, 0x9a4e721d, 0xff29cea5, 0x11867bb7, 0x74e1c70f,
  3879  		0xcdd91092, 0xa8beac2a, 0x46111938, 0x2376a580, 0x7566c6d8,
  3880  		0x10017a60, 0xfeaecf72, 0x9bc973ca, 0x22f1a457, 0x479618ef,
  3881  		0xa939adfd, 0xcc5e1145, 0x06ee4d76, 0x6389f1ce, 0x8d2644dc,
  3882  		0xe841f864, 0x51792ff9, 0x341e9341, 0xdab12653, 0xbfd69aeb,
  3883  		0xe9c6f9b3, 0x8ca1450b, 0x620ef019, 0x07694ca1, 0xbe519b3c,
  3884  		0xdb362784, 0x35999296, 0x50fe2e2e, 0x99b95426, 0xfcdee89e,
  3885  		0x12715d8c, 0x7716e134, 0xce2e36a9, 0xab498a11, 0x45e63f03,
  3886  		0x208183bb, 0x7691e0e3, 0x13f65c5b, 0xfd59e949, 0x983e55f1,
  3887  		0x2106826c, 0x44613ed4, 0xaace8bc6, 0xcfa9377e, 0x38417fd6,
  3888  		0x5d26c36e, 0xb389767c, 0xd6eecac4, 0x6fd61d59, 0x0ab1a1e1,
  3889  		0xe41e14f3, 0x8179a84b, 0xd769cb13, 0xb20e77ab, 0x5ca1c2b9,
  3890  		0x39c67e01, 0x80fea99c, 0xe5991524, 0x0b36a036, 0x6e511c8e,
  3891  		0xa7166686, 0xc271da3e, 0x2cde6f2c, 0x49b9d394, 0xf0810409,
  3892  		0x95e6b8b1, 0x7b490da3, 0x1e2eb11b, 0x483ed243, 0x2d596efb,
  3893  		0xc3f6dbe9, 0xa6916751, 0x1fa9b0cc, 0x7ace0c74, 0x9461b966,
  3894  		0xf10605de,
  3895  	},
  3896  } /* crc32.h:5:25 */
  3897  
  3898  // =========================================================================
  3899  // This function can be used by asm versions of crc32()
  3900  func Xget_crc_table(tls *libc.TLS) uintptr { /* crc32.c:188:19: */
  3901  	return uintptr(uintptr(unsafe.Pointer(&crc_table)))
  3902  }
  3903  
  3904  // =========================================================================
  3905  
  3906  // =========================================================================
  3907  func Xcrc32_z(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:202:23: */
  3908  	bp := tls.Alloc(4)
  3909  	defer tls.Free(4)
  3910  
  3911  	if buf == uintptr(Z_NULL) {
  3912  		return 0
  3913  	}
  3914  
  3915  	if uint32(unsafe.Sizeof(uintptr(0))) == uint32(unsafe.Sizeof(Ptrdiff_t(0))) {
  3916  		// var endian Z_crc_t at bp, 4
  3917  
  3918  		*(*Z_crc_t)(unsafe.Pointer(bp /* endian */)) = Z_crc_t(1)
  3919  		if *(*uint8)(unsafe.Pointer(bp)) != 0 {
  3920  			return crc32_little(tls, crc, buf, len)
  3921  		} else {
  3922  			return crc32_big(tls, crc, buf, len)
  3923  		}
  3924  	}
  3925  	crc = crc ^ 0xffffffff
  3926  	for len >= Z_size_t(8) {
  3927  		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
  3928  		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
  3929  		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
  3930  		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
  3931  		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
  3932  		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
  3933  		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
  3934  		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
  3935  		len = len - Z_size_t(8)
  3936  	}
  3937  	if len != 0 {
  3938  		for ok := true; ok; ok = libc.PreDecUint32(&len, 1) != 0 {
  3939  			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
  3940  		}
  3941  	}
  3942  	return crc ^ 0xffffffff
  3943  }
  3944  
  3945  // =========================================================================
  3946  func Xcrc32(tls *libc.TLS, crc uint32, buf uintptr, len UInt) uint32 { /* crc32.c:237:23: */
  3947  	return Xcrc32_z(tls, crc, buf, len)
  3948  }
  3949  
  3950  //
  3951  //    This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit
  3952  //    integer pointer type. This violates the strict aliasing rule, where a
  3953  //    compiler can assume, for optimization purposes, that two pointers to
  3954  //    fundamentally different types won't ever point to the same memory. This can
  3955  //    manifest as a problem only if one of the pointers is written to. This code
  3956  //    only reads from those pointers. So long as this code remains isolated in
  3957  //    this compilation unit, there won't be a problem. For this reason, this code
  3958  //    should not be copied and pasted into a compilation unit in which other code
  3959  //    writes to the buffer that is passed to these routines.
  3960  //
  3961  
  3962  // =========================================================================
  3963  
  3964  // =========================================================================
  3965  func crc32_little(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:266:21: */
  3966  	var c Z_crc_t
  3967  	var buf4 uintptr
  3968  
  3969  	c = Z_crc_t(crc)
  3970  	c = ^c
  3971  	for len != 0 && Ptrdiff_t(buf)&3 != 0 {
  3972  		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
  3973  		len--
  3974  	}
  3975  
  3976  	buf4 = buf
  3977  	for len >= Z_size_t(32) {
  3978  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3979  		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))
  3980  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3981  		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))
  3982  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3983  		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))
  3984  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3985  		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))
  3986  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3987  		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))
  3988  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3989  		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))
  3990  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3991  		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))
  3992  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  3993  		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))
  3994  		len = len - Z_size_t(32)
  3995  	}
  3996  	for len >= Z_size_t(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)) + 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))
  3999  		len = len - Z_size_t(4)
  4000  	}
  4001  	buf = buf4
  4002  
  4003  	if len != 0 {
  4004  		for ok := true; ok; ok = libc.PreDecUint32(&len, 1) != 0 {
  4005  			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
  4006  		}
  4007  	}
  4008  	c = ^c
  4009  	return uint32(c)
  4010  }
  4011  
  4012  // =========================================================================
  4013  
  4014  // =========================================================================
  4015  func crc32_big(tls *libc.TLS, crc uint32, buf uintptr, len Z_size_t) uint32 { /* crc32.c:306:21: */
  4016  	var c Z_crc_t
  4017  	var buf4 uintptr
  4018  
  4019  	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
  4020  	c = ^c
  4021  	for len != 0 && Ptrdiff_t(buf)&3 != 0 {
  4022  		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
  4023  		len--
  4024  	}
  4025  
  4026  	buf4 = buf
  4027  	for len >= Z_size_t(32) {
  4028  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4029  		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))
  4030  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4031  		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))
  4032  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4033  		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))
  4034  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4035  		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))
  4036  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4037  		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))
  4038  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4039  		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))
  4040  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4041  		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))
  4042  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4043  		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))
  4044  		len = len - Z_size_t(32)
  4045  	}
  4046  	for len >= Z_size_t(4) {
  4047  		c = c ^ *(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4)))
  4048  		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))
  4049  		len = len - Z_size_t(4)
  4050  	}
  4051  	buf = buf4
  4052  
  4053  	if len != 0 {
  4054  		for ok := true; ok; ok = libc.PreDecUint32(&len, 1) != 0 {
  4055  			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
  4056  		}
  4057  	}
  4058  	c = ^c
  4059  	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)
  4060  }
  4061  
  4062  // =========================================================================
  4063  func gf2_matrix_times(tls *libc.TLS, mat uintptr, vec uint32) uint32 { /* crc32.c:344:21: */
  4064  	var sum uint32
  4065  
  4066  	sum = uint32(0)
  4067  	for vec != 0 {
  4068  		if vec&uint32(1) != 0 {
  4069  			sum = sum ^ *(*uint32)(unsafe.Pointer(mat))
  4070  		}
  4071  		vec >>= 1
  4072  		mat += 4
  4073  	}
  4074  	return sum
  4075  }
  4076  
  4077  // =========================================================================
  4078  func gf2_matrix_square(tls *libc.TLS, square uintptr, mat uintptr) { /* crc32.c:361:12: */
  4079  	var n int32
  4080  
  4081  	for n = 0; n < GF2_DIM; n++ {
  4082  		*(*uint32)(unsafe.Pointer(square + uintptr(n)*4)) = gf2_matrix_times(tls, mat, *(*uint32)(unsafe.Pointer(mat + uintptr(n)*4)))
  4083  	}
  4084  }
  4085  
  4086  // =========================================================================
  4087  func crc32_combine_(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:372:13: */
  4088  	bp := tls.Alloc(256)
  4089  	defer tls.Free(256)
  4090  
  4091  	var n int32
  4092  	var row uint32
  4093  	// var even [32]uint32 at bp+128, 128
  4094  	// even-power-of-two zeros operator
  4095  	// var odd [32]uint32 at bp, 128
  4096  	// odd-power-of-two zeros operator
  4097  
  4098  	// degenerate case (also disallow negative lengths)
  4099  	if len2 <= int64(0) {
  4100  		return crc1
  4101  	}
  4102  
  4103  	// put operator for one zero bit in odd
  4104  	*(*uint32)(unsafe.Pointer(bp)) = 0xedb88320 // CRC-32 polynomial
  4105  	row = uint32(1)
  4106  	for n = 1; n < GF2_DIM; n++ {
  4107  		*(*uint32)(unsafe.Pointer(bp + uintptr(n)*4)) = row
  4108  		row <<= 1
  4109  	}
  4110  
  4111  	// put operator for two zero bits in even
  4112  	gf2_matrix_square(tls, bp+128, bp)
  4113  
  4114  	// put operator for four zero bits in odd
  4115  	gf2_matrix_square(tls, bp, bp+128)
  4116  
  4117  	// apply len2 zeros to crc1 (first square will put the operator for one
  4118  	//        zero byte, eight zero bits, in even)
  4119  	for ok := true; ok; ok = len2 != int64(0) {
  4120  		// apply zeros operator for this bit of len2
  4121  		gf2_matrix_square(tls, bp+128, bp)
  4122  		if len2&int64(1) != 0 {
  4123  			crc1 = gf2_matrix_times(tls, bp+128, crc1)
  4124  		}
  4125  		len2 >>= 1
  4126  
  4127  		// if no more bits set, then done
  4128  		if len2 == int64(0) {
  4129  			break
  4130  		}
  4131  
  4132  		// another iteration of the loop with odd and even swapped
  4133  		gf2_matrix_square(tls, bp, bp+128)
  4134  		if len2&int64(1) != 0 {
  4135  			crc1 = gf2_matrix_times(tls, bp, crc1)
  4136  		}
  4137  		len2 >>= 1
  4138  
  4139  		// if no more bits set, then done
  4140  	}
  4141  
  4142  	// return combined crc
  4143  	crc1 = crc1 ^ crc2
  4144  	return crc1
  4145  }
  4146  
  4147  // =========================================================================
  4148  func Xcrc32_combine(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:428:15: */
  4149  	return crc32_combine_(tls, crc1, crc2, len2)
  4150  }
  4151  
  4152  func Xcrc32_combine64(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:436:15: */
  4153  	return crc32_combine_(tls, crc1, crc2, len2)
  4154  }
  4155  
  4156  // Reverse the bytes in a 32-bit value
  4157  
  4158  // define NO_GZIP when compiling if you want to disable gzip header and
  4159  //    trailer creation by deflate().  NO_GZIP would be used to avoid linking in
  4160  //    the crc code when it is not needed.  For shared libraries, gzip encoding
  4161  //    should be left enabled.
  4162  
  4163  // ===========================================================================
  4164  // Internal compression state.
  4165  
  4166  // number of length codes, not counting the special END_BLOCK code
  4167  
  4168  // number of literal bytes 0..255
  4169  
  4170  // number of Literal or Length codes, including the END_BLOCK code
  4171  
  4172  // number of distance codes
  4173  
  4174  // number of codes used to transfer the bit lengths
  4175  
  4176  // maximum heap size
  4177  
  4178  // All codes must not exceed MAX_BITS bits
  4179  
  4180  // size of bit buffer in bi_buf
  4181  
  4182  // Stream status
  4183  
  4184  // Data structure describing a single value and its code string.
  4185  type Ct_data_s = struct {
  4186  	Ffc struct{ Ffreq Ush }
  4187  	Fdl struct{ Fdad Ush }
  4188  } /* zlib.h:84:1 */
  4189  
  4190  // Reverse the bytes in a 32-bit value
  4191  
  4192  // define NO_GZIP when compiling if you want to disable gzip header and
  4193  //    trailer creation by deflate().  NO_GZIP would be used to avoid linking in
  4194  //    the crc code when it is not needed.  For shared libraries, gzip encoding
  4195  //    should be left enabled.
  4196  
  4197  // ===========================================================================
  4198  // Internal compression state.
  4199  
  4200  // number of length codes, not counting the special END_BLOCK code
  4201  
  4202  // number of literal bytes 0..255
  4203  
  4204  // number of Literal or Length codes, including the END_BLOCK code
  4205  
  4206  // number of distance codes
  4207  
  4208  // number of codes used to transfer the bit lengths
  4209  
  4210  // maximum heap size
  4211  
  4212  // All codes must not exceed MAX_BITS bits
  4213  
  4214  // size of bit buffer in bi_buf
  4215  
  4216  // Stream status
  4217  
  4218  // Data structure describing a single value and its code string.
  4219  type Ct_data = Ct_data_s /* deflate.h:77:7 */
  4220  
  4221  type Static_tree_desc_s = struct {
  4222  	Fstatic_tree uintptr
  4223  	Fextra_bits  uintptr
  4224  	Fextra_base  int32
  4225  	Felems       int32
  4226  	Fmax_length  int32
  4227  } /* deflate.h:84:9 */
  4228  
  4229  type Tree_desc_s = struct {
  4230  	Fdyn_tree  uintptr
  4231  	Fmax_code  int32
  4232  	Fstat_desc uintptr
  4233  } /* zlib.h:84:1 */
  4234  
  4235  type Tree_desc = Tree_desc_s /* deflate.h:90:7 */
  4236  
  4237  type Pos = Ush     /* deflate.h:92:13 */
  4238  type Posf = Pos    /* deflate.h:93:17 */
  4239  type IPos = uint32 /* deflate.h:94:18 */
  4240  
  4241  // A Pos is an index in the character window. We use short instead of int to
  4242  // save space in the various tables. IPos is used only for parameter passing.
  4243  
  4244  type Deflate_state = Internal_state /* deflate.h:276:7 */
  4245  
  4246  var Xdeflate_copyright = *(*[69]int8)(unsafe.Pointer(ts + 7)) /* deflate.c:54:12 */
  4247  //
  4248  //   If you use the zlib library in a product, an acknowledgment is welcome
  4249  //   in the documentation of your product. If for some reason you cannot
  4250  //   include such an acknowledgment, I would appreciate that you keep this
  4251  //   copyright string in the executable of your product.
  4252  //
  4253  
  4254  // ===========================================================================
  4255  //  Function prototypes.
  4256  type Block_state = uint32 /* deflate.c:71:3 */
  4257  
  4258  type Compress_func = uintptr /* deflate.c:73:21 */
  4259  
  4260  // ===========================================================================
  4261  // Local data
  4262  
  4263  // Tail of hash chains
  4264  
  4265  // Matches of length 3 are discarded if their distance exceeds TOO_FAR
  4266  
  4267  // Values for max_lazy_match, good_match and max_chain_length, depending on
  4268  // the desired pack level (0..9). The values given below have been tuned to
  4269  // exclude worst case performance for pathological files. Better values may be
  4270  // found for specific files.
  4271  type Config_s = struct {
  4272  	Fgood_length Ush
  4273  	Fmax_lazy    Ush
  4274  	Fnice_length Ush
  4275  	Fmax_chain   Ush
  4276  	Ffunc        Compress_func
  4277  } /* deflate.c:120:9 */
  4278  
  4279  // ===========================================================================
  4280  // Local data
  4281  
  4282  // Tail of hash chains
  4283  
  4284  // Matches of length 3 are discarded if their distance exceeds TOO_FAR
  4285  
  4286  // Values for max_lazy_match, good_match and max_chain_length, depending on
  4287  // the desired pack level (0..9). The values given below have been tuned to
  4288  // exclude worst case performance for pathological files. Better values may be
  4289  // found for specific files.
  4290  type Config = Config_s /* deflate.c:126:3 */
  4291  
  4292  var configuration_table = [10]Config{
  4293  	//      good lazy nice chain
  4294  	/* 0 */ {Ffunc: 0}, // store only
  4295  	/* 1 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(8), Fmax_chain: Ush(4), Ffunc: 0}, // max speed, no lazy matches
  4296  	/* 2 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(5), Fnice_length: Ush(16), Fmax_chain: Ush(8), Ffunc: 0},
  4297  	/* 3 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(6), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0},
  4298  
  4299  	/* 4 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(16), Fmax_chain: Ush(16), Ffunc: 0}, // lazy matches
  4300  	/* 5 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0},
  4301  	/* 6 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(128), Fmax_chain: Ush(128), Ffunc: 0},
  4302  	/* 7 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(32), Fnice_length: Ush(128), Fmax_chain: Ush(256), Ffunc: 0},
  4303  	/* 8 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(128), Fnice_length: Ush(258), Fmax_chain: Ush(1024), Ffunc: 0},
  4304  	/* 9 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(258), Fnice_length: Ush(258), Fmax_chain: Ush(4096), Ffunc: 0}} /* deflate.c:134:20 */
  4305  
  4306  // max compression
  4307  
  4308  // Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
  4309  // For deflate_fast() (levels <= 3) good is ignored and lazy has a different
  4310  // meaning.
  4311  
  4312  // rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH
  4313  
  4314  // ===========================================================================
  4315  // Update a hash value with the given input byte
  4316  // IN  assertion: all calls to UPDATE_HASH are made with consecutive input
  4317  //    characters, so that a running hash key can be computed from the previous
  4318  //    key instead of complete recalculation each time.
  4319  
  4320  // ===========================================================================
  4321  // Insert string str in the dictionary and set match_head to the previous head
  4322  // of the hash chain (the most recent string with same hash key). Return
  4323  // the previous length of the hash chain.
  4324  // If this file is compiled with -DFASTEST, the compression level is forced
  4325  // to 1, and no hash chains are maintained.
  4326  // IN  assertion: all calls to INSERT_STRING are made with consecutive input
  4327  //    characters and the first MIN_MATCH bytes of str are valid (except for
  4328  //    the last MIN_MATCH-1 bytes of the input file).
  4329  
  4330  // ===========================================================================
  4331  // Initialize the hash table (avoiding 64K overflow for 16 bit systems).
  4332  // prev[] will be initialized on the fly.
  4333  
  4334  // ===========================================================================
  4335  // Slide the hash table when sliding the window down (could be avoided with 32
  4336  // bit values at the expense of memory usage). We slide even when level == 0 to
  4337  // keep the hash table consistent if we switch back to level > 0 later.
  4338  func slide_hash(tls *libc.TLS, s uintptr) { /* deflate.c:201:12: */
  4339  	var n uint32
  4340  	var m uint32
  4341  	var p uintptr
  4342  	var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  4343  
  4344  	n = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size
  4345  	p = (*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2
  4346  	for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
  4347  		m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2))))
  4348  		*(*Posf)(unsafe.Pointer(p)) = func() uint16 {
  4349  			if m >= wsize {
  4350  				return uint16(m - wsize)
  4351  			}
  4352  			return uint16(NIL)
  4353  		}()
  4354  	}
  4355  	n = wsize
  4356  	p = (*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2
  4357  	for ok1 := true; ok1; ok1 = libc.PreDecUint32(&n, 1) != 0 {
  4358  		m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2))))
  4359  		*(*Posf)(unsafe.Pointer(p)) = func() uint16 {
  4360  			if m >= wsize {
  4361  				return uint16(m - wsize)
  4362  			}
  4363  			return uint16(NIL)
  4364  		}()
  4365  		// If n is not on any hash chain, prev[n] is garbage but
  4366  		// its value will never be used.
  4367  	}
  4368  }
  4369  
  4370  // =========================================================================
  4371  func XdeflateInit_(tls *libc.TLS, strm Z_streamp, level int32, version uintptr, stream_size int32) int32 { /* deflate.c:228:13: */
  4372  	return XdeflateInit2_(tls, strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
  4373  		Z_DEFAULT_STRATEGY, version, stream_size)
  4374  	// To do: ignore strm->next_in if we use it as window
  4375  }
  4376  
  4377  // =========================================================================
  4378  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: */
  4379  	var s uintptr
  4380  	var wrap int32 = 1
  4381  	var overlay uintptr
  4382  	// We overlay pending_buf and d_buf+l_buf. This works since the average
  4383  	// output size for (length,distance) codes is <= 24 bits.
  4384  
  4385  	if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(my_version[0]) || uint32(stream_size) != uint32(unsafe.Sizeof(Z_stream{})) {
  4386  		return -6
  4387  	}
  4388  	if strm == uintptr(Z_NULL) {
  4389  		return -2
  4390  	}
  4391  
  4392  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
  4393  	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
  4394  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
  4395  			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
  4396  		}{Xzcalloc}))
  4397  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
  4398  	}
  4399  	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
  4400  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
  4401  			f func(*libc.TLS, Voidpf, Voidpf)
  4402  		}{Xzcfree}))
  4403  	}
  4404  
  4405  	if level == -1 {
  4406  		level = 6
  4407  	}
  4408  
  4409  	if windowBits < 0 { // suppress zlib wrapper
  4410  		wrap = 0
  4411  		windowBits = -windowBits
  4412  	} else if windowBits > 15 {
  4413  		wrap = 2 // write gzip wrapper instead
  4414  		windowBits = windowBits - 16
  4415  	}
  4416  	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 {
  4417  		return -2
  4418  	}
  4419  	if windowBits == 8 {
  4420  		windowBits = 9
  4421  	} // until 256-byte window bug fixed
  4422  	s = (*struct {
  4423  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  4424  	})(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{})))
  4425  	if s == uintptr(Z_NULL) {
  4426  		return -4
  4427  	}
  4428  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = s
  4429  	(*Deflate_state)(unsafe.Pointer(s)).Fstrm = strm
  4430  	(*Deflate_state)(unsafe.Pointer(s)).Fstatus = INIT_STATE // to pass state test in deflateReset()
  4431  
  4432  	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap
  4433  	(*Deflate_state)(unsafe.Pointer(s)).Fgzhead = Gz_headerp(Z_NULL)
  4434  	(*Deflate_state)(unsafe.Pointer(s)).Fw_bits = UInt(windowBits)
  4435  	(*Deflate_state)(unsafe.Pointer(s)).Fw_size = UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fw_bits)
  4436  	(*Deflate_state)(unsafe.Pointer(s)).Fw_mask = (*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(1)
  4437  
  4438  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_bits = UInt(memLevel) + UInt(7)
  4439  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_size = UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits)
  4440  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_mask = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1)
  4441  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift = ((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits + UInt(MIN_MATCH) - UInt(1)) / UInt(MIN_MATCH)
  4442  
  4443  	(*Deflate_state)(unsafe.Pointer(s)).Fwindow = (*struct {
  4444  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  4445  	})(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))))
  4446  	(*Deflate_state)(unsafe.Pointer(s)).Fprev = (*struct {
  4447  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  4448  	})(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))))
  4449  	(*Deflate_state)(unsafe.Pointer(s)).Fhead = (*struct {
  4450  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  4451  	})(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))))
  4452  
  4453  	(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg(0) // nothing written to s->window yet
  4454  
  4455  	(*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize = UInt(int32(1) << (memLevel + 6)) // 16K elements by default
  4456  
  4457  	overlay = (*struct {
  4458  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  4459  	})(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))
  4460  	(*Deflate_state)(unsafe.Pointer(s)).Fpending_buf = overlay
  4461  	(*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size = Ulg((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize) * (uint32(unsafe.Sizeof(Ush(0))) + uint32(2))
  4462  
  4463  	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) {
  4464  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE
  4465  		(*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -4]
  4466  		XdeflateEnd(tls, strm)
  4467  		return -4
  4468  	}
  4469  	(*Deflate_state)(unsafe.Pointer(s)).Fd_buf = overlay + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize/UInt(unsafe.Sizeof(Ush(0))))*2
  4470  	(*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)
  4471  
  4472  	(*Deflate_state)(unsafe.Pointer(s)).Flevel = level
  4473  	(*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy
  4474  	(*Deflate_state)(unsafe.Pointer(s)).Fmethod = Byte(method)
  4475  
  4476  	return XdeflateReset(tls, strm)
  4477  }
  4478  
  4479  var my_version = *(*[7]int8)(unsafe.Pointer(ts)) /* deflate.c:253:23 */
  4480  
  4481  // =========================================================================
  4482  // Check for a valid deflate stream state. Return 0 if ok, 1 if not.
  4483  func deflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:353:11: */
  4484  	var s uintptr
  4485  	if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
  4486  		return 1
  4487  	}
  4488  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4489  	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 {
  4490  		return 1
  4491  	}
  4492  	return 0
  4493  }
  4494  
  4495  // =========================================================================
  4496  func XdeflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* deflate.c:376:13: */
  4497  	var s uintptr
  4498  	var str UInt
  4499  	var n UInt
  4500  	var wrap int32
  4501  	var avail uint32
  4502  	var next uintptr
  4503  
  4504  	if deflateStateCheck(tls, strm) != 0 || dictionary == uintptr(Z_NULL) {
  4505  		return -2
  4506  	}
  4507  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4508  	wrap = (*Deflate_state)(unsafe.Pointer(s)).Fwrap
  4509  	if wrap == 2 || wrap == 1 && (*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE || (*Deflate_state)(unsafe.Pointer(s)).Flookahead != 0 {
  4510  		return -2
  4511  	}
  4512  
  4513  	// when using zlib wrappers, compute Adler-32 for provided dictionary
  4514  	if wrap == 1 {
  4515  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength)
  4516  	}
  4517  	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = 0 // avoid computing Adler-32 in read_buf
  4518  
  4519  	// if dictionary would fill window, just replace the history
  4520  	if dictLength >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
  4521  		if wrap == 0 { // already empty otherwise
  4522  			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
  4523  			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint32(unsafe.Sizeof(Posf(0))))
  4524  
  4525  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
  4526  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
  4527  			(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  4528  		}
  4529  		dictionary += uintptr(dictLength - (*Deflate_state)(unsafe.Pointer(s)).Fw_size) // use the tail
  4530  		dictLength = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  4531  	}
  4532  
  4533  	// insert dictionary into window and hash
  4534  	avail = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  4535  	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
  4536  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = dictLength
  4537  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary
  4538  	fill_window(tls, s)
  4539  	for (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
  4540  		str = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
  4541  		n = (*Deflate_state)(unsafe.Pointer(s)).Flookahead - UInt(MIN_MATCH-1)
  4542  		for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
  4543  			(*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
  4544  			*(*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))
  4545  			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str)
  4546  			str++
  4547  		}
  4548  		(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = str
  4549  		(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(MIN_MATCH - 1)
  4550  		fill_window(tls, s)
  4551  	}
  4552  	*(*UInt)(unsafe.Pointer(s + 108)) += (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  4553  	(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  4554  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  4555  	(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0)
  4556  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+120, UInt(MIN_MATCH-1))
  4557  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  4558  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
  4559  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = avail
  4560  	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap
  4561  	return Z_OK
  4562  }
  4563  
  4564  // =========================================================================
  4565  func XdeflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* deflate.c:445:13: */
  4566  	var s uintptr
  4567  	var len UInt
  4568  
  4569  	if deflateStateCheck(tls, strm) != 0 {
  4570  		return -2
  4571  	}
  4572  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4573  	len = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  4574  	if len > (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
  4575  		len = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  4576  	}
  4577  	if dictionary != uintptr(Z_NULL) && len != 0 {
  4578  		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)
  4579  	}
  4580  	if dictLength != uintptr(Z_NULL) {
  4581  		*(*UInt)(unsafe.Pointer(dictLength)) = len
  4582  	}
  4583  	return Z_OK
  4584  }
  4585  
  4586  // =========================================================================
  4587  func XdeflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:467:13: */
  4588  	var s uintptr
  4589  
  4590  	if deflateStateCheck(tls, strm) != 0 {
  4591  		return -2
  4592  	}
  4593  
  4594  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint32(strm+20, ULong(0))
  4595  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // use zfree if we ever allocate msg dynamically
  4596  	(*Z_stream)(unsafe.Pointer(strm)).Fdata_type = Z_UNKNOWN
  4597  
  4598  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4599  	(*Deflate_state)(unsafe.Pointer(s)).Fpending = Ulg(0)
  4600  	(*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf
  4601  
  4602  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap < 0 {
  4603  		(*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap // was made negative by deflate(..., Z_FINISH);
  4604  	}
  4605  	(*Deflate_state)(unsafe.Pointer(s)).Fstatus = func() int32 {
  4606  		if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
  4607  			return GZIP_STATE
  4608  		}
  4609  		return func() int32 {
  4610  			if (*Deflate_state)(unsafe.Pointer(s)).Fwrap != 0 {
  4611  				return INIT_STATE
  4612  			}
  4613  			return BUSY_STATE
  4614  		}()
  4615  	}()
  4616  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = func() uint32 {
  4617  		if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
  4618  			return Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
  4619  		}
  4620  		return Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
  4621  	}()
  4622  	(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = Z_NO_FLUSH
  4623  
  4624  	X_tr_init(tls, s)
  4625  
  4626  	return Z_OK
  4627  }
  4628  
  4629  // =========================================================================
  4630  func XdeflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:505:13: */
  4631  	var ret int32
  4632  
  4633  	ret = XdeflateResetKeep(tls, strm)
  4634  	if ret == Z_OK {
  4635  		lm_init(tls, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
  4636  	}
  4637  	return ret
  4638  }
  4639  
  4640  // =========================================================================
  4641  func XdeflateSetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* deflate.c:517:13: */
  4642  	if deflateStateCheck(tls, strm) != 0 || (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != 2 {
  4643  		return -2
  4644  	}
  4645  	(*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head
  4646  	return Z_OK
  4647  }
  4648  
  4649  // =========================================================================
  4650  func XdeflatePending(tls *libc.TLS, strm Z_streamp, pending uintptr, bits uintptr) int32 { /* deflate.c:528:13: */
  4651  	if deflateStateCheck(tls, strm) != 0 {
  4652  		return -2
  4653  	}
  4654  	if pending != uintptr(Z_NULL) {
  4655  		*(*uint32)(unsafe.Pointer(pending)) = uint32((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending)
  4656  	}
  4657  	if bits != uintptr(Z_NULL) {
  4658  		*(*int32)(unsafe.Pointer(bits)) = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid
  4659  	}
  4660  	return Z_OK
  4661  }
  4662  
  4663  // =========================================================================
  4664  func XdeflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* deflate.c:542:13: */
  4665  	var s uintptr
  4666  	var put int32
  4667  
  4668  	if deflateStateCheck(tls, strm) != 0 {
  4669  		return -2
  4670  	}
  4671  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4672  	if (*Deflate_state)(unsafe.Pointer(s)).Fd_buf < (*Deflate_state)(unsafe.Pointer(s)).Fpending_out+uintptr(int32(Buf_size+7)>>3) {
  4673  		return -5
  4674  	}
  4675  	for ok := true; ok; ok = bits != 0 {
  4676  		put = Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid
  4677  		if put > bits {
  4678  			put = bits
  4679  		}
  4680  		*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(value & (int32(1)<<put - 1) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
  4681  		*(*int32)(unsafe.Pointer(s + 5820)) += put
  4682  		X_tr_flush_bits(tls, s)
  4683  		value >>= put
  4684  		bits = bits - put
  4685  	}
  4686  	return Z_OK
  4687  }
  4688  
  4689  // =========================================================================
  4690  func XdeflateParams(tls *libc.TLS, strm Z_streamp, level int32, strategy int32) int32 { /* deflate.c:568:13: */
  4691  	var s uintptr
  4692  	var func1 Compress_func
  4693  
  4694  	if deflateStateCheck(tls, strm) != 0 {
  4695  		return -2
  4696  	}
  4697  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4698  
  4699  	if level == -1 {
  4700  		level = 6
  4701  	}
  4702  	if level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED {
  4703  		return -2
  4704  	}
  4705  	func1 = configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc
  4706  
  4707  	if (strategy != (*Deflate_state)(unsafe.Pointer(s)).Fstrategy || func1 != configuration_table[level].Ffunc) && (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water != 0 {
  4708  		// Flush the last buffer:
  4709  		var err int32 = Xdeflate(tls, strm, Z_BLOCK)
  4710  		if err == -2 {
  4711  			return err
  4712  		}
  4713  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  4714  			return -5
  4715  		}
  4716  	}
  4717  	if (*Deflate_state)(unsafe.Pointer(s)).Flevel != level {
  4718  		if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 && (*Deflate_state)(unsafe.Pointer(s)).Fmatches != UInt(0) {
  4719  			if (*Deflate_state)(unsafe.Pointer(s)).Fmatches == UInt(1) {
  4720  				slide_hash(tls, s)
  4721  			} else {
  4722  				*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
  4723  			}
  4724  			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint32(unsafe.Sizeof(Posf(0))))
  4725  
  4726  			(*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(0)
  4727  		}
  4728  		(*Deflate_state)(unsafe.Pointer(s)).Flevel = level
  4729  		(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[level].Fmax_lazy)
  4730  		(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[level].Fgood_length)
  4731  		(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[level].Fnice_length)
  4732  		(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[level].Fmax_chain)
  4733  	}
  4734  	(*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy
  4735  	return Z_OK
  4736  }
  4737  
  4738  // =========================================================================
  4739  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: */
  4740  	var s uintptr
  4741  
  4742  	if deflateStateCheck(tls, strm) != 0 {
  4743  		return -2
  4744  	}
  4745  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4746  	(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(good_length)
  4747  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(max_lazy)
  4748  	(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length
  4749  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(max_chain)
  4750  	return Z_OK
  4751  }
  4752  
  4753  // =========================================================================
  4754  // For the default windowBits of 15 and memLevel of 8, this function returns
  4755  // a close to exact, as well as small, upper bound on the compressed size.
  4756  // They are coded as constants here for a reason--if the #define's are
  4757  // changed, then this function needs to be changed as well.  The return
  4758  // value for 15 and 8 only works for those exact settings.
  4759  //
  4760  // For any setting other than those defaults for windowBits and memLevel,
  4761  // the value returned is a conservative worst case for the maximum expansion
  4762  // resulting from using fixed blocks instead of stored blocks, which deflate
  4763  // can emit on compressed data for some combinations of the parameters.
  4764  //
  4765  // This function could be more sophisticated to provide closer upper bounds for
  4766  // every combination of windowBits and memLevel.  But even the conservative
  4767  // upper bound of about 14% expansion does not seem onerous for output buffer
  4768  // allocation.
  4769  func XdeflateBound(tls *libc.TLS, strm Z_streamp, sourceLen ULong) ULong { /* deflate.c:652:15: */
  4770  	var s uintptr
  4771  	var complen ULong
  4772  	var wraplen ULong
  4773  
  4774  	// conservative upper bound for compressed data
  4775  	complen = sourceLen + (sourceLen+ULong(7))>>3 + (sourceLen+ULong(63))>>6 + ULong(5)
  4776  
  4777  	// if can't get parameters, return conservative bound plus zlib wrapper
  4778  	if deflateStateCheck(tls, strm) != 0 {
  4779  		return complen + ULong(6)
  4780  	}
  4781  
  4782  	// compute wrapper length
  4783  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4784  	switch (*Deflate_state)(unsafe.Pointer(s)).Fwrap {
  4785  	case 0: // raw deflate
  4786  		wraplen = ULong(0)
  4787  		break
  4788  	case 1: // zlib wrapper
  4789  		wraplen = ULong(6 + func() int32 {
  4790  			if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != 0 {
  4791  				return 4
  4792  			}
  4793  			return 0
  4794  		}())
  4795  		break
  4796  	case 2: // gzip wrapper
  4797  		wraplen = ULong(18)
  4798  		if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(Z_NULL) { // user-supplied gzip header
  4799  			var str uintptr
  4800  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
  4801  				wraplen = wraplen + ULong(UInt(2)+(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len)
  4802  			}
  4803  			str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname
  4804  			if str != uintptr(Z_NULL) {
  4805  				for ok := true; ok; ok = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 {
  4806  					wraplen++
  4807  				}
  4808  			}
  4809  			str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment
  4810  			if str != uintptr(Z_NULL) {
  4811  				for ok1 := true; ok1; ok1 = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 {
  4812  					wraplen++
  4813  				}
  4814  			}
  4815  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  4816  				wraplen = wraplen + ULong(2)
  4817  			}
  4818  		}
  4819  		break
  4820  	default: // for compiler happiness
  4821  		wraplen = ULong(6)
  4822  	}
  4823  
  4824  	// if not default parameters, return conservative bound
  4825  	if (*Deflate_state)(unsafe.Pointer(s)).Fw_bits != UInt(15) || (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits != UInt(8+7) {
  4826  		return complen + wraplen
  4827  	}
  4828  
  4829  	// default settings: return tight bound for that case
  4830  	return sourceLen + sourceLen>>12 + sourceLen>>14 + sourceLen>>25 + ULong(13) - ULong(6) + wraplen
  4831  }
  4832  
  4833  // =========================================================================
  4834  // Put a short in the pending buffer. The 16-bit value is put in MSB order.
  4835  // IN assertion: the stream state is correct and there is enough room in
  4836  // pending_buf.
  4837  func putShortMSB(tls *libc.TLS, s uintptr, b UInt) { /* deflate.c:716:12: */
  4838  	{
  4839  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte(b >> 8)
  4840  	}
  4841  
  4842  	{
  4843  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte(b & UInt(0xff))
  4844  	}
  4845  
  4846  }
  4847  
  4848  // =========================================================================
  4849  // Flush as much pending output as possible. All deflate() output, except for
  4850  // some deflate_stored() output, goes through this function so some
  4851  // applications may wish to modify it to avoid allocating a large
  4852  // strm->next_out buffer and copying into it. (See also read_buf()).
  4853  func flush_pending(tls *libc.TLS, strm Z_streamp) { /* deflate.c:730:12: */
  4854  	var len uint32
  4855  	var s uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4856  
  4857  	X_tr_flush_bits(tls, s)
  4858  	len = uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending)
  4859  	if len > (*Z_stream)(unsafe.Pointer(strm)).Favail_out {
  4860  		len = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  4861  	}
  4862  	if len == uint32(0) {
  4863  		return
  4864  	}
  4865  
  4866  	libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fpending_out, len)
  4867  	*(*uintptr)(unsafe.Pointer(strm + 12)) += uintptr(len)
  4868  	*(*uintptr)(unsafe.Pointer(s + 16)) += uintptr(len)
  4869  	*(*ULong)(unsafe.Pointer(strm + 20)) += ULong(len)
  4870  	*(*UInt)(unsafe.Pointer(strm + 16)) -= len
  4871  	*(*Ulg)(unsafe.Pointer(s + 20)) -= Ulg(len)
  4872  	if (*Deflate_state)(unsafe.Pointer(s)).Fpending == Ulg(0) {
  4873  		(*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf
  4874  	}
  4875  }
  4876  
  4877  // ===========================================================================
  4878  // Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1].
  4879  
  4880  // =========================================================================
  4881  func Xdeflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* deflate.c:763:13: */
  4882  	var old_flush int32 // value of flush param for previous deflate call
  4883  	var s uintptr
  4884  
  4885  	if deflateStateCheck(tls, strm) != 0 || flush > Z_BLOCK || flush < 0 {
  4886  		return -2
  4887  	}
  4888  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  4889  
  4890  	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 {
  4891  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -2]; return -2 }()
  4892  	}
  4893  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  4894  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }()
  4895  	}
  4896  
  4897  	old_flush = (*Deflate_state)(unsafe.Pointer(s)).Flast_flush
  4898  	(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = flush
  4899  
  4900  	// Flush as much pending output as possible
  4901  	if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  4902  		flush_pending(tls, strm)
  4903  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  4904  			// Since avail_out is 0, deflate will be called again with
  4905  			// more output space, but possibly with both pending and
  4906  			// avail_in equal to zero. There won't be anything to do,
  4907  			// but this is not an error situation so make sure we
  4908  			// return OK instead of BUF_ERROR at next call of deflate:
  4909  			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  4910  			return Z_OK
  4911  		}
  4912  
  4913  		// Make sure there is something to do and avoid duplicate consecutive
  4914  		// flushes. For repeated and useless calls with Z_FINISH, we keep
  4915  		// returning Z_STREAM_END instead of Z_BUF_ERROR.
  4916  	} else if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && flush*2-func() int32 {
  4917  		if flush > 4 {
  4918  			return 9
  4919  		}
  4920  		return 0
  4921  	}() <= old_flush*2-func() int32 {
  4922  		if old_flush > 4 {
  4923  			return 9
  4924  		}
  4925  		return 0
  4926  	}() && flush != Z_FINISH {
  4927  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }()
  4928  	}
  4929  
  4930  	// User must not provide more input after the first FINISH:
  4931  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE && (*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0) {
  4932  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[Z_NEED_DICT - -5]; return -5 }()
  4933  	}
  4934  
  4935  	// Write the header
  4936  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == INIT_STATE {
  4937  		// zlib header
  4938  		var header UInt = (UInt(Z_DEFLATED) + ((*Deflate_state)(unsafe.Pointer(s)).Fw_bits-UInt(8))<<4) << 8
  4939  		var level_flags UInt
  4940  
  4941  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 {
  4942  			level_flags = UInt(0)
  4943  		} else if (*Deflate_state)(unsafe.Pointer(s)).Flevel < 6 {
  4944  			level_flags = UInt(1)
  4945  		} else if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 6 {
  4946  			level_flags = UInt(2)
  4947  		} else {
  4948  			level_flags = UInt(3)
  4949  		}
  4950  		header = header | level_flags<<6
  4951  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) {
  4952  			header = header | UInt(PRESET_DICT)
  4953  		}
  4954  		header = header + (UInt(31) - header%UInt(31))
  4955  
  4956  		putShortMSB(tls, s, header)
  4957  
  4958  		// Save the adler32 of the preset dictionary:
  4959  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) {
  4960  			putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler>>16))
  4961  			putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler&ULong(0xffff)))
  4962  		}
  4963  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
  4964  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE
  4965  
  4966  		// Compression must start with an empty pending buffer
  4967  		flush_pending(tls, strm)
  4968  		if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  4969  			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  4970  			return Z_OK
  4971  		}
  4972  	}
  4973  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == GZIP_STATE {
  4974  		// gzip header
  4975  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
  4976  		{
  4977  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(31)
  4978  		}
  4979  
  4980  		{
  4981  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(139)
  4982  		}
  4983  
  4984  		{
  4985  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(8)
  4986  		}
  4987  
  4988  		if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(Z_NULL) {
  4989  			{
  4990  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  4991  			}
  4992  
  4993  			{
  4994  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  4995  			}
  4996  
  4997  			{
  4998  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  4999  			}
  5000  
  5001  			{
  5002  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  5003  			}
  5004  
  5005  			{
  5006  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  5007  			}
  5008  
  5009  			{
  5010  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 {
  5011  					if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 {
  5012  						return uint8(2)
  5013  					}
  5014  					return func() uint8 {
  5015  						if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 {
  5016  							return uint8(4)
  5017  						}
  5018  						return uint8(0)
  5019  					}()
  5020  				}()
  5021  			}
  5022  
  5023  			{
  5024  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(OS_CODE)
  5025  			}
  5026  
  5027  			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE
  5028  
  5029  			// Compression must start with an empty pending buffer
  5030  			flush_pending(tls, strm)
  5031  			if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5032  				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5033  				return Z_OK
  5034  			}
  5035  		} else {
  5036  			{
  5037  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(func() int32 {
  5038  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 {
  5039  						return 1
  5040  					}
  5041  					return 0
  5042  				}() + func() int32 {
  5043  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  5044  						return 2
  5045  					}
  5046  					return 0
  5047  				}() + func() int32 {
  5048  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(Z_NULL) {
  5049  						return 0
  5050  					}
  5051  					return 4
  5052  				}() + func() int32 {
  5053  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(Z_NULL) {
  5054  						return 0
  5055  					}
  5056  					return 8
  5057  				}() + func() int32 {
  5058  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(Z_NULL) {
  5059  						return 0
  5060  					}
  5061  					return 16
  5062  				}())
  5063  			}
  5064  
  5065  			{
  5066  				*(*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))
  5067  			}
  5068  
  5069  			{
  5070  				*(*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))
  5071  			}
  5072  
  5073  			{
  5074  				*(*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))
  5075  			}
  5076  
  5077  			{
  5078  				*(*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))
  5079  			}
  5080  
  5081  			{
  5082  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 {
  5083  					if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 {
  5084  						return uint8(2)
  5085  					}
  5086  					return func() uint8 {
  5087  						if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY || (*Deflate_state)(unsafe.Pointer(s)).Flevel < 2 {
  5088  							return uint8(4)
  5089  						}
  5090  						return uint8(0)
  5091  					}()
  5092  				}()
  5093  			}
  5094  
  5095  			{
  5096  				*(*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)
  5097  			}
  5098  
  5099  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
  5100  				{
  5101  					*(*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))
  5102  				}
  5103  
  5104  				{
  5105  					*(*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))
  5106  				}
  5107  
  5108  			}
  5109  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  5110  				(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf,
  5111  					uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending))
  5112  			}
  5113  			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0)
  5114  			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = EXTRA_STATE
  5115  		}
  5116  	}
  5117  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == EXTRA_STATE {
  5118  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
  5119  			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
  5120  			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)
  5121  			for (*Deflate_state)(unsafe.Pointer(s)).Fpending+Ulg(left) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  5122  				var copy UInt = UInt((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fpending)
  5123  				libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending),
  5124  					(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex), copy)
  5125  				(*Deflate_state)(unsafe.Pointer(s)).Fpending = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size
  5126  				for ok := true; ok; ok = 0 != 0 {
  5127  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5128  						(*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))
  5129  					}
  5130  				}
  5131  				*(*Ulg)(unsafe.Pointer(s + 32)) += Ulg(copy)
  5132  				flush_pending(tls, strm)
  5133  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5134  					(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5135  					return Z_OK
  5136  				}
  5137  				beg = Ulg(0)
  5138  				left = left - copy
  5139  			}
  5140  			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending),
  5141  				(*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex), left)
  5142  			*(*Ulg)(unsafe.Pointer(s + 20)) += Ulg(left)
  5143  			for ok1 := true; ok1; ok1 = 0 != 0 {
  5144  				if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5145  					(*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))
  5146  				}
  5147  			}
  5148  			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0)
  5149  		}
  5150  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = NAME_STATE
  5151  	}
  5152  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == NAME_STATE {
  5153  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(Z_NULL) {
  5154  			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
  5155  			var val int32
  5156  			for ok2 := true; ok2; ok2 = val != 0 {
  5157  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  5158  					for ok3 := true; ok3; ok3 = 0 != 0 {
  5159  						if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5160  							(*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))
  5161  						}
  5162  					}
  5163  					flush_pending(tls, strm)
  5164  					if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5165  						(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5166  						return Z_OK
  5167  					}
  5168  					beg = Ulg(0)
  5169  				}
  5170  				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)))))
  5171  				{
  5172  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val)
  5173  				}
  5174  
  5175  			}
  5176  			for ok4 := true; ok4; ok4 = 0 != 0 {
  5177  				if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5178  					(*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))
  5179  				}
  5180  			}
  5181  			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = Ulg(0)
  5182  		}
  5183  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = COMMENT_STATE
  5184  	}
  5185  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == COMMENT_STATE {
  5186  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(Z_NULL) {
  5187  			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
  5188  			var val int32
  5189  			for ok5 := true; ok5; ok5 = val != 0 {
  5190  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  5191  					for ok6 := true; ok6; ok6 = 0 != 0 {
  5192  						if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5193  							(*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))
  5194  						}
  5195  					}
  5196  					flush_pending(tls, strm)
  5197  					if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5198  						(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5199  						return Z_OK
  5200  					}
  5201  					beg = Ulg(0)
  5202  				}
  5203  				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)))))
  5204  				{
  5205  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val)
  5206  				}
  5207  
  5208  			}
  5209  			for ok7 := true; ok7; ok7 = 0 != 0 {
  5210  				if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Deflate_state)(unsafe.Pointer(s)).Fpending > beg {
  5211  					(*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))
  5212  				}
  5213  			}
  5214  		}
  5215  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = HCRC_STATE
  5216  	}
  5217  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == HCRC_STATE {
  5218  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  5219  			if (*Deflate_state)(unsafe.Pointer(s)).Fpending+Ulg(2) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  5220  				flush_pending(tls, strm)
  5221  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5222  					(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5223  					return Z_OK
  5224  				}
  5225  			}
  5226  			{
  5227  				*(*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))
  5228  			}
  5229  
  5230  			{
  5231  				*(*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))
  5232  			}
  5233  
  5234  			(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
  5235  		}
  5236  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE
  5237  
  5238  		// Compression must start with an empty pending buffer
  5239  		flush_pending(tls, strm)
  5240  		if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5241  			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  5242  			return Z_OK
  5243  		}
  5244  	}
  5245  
  5246  	// Start a new block or continue the current one.
  5247  	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 {
  5248  		var bstate Block_state
  5249  
  5250  		if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 {
  5251  			bstate = deflate_stored(tls, s, flush)
  5252  		} else {
  5253  			if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_HUFFMAN_ONLY {
  5254  				bstate = deflate_huff(tls, s, flush)
  5255  			} else {
  5256  				if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_RLE {
  5257  					bstate = deflate_rle(tls, s, flush)
  5258  				} else {
  5259  					bstate = (*struct {
  5260  						f func(*libc.TLS, uintptr, int32) Block_state
  5261  					})(unsafe.Pointer(&struct{ uintptr }{configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc})).f(tls, s, flush)
  5262  				}
  5263  			}
  5264  		}
  5265  
  5266  		if bstate == Finish_started || bstate == Finish_done {
  5267  			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE
  5268  		}
  5269  		if bstate == Need_more || bstate == Finish_started {
  5270  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  5271  				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR next call, see above
  5272  			}
  5273  			return Z_OK
  5274  			// If flush != Z_NO_FLUSH && avail_out == 0, the next call
  5275  			// of deflate should use the same flush parameter to make sure
  5276  			// that the flush is complete. So we don't have to output an
  5277  			// empty block here, this will be done at next call. This also
  5278  			// ensures that for a very small output buffer, we emit at most
  5279  			// one empty block.
  5280  		}
  5281  		if bstate == Block_done {
  5282  			if flush == Z_PARTIAL_FLUSH {
  5283  				X_tr_align(tls, s)
  5284  			} else if flush != Z_BLOCK { // FULL_FLUSH or SYNC_FLUSH
  5285  				X_tr_stored_block(tls, s, uintptr(0), uint32(0), 0)
  5286  				// For a full flush, this empty block will be recognized
  5287  				// as a special marker by inflate_sync().
  5288  				if flush == Z_FULL_FLUSH {
  5289  					*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
  5290  					libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint32(unsafe.Sizeof(Posf(0))))
  5291  					// forget history
  5292  					if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  5293  						(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
  5294  						(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
  5295  						(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  5296  					}
  5297  				}
  5298  			}
  5299  			flush_pending(tls, strm)
  5300  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  5301  				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR at next call, see above
  5302  				return Z_OK
  5303  			}
  5304  		}
  5305  	}
  5306  
  5307  	if flush != Z_FINISH {
  5308  		return Z_OK
  5309  	}
  5310  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap <= 0 {
  5311  		return Z_STREAM_END
  5312  	}
  5313  
  5314  	// Write the trailer
  5315  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
  5316  		{
  5317  			*(*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))
  5318  		}
  5319  
  5320  		{
  5321  			*(*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))
  5322  		}
  5323  
  5324  		{
  5325  			*(*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))
  5326  		}
  5327  
  5328  		{
  5329  			*(*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))
  5330  		}
  5331  
  5332  		{
  5333  			*(*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))
  5334  		}
  5335  
  5336  		{
  5337  			*(*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))
  5338  		}
  5339  
  5340  		{
  5341  			*(*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))
  5342  		}
  5343  
  5344  		{
  5345  			*(*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))
  5346  		}
  5347  
  5348  	} else {
  5349  		putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler>>16))
  5350  		putShortMSB(tls, s, UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler&ULong(0xffff)))
  5351  	}
  5352  	flush_pending(tls, strm)
  5353  	// If avail_out is zero, the application will call deflate again
  5354  	// to flush the rest.
  5355  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap > 0 {
  5356  		(*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap
  5357  	} // write the trailer only once!
  5358  	if (*Deflate_state)(unsafe.Pointer(s)).Fpending != Ulg(0) {
  5359  		return Z_OK
  5360  	}
  5361  	return Z_STREAM_END
  5362  }
  5363  
  5364  // =========================================================================
  5365  func XdeflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:1076:13: */
  5366  	var status int32
  5367  
  5368  	if deflateStateCheck(tls, strm) != 0 {
  5369  		return -2
  5370  	}
  5371  
  5372  	status = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus
  5373  
  5374  	/* Deallocate in reverse order of allocations: */
  5375  	{
  5376  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 {
  5377  			(*struct {
  5378  				f func(*libc.TLS, Voidpf, Voidpf)
  5379  			})(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)
  5380  		}
  5381  	}
  5382  
  5383  	{
  5384  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 {
  5385  			(*struct {
  5386  				f func(*libc.TLS, Voidpf, Voidpf)
  5387  			})(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)
  5388  		}
  5389  	}
  5390  
  5391  	{
  5392  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 {
  5393  			(*struct {
  5394  				f func(*libc.TLS, Voidpf, Voidpf)
  5395  			})(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)
  5396  		}
  5397  	}
  5398  
  5399  	{
  5400  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 {
  5401  			(*struct {
  5402  				f func(*libc.TLS, Voidpf, Voidpf)
  5403  			})(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)
  5404  		}
  5405  	}
  5406  
  5407  	(*struct {
  5408  		f func(*libc.TLS, Voidpf, Voidpf)
  5409  	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
  5410  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
  5411  
  5412  	if status == BUSY_STATE {
  5413  		return -3
  5414  	}
  5415  	return Z_OK
  5416  }
  5417  
  5418  // =========================================================================
  5419  // Copy the source state to the destination state.
  5420  // To simplify the source, this is not supported for 16-bit MSDOS (which
  5421  // doesn't have enough memory anyway to duplicate compression states).
  5422  func XdeflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* deflate.c:1102:13: */
  5423  	var ds uintptr
  5424  	var ss uintptr
  5425  	var overlay uintptr
  5426  
  5427  	if deflateStateCheck(tls, source) != 0 || dest == uintptr(Z_NULL) {
  5428  		return -2
  5429  	}
  5430  
  5431  	ss = (*Z_stream)(unsafe.Pointer(source)).Fstate
  5432  
  5433  	libc.Xmemcpy(tls, dest, source, uint32(unsafe.Sizeof(Z_stream{})))
  5434  
  5435  	ds = (*struct {
  5436  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  5437  	})(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{})))
  5438  	if ds == uintptr(Z_NULL) {
  5439  		return -4
  5440  	}
  5441  	(*Z_stream)(unsafe.Pointer(dest)).Fstate = ds
  5442  	libc.Xmemcpy(tls, ds, ss, uint32(unsafe.Sizeof(Deflate_state{})))
  5443  	(*Deflate_state)(unsafe.Pointer(ds)).Fstrm = dest
  5444  
  5445  	(*Deflate_state)(unsafe.Pointer(ds)).Fwindow = (*struct {
  5446  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  5447  	})(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))))
  5448  	(*Deflate_state)(unsafe.Pointer(ds)).Fprev = (*struct {
  5449  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  5450  	})(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))))
  5451  	(*Deflate_state)(unsafe.Pointer(ds)).Fhead = (*struct {
  5452  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  5453  	})(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))))
  5454  	overlay = (*struct {
  5455  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  5456  	})(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))
  5457  	(*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf = overlay
  5458  
  5459  	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) {
  5460  		XdeflateEnd(tls, dest)
  5461  		return -4
  5462  	}
  5463  	// following zmemcpy do not work for 16-bit MSDOS
  5464  	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))))
  5465  	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))))
  5466  	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))))
  5467  	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))
  5468  
  5469  	(*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)
  5470  	(*Deflate_state)(unsafe.Pointer(ds)).Fd_buf = overlay + uintptr((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize/UInt(unsafe.Sizeof(Ush(0))))*2
  5471  	(*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)
  5472  
  5473  	(*Deflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 148   /* &.dyn_ltree */
  5474  	(*Deflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2440  /* &.dyn_dtree */
  5475  	(*Deflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2684 /* &.bl_tree */
  5476  
  5477  	return Z_OK
  5478  }
  5479  
  5480  // ===========================================================================
  5481  // Read a new buffer from the current input stream, update the adler32
  5482  // and total number of bytes read.  All deflate() input goes through
  5483  // this function so some applications may wish to modify it to avoid
  5484  // allocating a large strm->next_in buffer and copying from it.
  5485  // (See also flush_pending()).
  5486  func read_buf(tls *libc.TLS, strm Z_streamp, buf uintptr, size uint32) uint32 { /* deflate.c:1164:16: */
  5487  	var len uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  5488  
  5489  	if len > size {
  5490  		len = size
  5491  	}
  5492  	if len == uint32(0) {
  5493  		return uint32(0)
  5494  	}
  5495  
  5496  	*(*UInt)(unsafe.Pointer(strm + 4)) -= len
  5497  
  5498  	libc.Xmemcpy(tls, buf, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, len)
  5499  	if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 1 {
  5500  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len)
  5501  	} else if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 2 {
  5502  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len)
  5503  	}
  5504  	*(*uintptr)(unsafe.Pointer(strm)) += uintptr(len)
  5505  	*(*ULong)(unsafe.Pointer(strm + 8)) += ULong(len)
  5506  
  5507  	return len
  5508  }
  5509  
  5510  // ===========================================================================
  5511  // Initialize the "longest match" routines for a new zlib stream
  5512  func lm_init(tls *libc.TLS, s uintptr) { /* deflate.c:1194:12: */
  5513  	(*Deflate_state)(unsafe.Pointer(s)).Fwindow_size = Ulg(2) * Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)
  5514  
  5515  	*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*2)) = Posf(NIL)
  5516  	libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1))*uint32(unsafe.Sizeof(Posf(0))))
  5517  
  5518  	// Set the default configuration parameters:
  5519  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy)
  5520  	(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length)
  5521  	(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length)
  5522  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain)
  5523  
  5524  	(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
  5525  	(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
  5526  	(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0)
  5527  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  5528  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+120, UInt(MIN_MATCH-1))
  5529  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  5530  	(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(0)
  5531  }
  5532  
  5533  // ===========================================================================
  5534  // Set match_start to the longest match starting at the given string and
  5535  // return its length. Matches shorter or equal to prev_length are discarded,
  5536  // in which case the result is equal to prev_length and match_start is
  5537  // garbage.
  5538  // IN assertions: cur_match is the head of the hash chain for the current
  5539  //   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
  5540  // OUT assertion: the match length is not greater than s->lookahead.
  5541  // For 80x86 and 680x0, an optimized version will be provided in match.asm or
  5542  // match.S. The code will be functionally equivalent.
  5543  func longest_match(tls *libc.TLS, s uintptr, cur_match IPos) UInt { /* deflate.c:1236:12: */
  5544  	var chain_length uint32 = (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length                                         // max hash chain length
  5545  	var scan uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) // current string
  5546  	var match uintptr                                                                                                       // matched string
  5547  	var len int32                                                                                                           // length of current match
  5548  	var best_len int32 = int32((*Deflate_state)(unsafe.Pointer(s)).Fprev_length)                                            // best match length so far
  5549  	var nice_match int32 = (*Deflate_state)(unsafe.Pointer(s)).Fnice_match                                                  // stop if match long enough
  5550  	var limit IPos
  5551  	if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > (*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1) {
  5552  		limit = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(MAX_MATCH+MIN_MATCH+1))
  5553  	} else {
  5554  		limit = uint32(NIL)
  5555  	}
  5556  	// Stop when cur_match becomes <= limit. To simplify the code,
  5557  	// we prevent matches with the string of window index 0.
  5558  	var prev uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fprev
  5559  	var wmask UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_mask
  5560  
  5561  	var strend uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(MAX_MATCH)
  5562  	var scan_end1 Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len-1)))
  5563  	var scan_end Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len)))
  5564  
  5565  	// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
  5566  	// It is easy to get rid of this optimization if necessary.
  5567  
  5568  	// Do not waste too much time if we already have a good match:
  5569  	if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Deflate_state)(unsafe.Pointer(s)).Fgood_match {
  5570  		chain_length >>= 2
  5571  	}
  5572  	// Do not look for matches beyond the end of the input. This is necessary
  5573  	// to make deflate deterministic.
  5574  	if UInt(nice_match) > (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
  5575  		nice_match = int32((*Deflate_state)(unsafe.Pointer(s)).Flookahead)
  5576  	}
  5577  
  5578  	for ok := true; ok; ok = libc.AssignUint32(&cur_match, IPos(*(*Posf)(unsafe.Pointer(prev + uintptr(cur_match&wmask)*2)))) > limit &&
  5579  		libc.PreDecUint32(&chain_length, 1) != uint32(0) {
  5580  
  5581  		match = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(cur_match)
  5582  
  5583  		// Skip to next match if the match length cannot increase
  5584  		// or if the match length is less than 2.  Note that the checks below
  5585  		// for insufficient lookahead only occur occasionally for performance
  5586  		// reasons.  Therefore uninitialized memory will be accessed, and
  5587  		// conditional jumps will be made that depend on those values.
  5588  		// However the length of the match is limited to the lookahead, so
  5589  		// the output of deflate is not affected by the uninitialized values.
  5590  
  5591  		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))) {
  5592  			continue
  5593  		}
  5594  
  5595  		// The check at best_len-1 can be removed because it will be made
  5596  		// again later. (This heuristic is not always a win.)
  5597  		// It is not necessary to compare scan[2] and match[2] since they
  5598  		// are always equal when the other bytes match, given that
  5599  		// the hash keys are equal and that HASH_BITS >= 8.
  5600  		scan += uintptr(2)
  5601  		match++
  5602  
  5603  		// We check for insufficient lookahead only every 8th comparison;
  5604  		// the 256th check will be made at strstart+258.
  5605  		for ok1 := true; ok1; ok1 = int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) == int32(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&match, 1)))) && scan < strend {
  5606  		}
  5607  
  5608  		len = MAX_MATCH - (int32(strend)-int32(scan))/1
  5609  		scan = strend - uintptr(MAX_MATCH)
  5610  
  5611  		if len > best_len {
  5612  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match
  5613  			best_len = len
  5614  			if len >= nice_match {
  5615  				break
  5616  			}
  5617  			scan_end1 = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len-1)))
  5618  			scan_end = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len)))
  5619  		}
  5620  	}
  5621  
  5622  	if UInt(best_len) <= (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
  5623  		return UInt(best_len)
  5624  	}
  5625  	return (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  5626  }
  5627  
  5628  // ===========================================================================
  5629  // Fill the window when the lookahead becomes insufficient.
  5630  // Updates strstart and lookahead.
  5631  //
  5632  // IN assertion: lookahead < MIN_LOOKAHEAD
  5633  // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
  5634  //    At least one byte has been read, or avail_in == 0; reads are
  5635  //    performed for at least two bytes (required for the zip translate_eol
  5636  //    option -- not supported here).
  5637  func fill_window(tls *libc.TLS, s uintptr) { /* deflate.c:1482:12: */
  5638  	var n uint32
  5639  	var more uint32 // Amount of free space at the end of the window.
  5640  	var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5641  
  5642  	for ok := true; ok; ok = (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in != UInt(0) {
  5643  		more = uint32((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead) - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))
  5644  
  5645  		// Deal with !@#$% 64K limit:
  5646  		if uint32(unsafe.Sizeof(int32(0))) <= uint32(2) {
  5647  			if more == uint32(0) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart == UInt(0) && (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  5648  				more = wsize
  5649  
  5650  			} else if more == libc.Uint32(libc.Uint32FromInt32(-1)) {
  5651  				// Very unlikely, but possible on 16 bit machine if
  5652  				// strstart == 0 && lookahead == 1 (input done a byte at time)
  5653  				more--
  5654  			}
  5655  		}
  5656  
  5657  		// If the window is almost full and there is insufficient lookahead,
  5658  		// move the upper half to the lower one to make room in the upper half.
  5659  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart >= wsize+((*Deflate_state)(unsafe.Pointer(s)).Fw_size-UInt(MAX_MATCH+MIN_MATCH+1)) {
  5660  
  5661  			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(wsize), wsize-more)
  5662  			*(*UInt)(unsafe.Pointer(s + 112)) -= wsize
  5663  			*(*UInt)(unsafe.Pointer(s + 108)) -= wsize // we now have strstart >= MAX_DIST
  5664  			*(*int32)(unsafe.Pointer(s + 92)) -= int32(wsize)
  5665  			slide_hash(tls, s)
  5666  			more = more + wsize
  5667  		}
  5668  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) {
  5669  			break
  5670  		}
  5671  
  5672  		// If there was no sliding:
  5673  		//    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
  5674  		//    more == window_size - lookahead - strstart
  5675  		// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
  5676  		// => more >= window_size - 2*WSIZE + 2
  5677  		// In the BIG_MEM or MMAP case (not yet supported),
  5678  		//   window_size == input_size + MIN_LOOKAHEAD  &&
  5679  		//   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
  5680  		// Otherwise, window_size == 2*WSIZE so more >= 2.
  5681  		// If there was sliding, more >= WSIZE. So in all cases, more >= 2.
  5682  
  5683  		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)
  5684  		*(*UInt)(unsafe.Pointer(s + 116)) += n
  5685  
  5686  		// Initialize the hash value now that we have some input:
  5687  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead+(*Deflate_state)(unsafe.Pointer(s)).Finsert >= UInt(MIN_MATCH) {
  5688  			var str UInt = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Finsert
  5689  			(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str))))
  5690  			(*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
  5691  			for (*Deflate_state)(unsafe.Pointer(s)).Finsert != 0 {
  5692  				(*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
  5693  				*(*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))
  5694  				*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str)
  5695  				str++
  5696  				(*Deflate_state)(unsafe.Pointer(s)).Finsert--
  5697  				if (*Deflate_state)(unsafe.Pointer(s)).Flookahead+(*Deflate_state)(unsafe.Pointer(s)).Finsert < UInt(MIN_MATCH) {
  5698  					break
  5699  				}
  5700  			}
  5701  		}
  5702  		// If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
  5703  		// but this is not important since only literal bytes will be emitted.
  5704  
  5705  	}
  5706  
  5707  	// If the WIN_INIT bytes after the end of the current data have never been
  5708  	// written, then zero those bytes in order to avoid memory check reports of
  5709  	// the use of uninitialized (or uninitialised as Julian writes) bytes by
  5710  	// the longest match routines.  Update the high water mark for the next
  5711  	// time through here.  WIN_INIT is set to MAX_MATCH since the longest match
  5712  	// routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
  5713  	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size {
  5714  		var curr Ulg = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead)
  5715  		var init1 Ulg
  5716  
  5717  		if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr {
  5718  			// Previous high water mark below current data -- zero WIN_INIT
  5719  			// bytes or up to end of window, whichever is less.
  5720  			init1 = (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - curr
  5721  			if init1 > Ulg(MAX_MATCH) {
  5722  				init1 = Ulg(MAX_MATCH)
  5723  			}
  5724  			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(curr), 0, uint32(init1))
  5725  			(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = curr + init1
  5726  		} else if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr+Ulg(MAX_MATCH) {
  5727  			// High water mark at or above current data, but below current data
  5728  			// plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
  5729  			// to end of window, whichever is less.
  5730  			init1 = curr + Ulg(MAX_MATCH) - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water
  5731  			if init1 > (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size-(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water {
  5732  				init1 = (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water
  5733  			}
  5734  			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water), 0, uint32(init1))
  5735  			*(*Ulg)(unsafe.Pointer(s + 5824)) += init1
  5736  		}
  5737  	}
  5738  
  5739  }
  5740  
  5741  // ===========================================================================
  5742  // Flush the current block, with given end-of-file flag.
  5743  // IN assertion: strstart is set to the end of the current match.
  5744  
  5745  // Same but force premature exit if necessary.
  5746  
  5747  // Maximum stored block length in deflate format (not including header).
  5748  
  5749  // Minimum of a and b.
  5750  
  5751  // ===========================================================================
  5752  // Copy without compression as much as possible from the input stream, return
  5753  // the current block state.
  5754  //
  5755  // In case deflateParams() is used to later switch to a non-zero compression
  5756  // level, s->matches (otherwise unused when storing) keeps track of the number
  5757  // of hash table slides to perform. If s->matches is 1, then one hash table
  5758  // slide will be done when switching. If s->matches is 2, the maximum value
  5759  // allowed here, then the hash table will be cleared, since two or more slides
  5760  // is the same as a clear.
  5761  //
  5762  // deflate_stored() is written to minimize the number of times an input byte is
  5763  // copied. It is most efficient with large input and output buffers, which
  5764  // maximizes the opportunites to have a single copy from next_in to next_out.
  5765  func deflate_stored(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1643:19: */
  5766  	// Smallest worthy block size when not flushing or finishing. By default
  5767  	// this is 32K. This can be as small as 507 bytes for memLevel == 1. For
  5768  	// large input and output buffers, the stored block size will be larger.
  5769  	var min_block uint32 = func() uint32 {
  5770  		if (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size-Ulg(5) > Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size) {
  5771  			return (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5772  		}
  5773  		return uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(5))
  5774  	}()
  5775  
  5776  	// Copy as many min_block or larger stored blocks directly to next_out as
  5777  	// possible. If flushing, copy the remaining available input to next_out as
  5778  	// stored blocks, if there is enough space.
  5779  	var len uint32
  5780  	var left uint32
  5781  	var have uint32
  5782  	var last uint32 = uint32(0)
  5783  	var used uint32 = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
  5784  	for ok := true; ok; ok = last == uint32(0) {
  5785  		// Set len to the maximum size block that we can copy directly with the
  5786  		// available input data and output space. Set left to how much of that
  5787  		// would be copied from what's left in the window.
  5788  		len = uint32(MAX_STORED)                                                                      // maximum deflate stored block length
  5789  		have = uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)                      // number of header bytes
  5790  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { // need room for header
  5791  			break
  5792  		}
  5793  		// maximum stored block length that will fit in avail_out:
  5794  		have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have
  5795  		left = uint32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) // bytes left in window
  5796  		if Ulg(len) > Ulg(left)+Ulg((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) {
  5797  			len = left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
  5798  		} // limit len to the input
  5799  		if len > have {
  5800  			len = have
  5801  		} // limit len to the output
  5802  
  5803  		// If the stored block would be less than min_block in length, or if
  5804  		// unable to copy all of the available input when flushing, then try
  5805  		// copying to the window and the pending buffer instead. Also don't
  5806  		// write an empty block when flushing -- deflate() does that.
  5807  		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) {
  5808  			break
  5809  		}
  5810  
  5811  		// Make a dummy stored block in pending to get the header bytes,
  5812  		// including any pending bits. This also updates the debugging counts.
  5813  		if flush == Z_FINISH && len == left+(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in {
  5814  			last = uint32(1)
  5815  		} else {
  5816  			last = uint32(0)
  5817  		}
  5818  		X_tr_stored_block(tls, s, uintptr(0), uint32(0), int32(last))
  5819  
  5820  		// Replace the lengths in the dummy stored block with len.
  5821  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(4)))) = Bytef(len)
  5822  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(3)))) = Bytef(len >> 8)
  5823  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(2)))) = Bytef(^len)
  5824  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending-Ulg(1)))) = Bytef(^len >> 8)
  5825  
  5826  		// Write the stored block header bytes.
  5827  		flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  5828  
  5829  		// Copy uncompressed bytes from the window to next_out.
  5830  		if left != 0 {
  5831  			if left > len {
  5832  				left = len
  5833  			}
  5834  			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)
  5835  			*(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 12)) += uintptr(left)
  5836  			*(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 16)) -= left
  5837  			*(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 20)) += ULong(left)
  5838  			*(*int32)(unsafe.Pointer(s + 92)) += int32(uint32(left))
  5839  			len = len - left
  5840  		}
  5841  
  5842  		// Copy uncompressed bytes directly from next_in to next_out, updating
  5843  		// the check value.
  5844  		if len != 0 {
  5845  			read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len)
  5846  			*(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 12)) += uintptr(len)
  5847  			*(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 16)) -= len
  5848  			*(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 20)) += ULong(len)
  5849  		}
  5850  	}
  5851  
  5852  	// Update the sliding window with the last s->w_size bytes of the copied
  5853  	// data, or append all of the copied data to the existing window if less
  5854  	// than s->w_size bytes were copied. Also update the number of bytes to
  5855  	// insert in the hash tables, in the event that deflateParams() switches to
  5856  	// a non-zero compression level.
  5857  	used = used - (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in // number of input bytes directly copied
  5858  	if used != 0 {
  5859  		// If any input was used, then no unused input remains in the window,
  5860  		// therefore s->block_start == s->strstart.
  5861  		if used >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { // supplant the previous history
  5862  			(*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(2) // clear hash
  5863  			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)
  5864  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5865  		} else {
  5866  			if (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size-Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) <= Ulg(used) {
  5867  				// Slide the window down.
  5868  				*(*UInt)(unsafe.Pointer(s + 108)) -= (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5869  				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)
  5870  				if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) {
  5871  					(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
  5872  				} // add a pending slide_hash()
  5873  			}
  5874  			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)
  5875  			*(*UInt)(unsafe.Pointer(s + 108)) += used
  5876  		}
  5877  		(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  5878  		*(*UInt)(unsafe.Pointer(s + 5812)) += func() uint32 {
  5879  			if used > (*Deflate_state)(unsafe.Pointer(s)).Fw_size-(*Deflate_state)(unsafe.Pointer(s)).Finsert {
  5880  				return (*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert
  5881  			}
  5882  			return used
  5883  		}()
  5884  	}
  5885  	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) {
  5886  		(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  5887  	}
  5888  
  5889  	// If the last block was written to next_out, then done.
  5890  	if last != 0 {
  5891  		return Finish_done
  5892  	}
  5893  
  5894  	// If flushing and all input has been consumed, then done.
  5895  	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 {
  5896  		return Block_done
  5897  	}
  5898  
  5899  	// Fill the window with any remaining input.
  5900  	have = uint32((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - Ulg(1))
  5901  	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) {
  5902  		// Slide the window down.
  5903  		*(*int32)(unsafe.Pointer(s + 92)) -= int32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fw_size))
  5904  		*(*UInt)(unsafe.Pointer(s + 108)) -= (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5905  		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)
  5906  		if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) {
  5907  			(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
  5908  		} // add a pending slide_hash()
  5909  		have = have + (*Deflate_state)(unsafe.Pointer(s)).Fw_size // more space now
  5910  	}
  5911  	if have > (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in {
  5912  		have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
  5913  	}
  5914  	if have != 0 {
  5915  		read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart), have)
  5916  		*(*UInt)(unsafe.Pointer(s + 108)) += have
  5917  	}
  5918  	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) {
  5919  		(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  5920  	}
  5921  
  5922  	// There was not enough avail_out to write a complete worthy or flushed
  5923  	// stored block to next_out. Write a stored block to pending instead, if we
  5924  	// have enough input for a worthy block, or if flushing and there is enough
  5925  	// room for the remaining input as a stored block in the pending buffer.
  5926  	have = uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3) // number of header bytes
  5927  	// maximum stored block length that will fit in pending:
  5928  	have = func() uint32 {
  5929  		if (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size-Ulg(have) > Ulg(MAX_STORED) {
  5930  			return uint32(MAX_STORED)
  5931  		}
  5932  		return uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have))
  5933  	}()
  5934  	min_block = func() uint32 {
  5935  		if have > (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
  5936  			return (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5937  		}
  5938  		return have
  5939  	}()
  5940  	left = uint32(uint32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  5941  	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 {
  5942  		len = func() uint32 {
  5943  			if left > have {
  5944  				return have
  5945  			}
  5946  			return left
  5947  		}()
  5948  		if flush == Z_FINISH && (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) && len == left {
  5949  			last = uint32(1)
  5950  		} else {
  5951  			last = uint32(0)
  5952  		}
  5953  		X_tr_stored_block(tls, s, (*Deflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start), uint32(len), int32(last))
  5954  		*(*int32)(unsafe.Pointer(s + 92)) += int32(uint32(len))
  5955  		flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  5956  	}
  5957  
  5958  	// We've done all we can with the available input and output.
  5959  	if last != 0 {
  5960  		return Finish_started
  5961  	}
  5962  	return Need_more
  5963  }
  5964  
  5965  // ===========================================================================
  5966  // Compress as much as possible from the input stream, return the current
  5967  // block state.
  5968  // This function does not perform lazy evaluation of matches and inserts
  5969  // new strings in the dictionary only for unmatched strings or for short
  5970  // matches. It is used only for the fast compression options.
  5971  func deflate_fast(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1824:19: */
  5972  	var hash_head IPos // head of the hash chain
  5973  	var bflush int32   // set if current block must be flushed
  5974  
  5975  	for {
  5976  		// Make sure that we always have enough lookahead, except
  5977  		// at the end of the input file. We need MAX_MATCH bytes
  5978  		// for the next match, plus MIN_MATCH bytes to insert the
  5979  		// string following the next match.
  5980  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) {
  5981  			fill_window(tls, s)
  5982  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && flush == Z_NO_FLUSH {
  5983  				return Need_more
  5984  			}
  5985  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  5986  				break
  5987  			} // flush the current block
  5988  		}
  5989  
  5990  		// Insert the string window[strstart .. strstart+2] in the
  5991  		// dictionary, and set hash_head to the head of the hash chain:
  5992  		hash_head = IPos(NIL)
  5993  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
  5994  			(*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
  5995  			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))))
  5996  			*(*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)
  5997  		}
  5998  
  5999  		// Find the longest match, discarding those <= prev_length.
  6000  		// At this point we have always match_length < MIN_MATCH
  6001  		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) {
  6002  			// To simplify the code, we prevent matches with the string
  6003  			// of window index 0 (in particular we have to avoid a match
  6004  			// of the string with itself at the start of the input file).
  6005  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head)
  6006  			// longest_match() sets match_start
  6007  		}
  6008  		if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) {
  6009  
  6010  			{
  6011  				var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))
  6012  				var dist Ush = Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start)
  6013  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
  6014  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
  6015  				dist--
  6016  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++
  6017  				*(*Ush)(unsafe.Pointer(s + 2440 + uintptr(func() int32 {
  6018  					if int32(dist) < 256 {
  6019  						return int32(X_dist_code[dist])
  6020  					}
  6021  					return int32(X_dist_code[256+int32(dist)>>7])
  6022  				}())*4))++
  6023  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6024  			}
  6025  
  6026  			*(*UInt)(unsafe.Pointer(s + 116)) -= (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  6027  
  6028  			// Insert new strings in the hash table only if the match length
  6029  			// is not too large. This saves time but degrades compression.
  6030  			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) {
  6031  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length-- // string at strstart already in table
  6032  				for ok := true; ok; ok = libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length, 1) != UInt(0) {
  6033  					(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6034  					(*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
  6035  					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))))
  6036  					*(*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)
  6037  					// strstart never exceeds WSIZE-MAX_MATCH, so there are
  6038  					// always MIN_MATCH bytes ahead.
  6039  				}
  6040  				(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6041  			} else {
  6042  				*(*UInt)(unsafe.Pointer(s + 108)) += (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  6043  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  6044  				(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))))
  6045  				(*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
  6046  				// If lookahead < MIN_MATCH, ins_h is garbage, but it does not
  6047  				// matter since it will be recomputed at next deflate call.
  6048  			}
  6049  		} else {
  6050  			// No match, output a literal byte
  6051  
  6052  			{
  6053  				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
  6054  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  6055  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  6056  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(cc)*4))++
  6057  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6058  			}
  6059  
  6060  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  6061  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6062  		}
  6063  		if bflush != 0 {
  6064  			{
  6065  				X_tr_flush_block(tls, s, func() uintptr {
  6066  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6067  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6068  					}
  6069  					return uintptr(Z_NULL)
  6070  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6071  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6072  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6073  			}
  6074  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6075  				if 0 != 0 {
  6076  					return Finish_started
  6077  				}
  6078  				return Need_more
  6079  			}
  6080  		}
  6081  
  6082  	}
  6083  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 {
  6084  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < UInt(MIN_MATCH-1) {
  6085  			return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
  6086  		}
  6087  		return uint32(MIN_MATCH - 1)
  6088  	}()
  6089  	if flush == Z_FINISH {
  6090  		{
  6091  			{
  6092  				X_tr_flush_block(tls, s, func() uintptr {
  6093  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6094  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6095  					}
  6096  					return uintptr(Z_NULL)
  6097  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
  6098  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6099  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6100  			}
  6101  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6102  				if 1 != 0 {
  6103  					return Finish_started
  6104  				}
  6105  				return Need_more
  6106  			}
  6107  		}
  6108  
  6109  		return Finish_done
  6110  	}
  6111  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  6112  		{
  6113  			X_tr_flush_block(tls, s, func() uintptr {
  6114  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6115  					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6116  				}
  6117  				return uintptr(Z_NULL)
  6118  			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6119  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6120  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6121  		}
  6122  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6123  			if 0 != 0 {
  6124  				return Finish_started
  6125  			}
  6126  			return Need_more
  6127  		}
  6128  	}
  6129  
  6130  	return Block_done
  6131  }
  6132  
  6133  // ===========================================================================
  6134  // Same as above, but achieves better compression. We use a lazy
  6135  // evaluation for matches: a match is finally adopted only if there is
  6136  // no better match at the next window position.
  6137  func deflate_slow(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1926:19: */
  6138  	var hash_head IPos // head of hash chain
  6139  	var bflush int32   // set if current block must be flushed
  6140  
  6141  	// Process the input block.
  6142  	for {
  6143  		// Make sure that we always have enough lookahead, except
  6144  		// at the end of the input file. We need MAX_MATCH bytes
  6145  		// for the next match, plus MIN_MATCH bytes to insert the
  6146  		// string following the next match.
  6147  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) {
  6148  			fill_window(tls, s)
  6149  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < UInt(MAX_MATCH+MIN_MATCH+1) && flush == Z_NO_FLUSH {
  6150  				return Need_more
  6151  			}
  6152  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  6153  				break
  6154  			} // flush the current block
  6155  		}
  6156  
  6157  		// Insert the string window[strstart .. strstart+2] in the
  6158  		// dictionary, and set hash_head to the head of the hash chain:
  6159  		hash_head = IPos(NIL)
  6160  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
  6161  			(*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
  6162  			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))))
  6163  			*(*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)
  6164  		}
  6165  
  6166  		// Find the longest match, discarding those <= prev_length.
  6167  		(*Deflate_state)(unsafe.Pointer(s)).Fprev_length = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  6168  		(*Deflate_state)(unsafe.Pointer(s)).Fprev_match = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start
  6169  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1)
  6170  
  6171  		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) {
  6172  			// To simplify the code, we prevent matches with the string
  6173  			// of window index 0 (in particular we have to avoid a match
  6174  			// of the string with itself at the start of the input file).
  6175  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head)
  6176  			// longest_match() sets match_start
  6177  
  6178  			if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= UInt(5) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FILTERED ||
  6179  				(*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)) {
  6180  
  6181  				// If prev_match is also MIN_MATCH, match_start is garbage
  6182  				// but we will ignore the current match anyway.
  6183  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1)
  6184  			}
  6185  		}
  6186  		// If there was a match at the previous step and the current
  6187  		// match is not better, output the previous match:
  6188  		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 {
  6189  			var max_insert UInt = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead - UInt(MIN_MATCH)
  6190  			// Do not insert strings in hash table beyond this.
  6191  
  6192  			{
  6193  				var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(MIN_MATCH))
  6194  				var dist Ush = Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1) - (*Deflate_state)(unsafe.Pointer(s)).Fprev_match)
  6195  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
  6196  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
  6197  				dist--
  6198  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++
  6199  				*(*Ush)(unsafe.Pointer(s + 2440 + uintptr(func() int32 {
  6200  					if int32(dist) < 256 {
  6201  						return int32(X_dist_code[dist])
  6202  					}
  6203  					return int32(X_dist_code[256+int32(dist)>>7])
  6204  				}())*4))++
  6205  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6206  			}
  6207  
  6208  			// Insert in hash table all strings up to the end of the match.
  6209  			// strstart-1 and strstart are already inserted. If there is not
  6210  			// enough lookahead, the last two strings are not inserted in
  6211  			// the hash table.
  6212  			*(*UInt)(unsafe.Pointer(s + 116)) -= (*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(1)
  6213  			*(*UInt)(unsafe.Pointer(s + 120)) -= UInt(2)
  6214  			for ok := true; ok; ok = libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fprev_length, 1) != UInt(0) {
  6215  				if libc.PreIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fstrstart, 1) <= max_insert {
  6216  					(*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
  6217  					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))))
  6218  					*(*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)
  6219  				}
  6220  			}
  6221  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  6222  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MIN_MATCH - 1)
  6223  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6224  
  6225  			if bflush != 0 {
  6226  				{
  6227  					X_tr_flush_block(tls, s, func() uintptr {
  6228  						if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6229  							return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6230  						}
  6231  						return uintptr(Z_NULL)
  6232  					}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6233  					(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6234  					flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6235  				}
  6236  				if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6237  					if 0 != 0 {
  6238  						return Finish_started
  6239  					}
  6240  					return Need_more
  6241  				}
  6242  			}
  6243  
  6244  		} else if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 {
  6245  			// If there was no match at the previous position, output a
  6246  			// single literal. If there was a match but the current match
  6247  			// is longer, truncate the previous match to a single literal.
  6248  
  6249  			{
  6250  				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart-UInt(1))))
  6251  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  6252  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  6253  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(cc)*4))++
  6254  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6255  			}
  6256  
  6257  			if bflush != 0 {
  6258  				{
  6259  					X_tr_flush_block(tls, s, func() uintptr {
  6260  						if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6261  							return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6262  						}
  6263  						return uintptr(Z_NULL)
  6264  					}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6265  					(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6266  					flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6267  				}
  6268  
  6269  			}
  6270  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6271  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  6272  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6273  				return Need_more
  6274  			}
  6275  		} else {
  6276  			// There is no previous match to compare with, wait for
  6277  			// the next step to decide.
  6278  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 1
  6279  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6280  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  6281  		}
  6282  	}
  6283  
  6284  	if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 {
  6285  
  6286  		{
  6287  			var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart-UInt(1))))
  6288  			*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  6289  			*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  6290  			*(*Ush)(unsafe.Pointer(s + 148 + uintptr(cc)*4))++
  6291  			bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6292  		}
  6293  
  6294  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  6295  	}
  6296  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 {
  6297  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < UInt(MIN_MATCH-1) {
  6298  			return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
  6299  		}
  6300  		return uint32(MIN_MATCH - 1)
  6301  	}()
  6302  	if flush == Z_FINISH {
  6303  		{
  6304  			{
  6305  				X_tr_flush_block(tls, s, func() uintptr {
  6306  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6307  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6308  					}
  6309  					return uintptr(Z_NULL)
  6310  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
  6311  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6312  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6313  			}
  6314  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6315  				if 1 != 0 {
  6316  					return Finish_started
  6317  				}
  6318  				return Need_more
  6319  			}
  6320  		}
  6321  
  6322  		return Finish_done
  6323  	}
  6324  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  6325  		{
  6326  			X_tr_flush_block(tls, s, func() uintptr {
  6327  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6328  					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6329  				}
  6330  				return uintptr(Z_NULL)
  6331  			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6332  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6333  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6334  		}
  6335  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6336  			if 0 != 0 {
  6337  				return Finish_started
  6338  			}
  6339  			return Need_more
  6340  		}
  6341  	}
  6342  
  6343  	return Block_done
  6344  }
  6345  
  6346  // ===========================================================================
  6347  // For Z_RLE, simply look for runs of bytes, generate matches only of distance
  6348  // one.  Do not maintain a hash table.  (It will be regenerated if this run of
  6349  // deflate switches away from Z_RLE.)
  6350  func deflate_rle(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2057:19: */
  6351  	var bflush int32 // set if current block must be flushed
  6352  	var prev UInt    // byte at distance one to match
  6353  	var scan uintptr
  6354  	var strend uintptr // scan goes up to strend for length of run
  6355  
  6356  	for {
  6357  		// Make sure that we always have enough lookahead, except
  6358  		// at the end of the input file. We need MAX_MATCH bytes
  6359  		// for the longest run, plus one for the unrolled loop.
  6360  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) {
  6361  			fill_window(tls, s)
  6362  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) && flush == Z_NO_FLUSH {
  6363  				return Need_more
  6364  			}
  6365  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  6366  				break
  6367  			} // flush the current block
  6368  		}
  6369  
  6370  		// See how many times the previous byte repeats
  6371  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  6372  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) && (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > UInt(0) {
  6373  			scan = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - uintptr(1)
  6374  			prev = UInt(*(*Bytef)(unsafe.Pointer(scan)))
  6375  			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)))) {
  6376  				strend = (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(MAX_MATCH)
  6377  				for ok := true; ok; ok = prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && prev == UInt(*(*Bytef)(unsafe.Pointer(libc.PreIncUintptr(&scan, 1)))) && scan < strend {
  6378  				}
  6379  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(MAX_MATCH) - UInt((int32(strend)-int32(scan))/1)
  6380  				if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
  6381  					(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  6382  				}
  6383  			}
  6384  
  6385  		}
  6386  
  6387  		// Emit match if have run of MIN_MATCH or longer, else emit literal
  6388  		if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) {
  6389  
  6390  			{
  6391  				var len Uch = Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH))
  6392  				var dist Ush = Ush(1)
  6393  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
  6394  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
  6395  				dist--
  6396  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(int32(X_length_code[len])+LITERALS+1)*4))++
  6397  				*(*Ush)(unsafe.Pointer(s + 2440 + uintptr(func() int32 {
  6398  					if int32(dist) < 256 {
  6399  						return int32(X_dist_code[dist])
  6400  					}
  6401  					return int32(X_dist_code[256+int32(dist)>>7])
  6402  				}())*4))++
  6403  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6404  			}
  6405  
  6406  			*(*UInt)(unsafe.Pointer(s + 116)) -= (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  6407  			*(*UInt)(unsafe.Pointer(s + 108)) += (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  6408  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  6409  		} else {
  6410  			// No match, output a literal byte
  6411  
  6412  			{
  6413  				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
  6414  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  6415  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  6416  				*(*Ush)(unsafe.Pointer(s + 148 + uintptr(cc)*4))++
  6417  				bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6418  			}
  6419  
  6420  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  6421  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6422  		}
  6423  		if bflush != 0 {
  6424  			{
  6425  				X_tr_flush_block(tls, s, func() uintptr {
  6426  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6427  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6428  					}
  6429  					return uintptr(Z_NULL)
  6430  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6431  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6432  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6433  			}
  6434  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6435  				if 0 != 0 {
  6436  					return Finish_started
  6437  				}
  6438  				return Need_more
  6439  			}
  6440  		}
  6441  
  6442  	}
  6443  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  6444  	if flush == Z_FINISH {
  6445  		{
  6446  			{
  6447  				X_tr_flush_block(tls, s, func() uintptr {
  6448  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6449  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6450  					}
  6451  					return uintptr(Z_NULL)
  6452  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
  6453  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6454  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6455  			}
  6456  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6457  				if 1 != 0 {
  6458  					return Finish_started
  6459  				}
  6460  				return Need_more
  6461  			}
  6462  		}
  6463  
  6464  		return Finish_done
  6465  	}
  6466  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  6467  		{
  6468  			X_tr_flush_block(tls, s, func() uintptr {
  6469  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6470  					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6471  				}
  6472  				return uintptr(Z_NULL)
  6473  			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6474  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6475  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6476  		}
  6477  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6478  			if 0 != 0 {
  6479  				return Finish_started
  6480  			}
  6481  			return Need_more
  6482  		}
  6483  	}
  6484  
  6485  	return Block_done
  6486  }
  6487  
  6488  // ===========================================================================
  6489  // For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.
  6490  // (It will be regenerated if this run of deflate switches away from Huffman.)
  6491  func deflate_huff(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2130:19: */
  6492  	var bflush int32 // set if current block must be flushed
  6493  
  6494  	for {
  6495  		// Make sure that we have a literal to write.
  6496  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  6497  			fill_window(tls, s)
  6498  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  6499  				if flush == Z_NO_FLUSH {
  6500  					return Need_more
  6501  				}
  6502  				break // flush the current block
  6503  			}
  6504  		}
  6505  
  6506  		// Output a literal byte
  6507  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  6508  
  6509  		{
  6510  			var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
  6511  			*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  6512  			*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  6513  			*(*Ush)(unsafe.Pointer(s + 148 + uintptr(cc)*4))++
  6514  			bflush = libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
  6515  		}
  6516  
  6517  		(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  6518  		(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  6519  		if bflush != 0 {
  6520  			{
  6521  				X_tr_flush_block(tls, s, func() uintptr {
  6522  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6523  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6524  					}
  6525  					return uintptr(Z_NULL)
  6526  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6527  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6528  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6529  			}
  6530  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6531  				if 0 != 0 {
  6532  					return Finish_started
  6533  				}
  6534  				return Need_more
  6535  			}
  6536  		}
  6537  
  6538  	}
  6539  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  6540  	if flush == Z_FINISH {
  6541  		{
  6542  			{
  6543  				X_tr_flush_block(tls, s, func() uintptr {
  6544  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6545  						return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6546  					}
  6547  					return uintptr(Z_NULL)
  6548  				}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 1)
  6549  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6550  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6551  			}
  6552  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6553  				if 1 != 0 {
  6554  					return Finish_started
  6555  				}
  6556  				return Need_more
  6557  			}
  6558  		}
  6559  
  6560  		return Finish_done
  6561  	}
  6562  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  6563  		{
  6564  			X_tr_flush_block(tls, s, func() uintptr {
  6565  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  6566  					return (*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  6567  				}
  6568  				return uintptr(Z_NULL)
  6569  			}(), Ulg(int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Deflate_state)(unsafe.Pointer(s)).Fblock_start), 0)
  6570  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int32((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  6571  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  6572  		}
  6573  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  6574  			if 0 != 0 {
  6575  				return Finish_started
  6576  			}
  6577  			return Need_more
  6578  		}
  6579  	}
  6580  
  6581  	return Block_done
  6582  }
  6583  
  6584  // compatibility w/GNU headers
  6585  
  6586  // When the following macro is defined, the system uses 64-bit inode numbers.
  6587  // Programs can use this to avoid including <sys/param.h>, with its associated
  6588  // namespace pollution.
  6589  
  6590  type Fpos_t = X__off_t /* stdio.h:47:18 */
  6591  
  6592  // NB: to fit things in six character monocase externals, the stdio
  6593  // code uses the prefix `__s' for stdio objects, typically followed
  6594  // by a three-character attempt at a mnemonic.
  6595  
  6596  // stdio buffers
  6597  type X__sbuf = struct {
  6598  	F_base uintptr
  6599  	F_size int32
  6600  } /* stdio.h:91:1 */
  6601  
  6602  // stdio state variables.
  6603  //
  6604  // The following always hold:
  6605  //
  6606  //	if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
  6607  //		_lbfsize is -_bf._size, else _lbfsize is 0
  6608  //	if _flags&__SRD, _w is 0
  6609  //	if _flags&__SWR, _r is 0
  6610  //
  6611  // This ensures that the getc and putc macros (or inline functions) never
  6612  // try to write or read from a file that is in `read' or `write' mode.
  6613  // (Moreover, they can, and do, automatically switch from read mode to
  6614  // write mode, and back, on "r+" and "w+" files.)
  6615  //
  6616  // _lbfsize is used only to make the inline line-buffered output stream
  6617  // code as compact as possible.
  6618  //
  6619  // _ub, _up, and _ur are used when ungetc() pushes back more characters
  6620  // than fit in the current _bf, or when ungetc() pushes back a character
  6621  // that does not match the previous one in _bf.  When this happens,
  6622  // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
  6623  // _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
  6624  //
  6625  // Certain members of __sFILE are accessed directly via macros or
  6626  // inline functions.  To preserve ABI compat, these members must not
  6627  // be disturbed.  These members are marked below with (*).
  6628  type X__sFILE = struct {
  6629  	F_p     uintptr
  6630  	F_r     int32
  6631  	F_w     int32
  6632  	F_flags int16
  6633  	F_file  int16
  6634  	F_bf    struct {
  6635  		F_base uintptr
  6636  		F_size int32
  6637  	}
  6638  	F_lbfsize int32
  6639  	F_cookie  uintptr
  6640  	F_close   uintptr
  6641  	F_read    uintptr
  6642  	F_seek    uintptr
  6643  	F_write   uintptr
  6644  	F_ub      struct {
  6645  		F_base uintptr
  6646  		F_size int32
  6647  	}
  6648  	F_up   uintptr
  6649  	F_ur   int32
  6650  	F_ubuf [3]uint8
  6651  	F_nbuf [1]uint8
  6652  	F_lb   struct {
  6653  		F_base uintptr
  6654  		F_size int32
  6655  	}
  6656  	F_blksize     int32
  6657  	F_offset      Fpos_t
  6658  	F_fl_mutex    uintptr
  6659  	F_fl_owner    uintptr
  6660  	F_fl_count    int32
  6661  	F_orientation int32
  6662  	F_mbstate     X__mbstate_t
  6663  	F_flags2      int32
  6664  } /* stdio.h:124:1 */
  6665  
  6666  type FILE = X__sFILE /* stdio.h:165:24 */
  6667  type Cookie_io_functions_t = struct {
  6668  	Fread  uintptr
  6669  	Fwrite uintptr
  6670  	Fseek  uintptr
  6671  	Fclose uintptr
  6672  } /* stdio.h:428:3 */
  6673  
  6674  // -
  6675  // SPDX-License-Identifier: BSD-3-Clause
  6676  //
  6677  // Copyright (c) 1988, 1993
  6678  //	The Regents of the University of California.  All rights reserved.
  6679  //
  6680  // Redistribution and use in source and binary forms, with or without
  6681  // modification, are permitted provided that the following conditions
  6682  // are met:
  6683  // 1. Redistributions of source code must retain the above copyright
  6684  //    notice, this list of conditions and the following disclaimer.
  6685  // 2. Redistributions in binary form must reproduce the above copyright
  6686  //    notice, this list of conditions and the following disclaimer in the
  6687  //    documentation and/or other materials provided with the distribution.
  6688  // 3. Neither the name of the University nor the names of its contributors
  6689  //    may be used to endorse or promote products derived from this software
  6690  //    without specific prior written permission.
  6691  //
  6692  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6693  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6694  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6695  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  6696  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6697  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6698  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6699  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6700  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6701  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6702  // SUCH DAMAGE.
  6703  //
  6704  //	@(#)limits.h	8.2 (Berkeley) 1/4/94
  6705  // $FreeBSD$
  6706  
  6707  // -
  6708  // SPDX-License-Identifier: BSD-3-Clause
  6709  //
  6710  // Copyright (c) 1983, 1990, 1993
  6711  //	The Regents of the University of California.  All rights reserved.
  6712  // (c) UNIX System Laboratories, Inc.
  6713  // All or some portions of this file are derived from material licensed
  6714  // to the University of California by American Telephone and Telegraph
  6715  // Co. or Unix System Laboratories, Inc. and are reproduced herein with
  6716  // the permission of UNIX System Laboratories, 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  //	@(#)fcntl.h	8.3 (Berkeley) 1/21/94
  6743  // $FreeBSD$
  6744  
  6745  // This file includes the definitions for open and fcntl
  6746  // described by POSIX for <fcntl.h>; it also includes
  6747  // related kernel definitions.
  6748  
  6749  // -
  6750  // SPDX-License-Identifier: BSD-3-Clause
  6751  //
  6752  // Copyright (c) 1991, 1993
  6753  //	The Regents of the University of California.  All rights reserved.
  6754  //
  6755  // This code is derived from software contributed to Berkeley by
  6756  // Berkeley Software Design, Inc.
  6757  //
  6758  // Redistribution and use in source and binary forms, with or without
  6759  // modification, are permitted provided that the following conditions
  6760  // are met:
  6761  // 1. Redistributions of source code must retain the above copyright
  6762  //    notice, this list of conditions and the following disclaimer.
  6763  // 2. Redistributions in binary form must reproduce the above copyright
  6764  //    notice, this list of conditions and the following disclaimer in the
  6765  //    documentation and/or other materials provided with the distribution.
  6766  // 3. Neither the name of the University nor the names of its contributors
  6767  //    may be used to endorse or promote products derived from this software
  6768  //    without specific prior written permission.
  6769  //
  6770  // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6771  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6772  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6773  // ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  6774  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6775  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6776  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6777  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6778  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6779  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6780  // SUCH DAMAGE.
  6781  //
  6782  //	@(#)cdefs.h	8.8 (Berkeley) 1/9/95
  6783  // $FreeBSD$
  6784  
  6785  // -
  6786  // SPDX-License-Identifier: BSD-2-Clause-FreeBSD
  6787  //
  6788  // Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
  6789  // All rights reserved.
  6790  //
  6791  // Redistribution and use in source and binary forms, with or without
  6792  // modification, are permitted provided that the following conditions
  6793  // are met:
  6794  // 1. Redistributions of source code must retain the above copyright
  6795  //    notice, this list of conditions and the following disclaimer.
  6796  // 2. Redistributions in binary form must reproduce the above copyright
  6797  //    notice, this list of conditions and the following disclaimer in the
  6798  //    documentation and/or other materials provided with the distribution.
  6799  //
  6800  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  6801  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  6802  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  6803  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  6804  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  6805  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  6806  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  6807  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  6808  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  6809  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  6810  // SUCH DAMAGE.
  6811  //
  6812  // $FreeBSD$
  6813  
  6814  // File status flags: these are used by open(2), fcntl(2).
  6815  // They are also used (indirectly) in the kernel file structure f_flags,
  6816  // which is a superset of the open/fcntl flags.  Open flags and f_flags
  6817  // are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
  6818  // Open/fcntl flags begin with O_; kernel-internal flags begin with F.
  6819  // open-only flags
  6820  
  6821  // Kernel encoding of open mode; separate read and write bits that are
  6822  // independently testable: 1 greater than the above.
  6823  //
  6824  // XXX
  6825  // FREAD and FWRITE are excluded from the #ifdef _KERNEL so that TIOCFLUSH,
  6826  // which was documented to use FREAD/FWRITE, continues to work.
  6827  
  6828  // Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY.
  6829  
  6830  // Attempt to bypass buffer cache
  6831  
  6832  // Defined by POSIX 1003.1-2008; BSD default, but reserve for future use.
  6833  
  6834  // XXX missing O_RSYNC.
  6835  
  6836  // The O_* flags used to have only F* names, which were used in the kernel
  6837  // and by fcntl.  We retain the F* names for the kernel f_flag field
  6838  // and for backward compatibility for fcntl.  These flags are deprecated.
  6839  
  6840  // Historically, we ran out of bits in f_flag (which was once a short).
  6841  // However, the flag bits not set in FMASK are only meaningful in the
  6842  // initial open syscall.  Those bits were thus given a
  6843  // different meaning for fcntl(2).
  6844  // Read ahead
  6845  
  6846  // Magic value that specify the use of the current working directory
  6847  // to determine the target of relative file paths in the openat() and
  6848  // similar syscalls.
  6849  
  6850  // Miscellaneous flags for the *at() syscalls.
  6851  /* #define AT_UNUSED1		0x1000 */ // Was AT_BENEATH
  6852  
  6853  // Constants used for fcntl(2)
  6854  
  6855  // command values
  6856  
  6857  // Seals (F_ADD_SEALS, F_GET_SEALS).
  6858  
  6859  // file descriptor flags (F_GETFD, F_SETFD)
  6860  
  6861  // record locking flags (F_GETLK, F_SETLK, F_SETLKW)
  6862  
  6863  // Advisory file segment locking data type -
  6864  // information passed to system by user
  6865  type Flock = struct {
  6866  	Fl_start  Off_t
  6867  	Fl_len    Off_t
  6868  	Fl_pid    Pid_t
  6869  	Fl_type   int16
  6870  	Fl_whence int16
  6871  	Fl_sysid  int32
  6872  } /* fcntl.h:306:1 */
  6873  
  6874  // Old advisory file segment locking data type,
  6875  // before adding l_sysid.
  6876  type X__oflock = struct {
  6877  	Fl_start  Off_t
  6878  	Fl_len    Off_t
  6879  	Fl_pid    Pid_t
  6880  	Fl_type   int16
  6881  	Fl_whence int16
  6882  } /* fcntl.h:320:1 */
  6883  
  6884  // default memLevel
  6885  
  6886  // default i/o buffer size -- double this for output when reading (this and
  6887  //    twice this must be able to fit in an unsigned type)
  6888  
  6889  // gzip modes, also provide a little integrity check on the passed structure
  6890  
  6891  // values for gz_state how
  6892  
  6893  // internal gzip file state data structure
  6894  type Gz_state = struct {
  6895  	Fx        GzFile_s
  6896  	Fmode     int32
  6897  	Ffd       int32
  6898  	Fpath     uintptr
  6899  	Fsize     uint32
  6900  	Fwant     uint32
  6901  	Fin       uintptr
  6902  	Fout      uintptr
  6903  	Fdirect   int32
  6904  	Fhow      int32
  6905  	Fstart    Off_t
  6906  	Feof      int32
  6907  	Fpast     int32
  6908  	Flevel    int32
  6909  	Fstrategy int32
  6910  	Fskip     Off_t
  6911  	Fseek     int32
  6912  	Ferr      int32
  6913  	Fmsg      uintptr
  6914  	Fstrm     Z_stream
  6915  }                        /* gzguts.h:201:3 */
  6916  type Gz_statep = uintptr /* gzguts.h:202:22 */
  6917  
  6918  // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
  6919  //    value -- needed when comparing unsigned to z_off64_t, which is signed
  6920  //    (possible z_off64_t types off_t, off64_t, and long are all signed)
  6921  
  6922  // gzclose() is in a separate file so that it is linked in only if it is used.
  6923  //    That way the other gzclose functions can be used instead to avoid linking in
  6924  //    unneeded compression or decompression routines.
  6925  func Xgzclose(tls *libc.TLS, file GzFile) int32 { /* gzclose.c:11:13: */
  6926  	var state Gz_statep
  6927  
  6928  	if file == uintptr(0) {
  6929  		return -2
  6930  	}
  6931  	state = file
  6932  
  6933  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  6934  		return Xgzclose_r(tls, file)
  6935  	}
  6936  	return Xgzclose_w(tls, file)
  6937  }
  6938  
  6939  // Reset gzip file state
  6940  func gz_reset(tls *libc.TLS, state Gz_statep) { /* gzlib.c:75:12: */
  6941  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)  // no output data available
  6942  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // for reading ...
  6943  		(*Gz_state)(unsafe.Pointer(state)).Feof = 0    // not at end of file
  6944  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0   // have not read past end yet
  6945  		(*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK // look for gzip header
  6946  	}
  6947  	(*Gz_state)(unsafe.Pointer(state)).Fseek = 0                 // no seek request pending
  6948  	Xgz_error(tls, state, Z_OK, uintptr(0))                      // clear error
  6949  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos = int64(0)        // no uncompressed data yet
  6950  	(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) // no input data yet
  6951  }
  6952  
  6953  // Open a gzip file either by name or file descriptor.
  6954  func gz_open(tls *libc.TLS, path uintptr, fd int32, mode uintptr) GzFile { /* gzlib.c:91:14: */
  6955  	bp := tls.Alloc(16)
  6956  	defer tls.Free(16)
  6957  
  6958  	var state Gz_statep
  6959  	var len Z_size_t
  6960  	var oflag int32
  6961  	var cloexec int32 = 0
  6962  	var exclusive int32 = 0
  6963  
  6964  	// check input
  6965  	if path == uintptr(0) {
  6966  		return uintptr(0)
  6967  	}
  6968  
  6969  	// allocate gzFile structure to return
  6970  	state = libc.Xmalloc(tls, uint32(unsafe.Sizeof(Gz_state{})))
  6971  	if state == uintptr(0) {
  6972  		return uintptr(0)
  6973  	}
  6974  	(*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0)         // no buffers allocated yet
  6975  	(*Gz_state)(unsafe.Pointer(state)).Fwant = uint32(GZBUFSIZE) // requested buffer size
  6976  	(*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0)         // no error message yet
  6977  
  6978  	// interpret mode
  6979  	(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_NONE
  6980  	(*Gz_state)(unsafe.Pointer(state)).Flevel = -1
  6981  	(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_DEFAULT_STRATEGY
  6982  	(*Gz_state)(unsafe.Pointer(state)).Fdirect = 0
  6983  	for *(*int8)(unsafe.Pointer(mode)) != 0 {
  6984  		if int32(*(*int8)(unsafe.Pointer(mode))) >= '0' && int32(*(*int8)(unsafe.Pointer(mode))) <= '9' {
  6985  			(*Gz_state)(unsafe.Pointer(state)).Flevel = int32(*(*int8)(unsafe.Pointer(mode))) - '0'
  6986  		} else {
  6987  			switch int32(*(*int8)(unsafe.Pointer(mode))) {
  6988  			case 'r':
  6989  				(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_READ
  6990  				break
  6991  				fallthrough
  6992  			case 'w':
  6993  				(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE
  6994  				break
  6995  				fallthrough
  6996  			case 'a':
  6997  				(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_APPEND
  6998  				break
  6999  				fallthrough
  7000  			case '+': // can't read and write at the same time
  7001  				libc.Xfree(tls, state)
  7002  				return uintptr(0)
  7003  				fallthrough
  7004  			case 'b': // ignore -- will request binary anyway
  7005  				break
  7006  				fallthrough
  7007  			case 'e':
  7008  				cloexec = 1
  7009  				break
  7010  				fallthrough
  7011  			case 'x':
  7012  				exclusive = 1
  7013  				break
  7014  				fallthrough
  7015  			case 'f':
  7016  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FILTERED
  7017  				break
  7018  				fallthrough
  7019  			case 'h':
  7020  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_HUFFMAN_ONLY
  7021  				break
  7022  				fallthrough
  7023  			case 'R':
  7024  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_RLE
  7025  				break
  7026  				fallthrough
  7027  			case 'F':
  7028  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FIXED
  7029  				break
  7030  				fallthrough
  7031  			case 'T':
  7032  				(*Gz_state)(unsafe.Pointer(state)).Fdirect = 1
  7033  				break
  7034  				fallthrough
  7035  			default: // could consider as an error, but just ignore
  7036  
  7037  			}
  7038  		}
  7039  		mode++
  7040  	}
  7041  
  7042  	// must provide an "r", "w", or "a"
  7043  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_NONE {
  7044  		libc.Xfree(tls, state)
  7045  		return uintptr(0)
  7046  	}
  7047  
  7048  	// can't force transparent read
  7049  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7050  		if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 {
  7051  			libc.Xfree(tls, state)
  7052  			return uintptr(0)
  7053  		}
  7054  		(*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 // for empty file
  7055  	}
  7056  
  7057  	// save the path name for error messages
  7058  	len = libc.Xstrlen(tls, path)
  7059  	(*Gz_state)(unsafe.Pointer(state)).Fpath = libc.Xmalloc(tls, len+Z_size_t(1))
  7060  	if (*Gz_state)(unsafe.Pointer(state)).Fpath == uintptr(0) {
  7061  		libc.Xfree(tls, state)
  7062  		return uintptr(0)
  7063  	}
  7064  	libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath, len+Z_size_t(1), ts+76, libc.VaList(bp, path))
  7065  
  7066  	// compute the flags for open()
  7067  	oflag = func() int32 {
  7068  		if cloexec != 0 {
  7069  			return O_CLOEXEC
  7070  		}
  7071  		return 0
  7072  	}() | func() int32 {
  7073  		if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7074  			return O_RDONLY
  7075  		}
  7076  		return O_WRONLY | O_CREAT | func() int32 {
  7077  			if exclusive != 0 {
  7078  				return O_EXCL
  7079  			}
  7080  			return 0
  7081  		}() | func() int32 {
  7082  			if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_WRITE {
  7083  				return O_TRUNC
  7084  			}
  7085  			return O_APPEND
  7086  		}()
  7087  	}()
  7088  
  7089  	// open the file with the appropriate flags (or just use fd)
  7090  	(*Gz_state)(unsafe.Pointer(state)).Ffd = func() int32 {
  7091  		if fd > -1 {
  7092  			return fd
  7093  		}
  7094  		return libc.Xopen(tls, path, oflag, libc.VaList(bp+8, 0666))
  7095  	}()
  7096  	if (*Gz_state)(unsafe.Pointer(state)).Ffd == -1 {
  7097  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)
  7098  		libc.Xfree(tls, state)
  7099  		return uintptr(0)
  7100  	}
  7101  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_APPEND {
  7102  		libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_END) // so gzoffset() is correct
  7103  		(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE                          // simplify later checks
  7104  	}
  7105  
  7106  	// save the current position for rewinding (only if reading)
  7107  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7108  		(*Gz_state)(unsafe.Pointer(state)).Fstart = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR)
  7109  		if (*Gz_state)(unsafe.Pointer(state)).Fstart == int64(-1) {
  7110  			(*Gz_state)(unsafe.Pointer(state)).Fstart = int64(0)
  7111  		}
  7112  	}
  7113  
  7114  	// initialize stream
  7115  	gz_reset(tls, state)
  7116  
  7117  	// return stream
  7118  	return state
  7119  }
  7120  
  7121  // -- see zlib.h --
  7122  func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:270:16: */
  7123  	return gz_open(tls, path, -1, mode)
  7124  }
  7125  
  7126  // -- see zlib.h --
  7127  func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:278:16: */
  7128  	return gz_open(tls, path, -1, mode)
  7129  }
  7130  
  7131  // -- see zlib.h --
  7132  func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) GzFile { /* gzlib.c:286:16: */
  7133  	bp := tls.Alloc(8)
  7134  	defer tls.Free(8)
  7135  
  7136  	var path uintptr // identifier for error messages
  7137  	var gz GzFile
  7138  
  7139  	if fd == -1 || libc.AssignUintptr(&path, libc.Xmalloc(tls, uint32(7)+uint32(3)*uint32(unsafe.Sizeof(int32(0))))) == uintptr(0) {
  7140  		return uintptr(0)
  7141  	}
  7142  	libc.Xsnprintf(tls, path, uint32(7)+uint32(3)*uint32(unsafe.Sizeof(int32(0))), ts+79, libc.VaList(bp, fd))
  7143  	gz = gz_open(tls, path, fd, mode)
  7144  	libc.Xfree(tls, path)
  7145  	return gz
  7146  }
  7147  
  7148  // -- see zlib.h --
  7149  
  7150  // -- see zlib.h --
  7151  func Xgzbuffer(tls *libc.TLS, file GzFile, size uint32) int32 { /* gzlib.c:316:13: */
  7152  	var state Gz_statep
  7153  
  7154  	// get internal structure and check integrity
  7155  	if file == uintptr(0) {
  7156  		return -1
  7157  	}
  7158  	state = file
  7159  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7160  		return -1
  7161  	}
  7162  
  7163  	// make sure we haven't already allocated memory
  7164  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != uint32(0) {
  7165  		return -1
  7166  	}
  7167  
  7168  	// check and set requested size
  7169  	if size<<1 < size {
  7170  		return -1
  7171  	} // need to be able to double it
  7172  	if size < uint32(2) {
  7173  		size = uint32(2)
  7174  	} // need two bytes to check magic header
  7175  	(*Gz_state)(unsafe.Pointer(state)).Fwant = size
  7176  	return 0
  7177  }
  7178  
  7179  // -- see zlib.h --
  7180  func Xgzrewind(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:343:13: */
  7181  	var state Gz_statep
  7182  
  7183  	// get internal structure
  7184  	if file == uintptr(0) {
  7185  		return -1
  7186  	}
  7187  	state = file
  7188  
  7189  	// check that we're reading and that there's no error
  7190  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7191  		return -1
  7192  	}
  7193  
  7194  	// back up and start over
  7195  	if libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fstart, SEEK_SET) == int64(-1) {
  7196  		return -1
  7197  	}
  7198  	gz_reset(tls, state)
  7199  	return 0
  7200  }
  7201  
  7202  // -- see zlib.h --
  7203  func Xgzseek64(tls *libc.TLS, file GzFile, offset Off_t, whence int32) Off_t { /* gzlib.c:366:19: */
  7204  	var n uint32
  7205  	var ret Off_t
  7206  	var state Gz_statep
  7207  
  7208  	// get internal structure and check integrity
  7209  	if file == uintptr(0) {
  7210  		return int64(-1)
  7211  	}
  7212  	state = file
  7213  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7214  		return int64(-1)
  7215  	}
  7216  
  7217  	// check that there's no error
  7218  	if (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7219  		return int64(-1)
  7220  	}
  7221  
  7222  	// can only seek from start or relative to current position
  7223  	if whence != SEEK_SET && whence != SEEK_CUR {
  7224  		return int64(-1)
  7225  	}
  7226  
  7227  	// normalize offset to a SEEK_CUR specification
  7228  	if whence == SEEK_SET {
  7229  		offset = offset - (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos
  7230  	} else if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  7231  		offset = offset + (*Gz_state)(unsafe.Pointer(state)).Fskip
  7232  	}
  7233  	(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  7234  
  7235  	// if within raw area while reading, just go there
  7236  	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) {
  7237  		ret = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, offset-Off_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave), SEEK_CUR)
  7238  		if ret == int64(-1) {
  7239  			return int64(-1)
  7240  		}
  7241  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  7242  		(*Gz_state)(unsafe.Pointer(state)).Feof = 0
  7243  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  7244  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  7245  		Xgz_error(tls, state, Z_OK, uintptr(0))
  7246  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0)
  7247  		*(*Off_t)(unsafe.Pointer(state + 8)) += offset
  7248  		return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos
  7249  	}
  7250  
  7251  	// calculate skip amount, rewinding if needed for back seek when reading
  7252  	if offset < int64(0) {
  7253  		if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { // writing -- can't go backwards
  7254  			return int64(-1)
  7255  		}
  7256  		offset = offset + (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos
  7257  		if offset < int64(0) { // before start of file!
  7258  			return int64(-1)
  7259  		}
  7260  		if Xgzrewind(tls, file) == -1 { // rewind, then skip to offset
  7261  			return int64(-1)
  7262  		}
  7263  	}
  7264  
  7265  	// if reading, skip what's in output buffer (one less gzgetc() check)
  7266  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7267  		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 {
  7268  			n = uint32(offset)
  7269  		} else {
  7270  			n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  7271  		}
  7272  		*(*uint32)(unsafe.Pointer(state)) -= n
  7273  		*(*uintptr)(unsafe.Pointer(state + 4)) += uintptr(n)
  7274  		*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(n)
  7275  		offset = offset - Off_t(n)
  7276  	}
  7277  
  7278  	// request skip (if not zero)
  7279  	if offset != 0 {
  7280  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 1
  7281  		(*Gz_state)(unsafe.Pointer(state)).Fskip = offset
  7282  	}
  7283  	return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + offset
  7284  }
  7285  
  7286  // -- see zlib.h --
  7287  func Xgzseek(tls *libc.TLS, file GzFile, offset Off_t, whence int32) Off_t { /* gzlib.c:443:17: */
  7288  	var ret Off_t
  7289  
  7290  	ret = Xgzseek64(tls, file, offset, whence)
  7291  	if ret == ret {
  7292  		return ret
  7293  	}
  7294  	return int64(-1)
  7295  }
  7296  
  7297  // -- see zlib.h --
  7298  func Xgztell64(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:455:19: */
  7299  	var state Gz_statep
  7300  
  7301  	// get internal structure and check integrity
  7302  	if file == uintptr(0) {
  7303  		return int64(-1)
  7304  	}
  7305  	state = file
  7306  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7307  		return int64(-1)
  7308  	}
  7309  
  7310  	// return position
  7311  	return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + func() int64 {
  7312  		if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  7313  			return (*Gz_state)(unsafe.Pointer(state)).Fskip
  7314  		}
  7315  		return int64(0)
  7316  	}()
  7317  }
  7318  
  7319  // -- see zlib.h --
  7320  func Xgztell(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:472:17: */
  7321  	var ret Off_t
  7322  
  7323  	ret = Xgztell64(tls, file)
  7324  	if ret == ret {
  7325  		return ret
  7326  	}
  7327  	return int64(-1)
  7328  }
  7329  
  7330  // -- see zlib.h --
  7331  func Xgzoffset64(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:482:19: */
  7332  	var offset Off_t
  7333  	var state Gz_statep
  7334  
  7335  	// get internal structure and check integrity
  7336  	if file == uintptr(0) {
  7337  		return int64(-1)
  7338  	}
  7339  	state = file
  7340  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7341  		return int64(-1)
  7342  	}
  7343  
  7344  	// compute and return effective offset in file
  7345  	offset = libc.Xlseek(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR)
  7346  	if offset == int64(-1) {
  7347  		return int64(-1)
  7348  	}
  7349  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // reading
  7350  		offset = offset - Off_t((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in)
  7351  	} // don't count buffered input
  7352  	return offset
  7353  }
  7354  
  7355  // -- see zlib.h --
  7356  func Xgzoffset(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:505:17: */
  7357  	var ret Off_t
  7358  
  7359  	ret = Xgzoffset64(tls, file)
  7360  	if ret == ret {
  7361  		return ret
  7362  	}
  7363  	return int64(-1)
  7364  }
  7365  
  7366  // -- see zlib.h --
  7367  func Xgzeof(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:515:13: */
  7368  	var state Gz_statep
  7369  
  7370  	// get internal structure and check integrity
  7371  	if file == uintptr(0) {
  7372  		return 0
  7373  	}
  7374  	state = file
  7375  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7376  		return 0
  7377  	}
  7378  
  7379  	// return end-of-file state
  7380  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7381  		return (*Gz_state)(unsafe.Pointer(state)).Fpast
  7382  	}
  7383  	return 0
  7384  }
  7385  
  7386  // -- see zlib.h --
  7387  func Xgzerror(tls *libc.TLS, file GzFile, errnum uintptr) uintptr { /* gzlib.c:532:12: */
  7388  	var state Gz_statep
  7389  
  7390  	// get internal structure and check integrity
  7391  	if file == uintptr(0) {
  7392  		return uintptr(0)
  7393  	}
  7394  	state = file
  7395  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7396  		return uintptr(0)
  7397  	}
  7398  
  7399  	// return error information
  7400  	if errnum != uintptr(0) {
  7401  		*(*int32)(unsafe.Pointer(errnum)) = (*Gz_state)(unsafe.Pointer(state)).Ferr
  7402  	}
  7403  	if (*Gz_state)(unsafe.Pointer(state)).Ferr == -4 {
  7404  		return ts + 87 /* "out of memory" */
  7405  	}
  7406  	return func() uintptr {
  7407  		if (*Gz_state)(unsafe.Pointer(state)).Fmsg == uintptr(0) {
  7408  			return ts + 101
  7409  		}
  7410  		return (*Gz_state)(unsafe.Pointer(state)).Fmsg
  7411  	}()
  7412  }
  7413  
  7414  // -- see zlib.h --
  7415  func Xgzclearerr(tls *libc.TLS, file GzFile) { /* gzlib.c:553:14: */
  7416  	var state Gz_statep
  7417  
  7418  	// get internal structure and check integrity
  7419  	if file == uintptr(0) {
  7420  		return
  7421  	}
  7422  	state = file
  7423  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ && (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  7424  		return
  7425  	}
  7426  
  7427  	// clear error and end-of-file
  7428  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  7429  		(*Gz_state)(unsafe.Pointer(state)).Feof = 0
  7430  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  7431  	}
  7432  	Xgz_error(tls, state, Z_OK, uintptr(0))
  7433  }
  7434  
  7435  // Create an error message in allocated memory and set state->err and
  7436  //    state->msg accordingly.  Free any previous error message already there.  Do
  7437  //    not try to free or allocate space if the error is Z_MEM_ERROR (out of
  7438  //    memory).  Simply save the error message as a static string.  If there is an
  7439  //    allocation failure constructing the error message, then convert the error to
  7440  //    out of memory.
  7441  func Xgz_error(tls *libc.TLS, state Gz_statep, err int32, msg uintptr) { /* gzlib.c:579:20: */
  7442  	bp := tls.Alloc(24)
  7443  	defer tls.Free(24)
  7444  
  7445  	// free previously allocated message and clear
  7446  	if (*Gz_state)(unsafe.Pointer(state)).Fmsg != uintptr(0) {
  7447  		if (*Gz_state)(unsafe.Pointer(state)).Ferr != -4 {
  7448  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg)
  7449  		}
  7450  		(*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0)
  7451  	}
  7452  
  7453  	// if fatal, set state->x.have to 0 so that the gzgetc() macro fails
  7454  	if err != Z_OK && err != -5 {
  7455  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  7456  	}
  7457  
  7458  	// set error code, and if no message, then done
  7459  	(*Gz_state)(unsafe.Pointer(state)).Ferr = err
  7460  	if msg == uintptr(0) {
  7461  		return
  7462  	}
  7463  
  7464  	// for an out of memory error, return literal string when requested
  7465  	if err == -4 {
  7466  		return
  7467  	}
  7468  
  7469  	// construct error message with path
  7470  	if libc.AssignPtrUintptr(state+92, libc.Xmalloc(tls, libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg)+Size_t(3))) == uintptr(0) {
  7471  		(*Gz_state)(unsafe.Pointer(state)).Ferr = -4
  7472  		return
  7473  	}
  7474  	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),
  7475  		ts+102, libc.VaList(bp, (*Gz_state)(unsafe.Pointer(state)).Fpath, ts+109, msg))
  7476  }
  7477  
  7478  // Use read() to load a buffer -- return -1 on error, otherwise 0.  Read from
  7479  //    state->fd, and update state->eof, state->err, and state->msg as appropriate.
  7480  //    This function needs to loop on read(), since read() is not guaranteed to
  7481  //    read the number of bytes requested, depending on the type of descriptor.
  7482  func gz_load(tls *libc.TLS, state Gz_statep, buf uintptr, len uint32, have uintptr) int32 { /* gzread.c:21:11: */
  7483  	var ret int32
  7484  	var get uint32
  7485  	var max uint32 = uint32(libc.Uint32(libc.Uint32FromInt32(-1)))>>2 + uint32(1)
  7486  
  7487  	*(*uint32)(unsafe.Pointer(have)) = uint32(0)
  7488  	for ok := true; ok; ok = *(*uint32)(unsafe.Pointer(have)) < len {
  7489  		get = len - *(*uint32)(unsafe.Pointer(have))
  7490  		if get > max {
  7491  			get = max
  7492  		}
  7493  		ret = libc.Xread(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, buf+uintptr(*(*uint32)(unsafe.Pointer(have))), get)
  7494  		if ret <= 0 {
  7495  			break
  7496  		}
  7497  		*(*uint32)(unsafe.Pointer(have)) += uint32(ret)
  7498  	}
  7499  	if ret < 0 {
  7500  		Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__error(tls)))))
  7501  		return -1
  7502  	}
  7503  	if ret == 0 {
  7504  		(*Gz_state)(unsafe.Pointer(state)).Feof = 1
  7505  	}
  7506  	return 0
  7507  }
  7508  
  7509  // Load up input buffer and set eof flag if last data loaded -- return -1 on
  7510  //    error, 0 otherwise.  Note that the eof flag is set when the end of the input
  7511  //    file is reached, even though there may be unused data in the buffer.  Once
  7512  //    that data has been used, no more attempts will be made to read the file.
  7513  //    If strm->avail_in != 0, then the current data is moved to the beginning of
  7514  //    the input buffer, and then the remainder of the buffer is loaded with the
  7515  //    available data from the input file.
  7516  func gz_avail(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:56:11: */
  7517  	bp := tls.Alloc(4)
  7518  	defer tls.Free(4)
  7519  
  7520  	// var got uint32 at bp, 4
  7521  
  7522  	var strm Z_streamp = state + 96
  7523  
  7524  	if (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7525  		return -1
  7526  	}
  7527  	if (*Gz_state)(unsafe.Pointer(state)).Feof == 0 {
  7528  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { // copy what's there to the start
  7529  			var p uintptr = (*Gz_state)(unsafe.Pointer(state)).Fin
  7530  			var q uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
  7531  			var n uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  7532  			for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
  7533  				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1)))
  7534  			}
  7535  		}
  7536  		if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in),
  7537  			(*Gz_state)(unsafe.Pointer(state)).Fsize-(*Z_stream)(unsafe.Pointer(strm)).Favail_in, bp) == -1 {
  7538  			return -1
  7539  		}
  7540  		*(*UInt)(unsafe.Pointer(strm + 4)) += *(*uint32)(unsafe.Pointer(bp))
  7541  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  7542  	}
  7543  	return 0
  7544  }
  7545  
  7546  // Look for gzip header, set up for inflate or copy.  state->x.have must be 0.
  7547  //    If this is the first time in, allocate required memory.  state->how will be
  7548  //    left unchanged if there is no more input data available, will be set to COPY
  7549  //    if there is no gzip header and direct copying will be performed, or it will
  7550  //    be set to GZIP for decompression.  If direct copying, then leftover input
  7551  //    data from the input buffer will be copied to the output buffer.  In that
  7552  //    case, all further file reads will be directly to either the output buffer or
  7553  //    a user buffer.  If decompressing, the inflate state will be initialized.
  7554  //    gz_look() will return 0 on success or -1 on failure.
  7555  func gz_look(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:91:11: */
  7556  	var strm Z_streamp = state + 96
  7557  
  7558  	// allocate read buffers and inflate memory
  7559  	if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) {
  7560  		// allocate buffers
  7561  		(*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, (*Gz_state)(unsafe.Pointer(state)).Fwant)
  7562  		(*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, (*Gz_state)(unsafe.Pointer(state)).Fwant<<1)
  7563  		if (*Gz_state)(unsafe.Pointer(state)).Fin == uintptr(0) || (*Gz_state)(unsafe.Pointer(state)).Fout == uintptr(0) {
  7564  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  7565  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  7566  			Xgz_error(tls, state, -4, ts+87)
  7567  			return -1
  7568  		}
  7569  		(*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant
  7570  
  7571  		// allocate inflate memory
  7572  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzalloc = Alloc_func(Z_NULL)
  7573  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzfree = Free_func(Z_NULL)
  7574  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fopaque = Voidpf(Z_NULL)
  7575  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0)
  7576  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = uintptr(Z_NULL)
  7577  		if XinflateInit2_(tls, state+96, 15+16, ts, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK { // gunzip
  7578  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  7579  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  7580  			(*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0)
  7581  			Xgz_error(tls, state, -4, ts+87)
  7582  			return -1
  7583  		}
  7584  	}
  7585  
  7586  	// get at least the magic bytes in the input buffer
  7587  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in < UInt(2) {
  7588  		if gz_avail(tls, state) == -1 {
  7589  			return -1
  7590  		}
  7591  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
  7592  			return 0
  7593  		}
  7594  	}
  7595  
  7596  	// look for gzip magic bytes -- if there, do gzip decoding (note: there is
  7597  	//        a logical dilemma here when considering the case of a partially written
  7598  	//        gzip file, to wit, if a single 31 byte is written, then we cannot tell
  7599  	//        whether this is a single-byte file, or just a partially written gzip
  7600  	//        file -- for here we assume that if a gzip file is being written, then
  7601  	//        the header will be written in a single operation, so that reading a
  7602  	//        single byte is sufficient indication that it is not a gzip file)
  7603  	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 {
  7604  		XinflateReset(tls, strm)
  7605  		(*Gz_state)(unsafe.Pointer(state)).Fhow = /* GZIP */ 2
  7606  		(*Gz_state)(unsafe.Pointer(state)).Fdirect = 0
  7607  		return 0
  7608  	}
  7609  
  7610  	// no gzip header -- if we were decoding gzip before, then this is trailing
  7611  	//        garbage.  Ignore the trailing garbage and finish.
  7612  	if (*Gz_state)(unsafe.Pointer(state)).Fdirect == 0 {
  7613  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0)
  7614  		(*Gz_state)(unsafe.Pointer(state)).Feof = 1
  7615  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  7616  		return 0
  7617  	}
  7618  
  7619  	// doing raw i/o, copy any leftover input to output -- this assumes that
  7620  	//        the output buffer is larger than the input buffer, which also assures
  7621  	//        space for gzungetc()
  7622  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout
  7623  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 {
  7624  		libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in)
  7625  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  7626  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0)
  7627  	}
  7628  	(*Gz_state)(unsafe.Pointer(state)).Fhow = COPY1
  7629  	(*Gz_state)(unsafe.Pointer(state)).Fdirect = 1
  7630  	return 0
  7631  }
  7632  
  7633  // Decompress from input to the provided next_out and avail_out in the state.
  7634  //    On return, state->x.have and state->x.next point to the just decompressed
  7635  //    data.  If the gzip stream completes, state->how is reset to LOOK to look for
  7636  //    the next gzip stream or raw data, once state->x.have is depleted.  Returns 0
  7637  //    on success, -1 on failure.
  7638  func gz_decomp(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:175:11: */
  7639  	var ret int32 = Z_OK
  7640  	var had uint32
  7641  	var strm Z_streamp = state + 96
  7642  
  7643  	// fill output buffer up to end of deflate stream
  7644  	had = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  7645  	for ok := true; ok; ok = (*Z_stream)(unsafe.Pointer(strm)).Favail_out != 0 && ret != Z_STREAM_END {
  7646  		// get more input for inflate()
  7647  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && gz_avail(tls, state) == -1 {
  7648  			return -1
  7649  		}
  7650  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
  7651  			Xgz_error(tls, state, -5, ts+112)
  7652  			break
  7653  		}
  7654  
  7655  		// decompress and handle errors
  7656  		ret = Xinflate(tls, strm, Z_NO_FLUSH)
  7657  		if ret == -2 || ret == Z_NEED_DICT {
  7658  			Xgz_error(tls, state, -2,
  7659  				ts+135)
  7660  			return -1
  7661  		}
  7662  		if ret == -4 {
  7663  			Xgz_error(tls, state, -4, ts+87)
  7664  			return -1
  7665  		}
  7666  		if ret == -3 { // deflate stream invalid
  7667  			Xgz_error(tls, state, -3,
  7668  				func() uintptr {
  7669  					if (*Z_stream)(unsafe.Pointer(strm)).Fmsg == uintptr(0) {
  7670  						return ts + 174 /* "compressed data ..." */
  7671  					}
  7672  					return (*Z_stream)(unsafe.Pointer(strm)).Fmsg
  7673  				}())
  7674  			return -1
  7675  		}
  7676  	}
  7677  
  7678  	// update available output
  7679  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = had - (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  7680  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)
  7681  
  7682  	// if the gzip stream completed successfully, look for another
  7683  	if ret == Z_STREAM_END {
  7684  		(*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK
  7685  	}
  7686  
  7687  	// good decompression
  7688  	return 0
  7689  }
  7690  
  7691  // Fetch data and put it in the output buffer.  Assumes state->x.have is 0.
  7692  //    Data is either copied from the input file or decompressed from the input
  7693  //    file depending on state->how.  If state->how is LOOK, then a gzip header is
  7694  //    looked for to determine whether to copy or decompress.  Returns -1 on error,
  7695  //    otherwise 0.  gz_fetch() will leave state->how as COPY or GZIP unless the
  7696  //    end of the input file has been reached and all data has been processed.
  7697  func gz_fetch(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:229:11: */
  7698  	var strm Z_streamp = state + 96
  7699  
  7700  	for ok := true; ok; ok = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) && (!((*Gz_state)(unsafe.Pointer(state)).Feof != 0) || (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) {
  7701  		switch (*Gz_state)(unsafe.Pointer(state)).Fhow {
  7702  		case LOOK: // -> LOOK, COPY (only if never GZIP), or GZIP
  7703  			if gz_look(tls, state) == -1 {
  7704  				return -1
  7705  			}
  7706  			if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK {
  7707  				return 0
  7708  			}
  7709  			break
  7710  		case COPY1: // -> COPY
  7711  			if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fout, (*Gz_state)(unsafe.Pointer(state)).Fsize<<1, state) ==
  7712  				-1 {
  7713  				return -1
  7714  			}
  7715  			(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout
  7716  			return 0
  7717  		case /* GZIP */ 2: // -> GZIP or LOOK (if end of gzip stream)
  7718  			(*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize << 1
  7719  			(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout
  7720  			if gz_decomp(tls, state) == -1 {
  7721  				return -1
  7722  			}
  7723  		}
  7724  	}
  7725  	return 0
  7726  }
  7727  
  7728  // Skip len uncompressed bytes of output.  Return -1 on error, 0 on success.
  7729  func gz_skip(tls *libc.TLS, state Gz_statep, len Off_t) int32 { /* gzread.c:259:11: */
  7730  	var n uint32
  7731  
  7732  	// skip over len bytes or reach end-of-file, whichever comes first
  7733  	for len != 0 {
  7734  		// skip over whatever is in output buffer
  7735  		if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 {
  7736  			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 {
  7737  				n = uint32(len)
  7738  			} else {
  7739  				n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  7740  			}
  7741  			*(*uint32)(unsafe.Pointer(state)) -= n
  7742  			*(*uintptr)(unsafe.Pointer(state + 4)) += uintptr(n)
  7743  			*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(n)
  7744  			len = len - Off_t(n)
  7745  		} else if (*Gz_state)(unsafe.Pointer(state)).Feof != 0 && (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) {
  7746  			break
  7747  		} else {
  7748  			// get more output, looking for header if required
  7749  			if gz_fetch(tls, state) == -1 {
  7750  				return -1
  7751  			}
  7752  		}
  7753  	}
  7754  	return 0
  7755  }
  7756  
  7757  // Read len bytes into buf from file, or less than len up to the end of the
  7758  //    input.  Return the number of bytes read.  If zero is returned, either the
  7759  //    end of file was reached, or there was an error.  state->err must be
  7760  //    consulted in that case to determine which.
  7761  func gz_read(tls *libc.TLS, state Gz_statep, buf Voidp, len Z_size_t) Z_size_t { /* gzread.c:294:16: */
  7762  	bp := tls.Alloc(4)
  7763  	defer tls.Free(4)
  7764  
  7765  	var got Z_size_t
  7766  	// var n uint32 at bp, 4
  7767  
  7768  	// if len is zero, avoid unnecessary operations
  7769  	if len == Z_size_t(0) {
  7770  		return Z_size_t(0)
  7771  	}
  7772  
  7773  	// process a skip request
  7774  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  7775  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  7776  		if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  7777  			return Z_size_t(0)
  7778  		}
  7779  	}
  7780  
  7781  	// get len bytes to buf, or less than len if at the end
  7782  	got = Z_size_t(0)
  7783  	for ok := true; ok; ok = len != 0 {
  7784  		// set n to the maximum amount of len that fits in an unsigned int
  7785  		*(*uint32)(unsafe.Pointer(bp /* n */)) = libc.Uint32FromInt32(-1)
  7786  		if *(*uint32)(unsafe.Pointer(bp)) > len {
  7787  			*(*uint32)(unsafe.Pointer(bp /* n */)) = len
  7788  		}
  7789  
  7790  		// first just try copying data from the output buffer
  7791  		if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 {
  7792  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave < *(*uint32)(unsafe.Pointer(bp)) {
  7793  				*(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  7794  			}
  7795  			libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, *(*uint32)(unsafe.Pointer(bp /* n */)))
  7796  			*(*uintptr)(unsafe.Pointer(state + 4)) += uintptr(*(*uint32)(unsafe.Pointer(bp)))
  7797  			*(*uint32)(unsafe.Pointer(state)) -= *(*uint32)(unsafe.Pointer(bp))
  7798  		} else if (*Gz_state)(unsafe.Pointer(state)).Feof != 0 && (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) {
  7799  			(*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // tried to read past end
  7800  			break
  7801  		} else if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK || *(*uint32)(unsafe.Pointer(bp)) < (*Gz_state)(unsafe.Pointer(state)).Fsize<<1 {
  7802  			// get more output, looking for header if required
  7803  			if gz_fetch(tls, state) == -1 {
  7804  				return Z_size_t(0)
  7805  			}
  7806  			continue // no progress yet -- go back to copy above
  7807  			// the copy above assures that we will leave with space in the
  7808  			//                output buffer, allowing at least one gzungetc() to succeed
  7809  		} else if (*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1 { // read directly
  7810  			if gz_load(tls, state, buf, *(*uint32)(unsafe.Pointer(bp)), bp) == -1 {
  7811  				return Z_size_t(0)
  7812  			}
  7813  		} else { // state->how == GZIP
  7814  			(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_out = *(*uint32)(unsafe.Pointer(bp /* n */))
  7815  			(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_out = buf
  7816  			if gz_decomp(tls, state) == -1 {
  7817  				return Z_size_t(0)
  7818  			}
  7819  			*(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  7820  			(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  7821  		}
  7822  
  7823  		// update progress
  7824  		len = len - *(*uint32)(unsafe.Pointer(bp))
  7825  		buf = buf + uintptr(*(*uint32)(unsafe.Pointer(bp)))
  7826  		got = got + *(*uint32)(unsafe.Pointer(bp))
  7827  		*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(*(*uint32)(unsafe.Pointer(bp)))
  7828  	}
  7829  
  7830  	// return number of bytes read into user buffer
  7831  	return got
  7832  }
  7833  
  7834  // -- see zlib.h --
  7835  func Xgzread(tls *libc.TLS, file GzFile, buf Voidp, len uint32) int32 { /* gzread.c:375:13: */
  7836  	var state Gz_statep
  7837  
  7838  	// get internal structure
  7839  	if file == uintptr(0) {
  7840  		return -1
  7841  	}
  7842  	state = file
  7843  
  7844  	// check that we're reading and that there's no (serious) error
  7845  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7846  		return -1
  7847  	}
  7848  
  7849  	// since an int is returned, make sure len fits in one, otherwise return
  7850  	//        with an error (this avoids a flaw in the interface)
  7851  	if int32(len) < 0 {
  7852  		Xgz_error(tls, state, -2, ts+196)
  7853  		return -1
  7854  	}
  7855  
  7856  	// read len or fewer bytes to buf
  7857  	len = gz_read(tls, state, buf, len)
  7858  
  7859  	// check for an error
  7860  	if len == uint32(0) && (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7861  		return -1
  7862  	}
  7863  
  7864  	// return the number of bytes read (this is assured to fit in an int)
  7865  	return int32(len)
  7866  }
  7867  
  7868  // -- see zlib.h --
  7869  func Xgzfread(tls *libc.TLS, buf Voidp, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzread.c:411:18: */
  7870  	var len Z_size_t
  7871  	var state Gz_statep
  7872  
  7873  	// get internal structure
  7874  	if file == uintptr(0) {
  7875  		return Z_size_t(0)
  7876  	}
  7877  	state = file
  7878  
  7879  	// check that we're reading and that there's no (serious) error
  7880  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7881  		return Z_size_t(0)
  7882  	}
  7883  
  7884  	// compute bytes to read -- error on overflow
  7885  	len = nitems * size
  7886  	if size != 0 && len/size != nitems {
  7887  		Xgz_error(tls, state, -2, ts+227)
  7888  		return Z_size_t(0)
  7889  	}
  7890  
  7891  	// read len or fewer bytes to buf, return the number of full items read
  7892  	if len != 0 {
  7893  		return gz_read(tls, state, buf, len) / size
  7894  	}
  7895  	return uint32(0)
  7896  }
  7897  
  7898  // -- see zlib.h --
  7899  func Xgzgetc(tls *libc.TLS, file GzFile) int32 { /* gzread.c:447:13: */
  7900  	bp := tls.Alloc(1)
  7901  	defer tls.Free(1)
  7902  
  7903  	var ret int32
  7904  	// var buf [1]uint8 at bp, 1
  7905  
  7906  	var state Gz_statep
  7907  
  7908  	// get internal structure
  7909  	if file == uintptr(0) {
  7910  		return -1
  7911  	}
  7912  	state = file
  7913  
  7914  	// check that we're reading and that there's no (serious) error
  7915  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7916  		return -1
  7917  	}
  7918  
  7919  	// try output buffer (no need to check for skip request)
  7920  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 {
  7921  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave--
  7922  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++
  7923  		return int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, 1))))
  7924  	}
  7925  
  7926  	// nothing there -- try gz_read()
  7927  	ret = int32(gz_read(tls, state, bp, uint32(1)))
  7928  	if ret < 1 {
  7929  		return -1
  7930  	}
  7931  	return int32(*(*uint8)(unsafe.Pointer(bp)))
  7932  }
  7933  
  7934  func Xgzgetc_(tls *libc.TLS, file GzFile) int32 { /* gzread.c:476:13: */
  7935  	return Xgzgetc(tls, file)
  7936  }
  7937  
  7938  // -- see zlib.h --
  7939  func Xgzungetc(tls *libc.TLS, c int32, file GzFile) int32 { /* gzread.c:483:13: */
  7940  	var state Gz_statep
  7941  
  7942  	// get internal structure
  7943  	if file == uintptr(0) {
  7944  		return -1
  7945  	}
  7946  	state = file
  7947  
  7948  	// check that we're reading and that there's no (serious) error
  7949  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  7950  		return -1
  7951  	}
  7952  
  7953  	// process a skip request
  7954  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  7955  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  7956  		if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  7957  			return -1
  7958  		}
  7959  	}
  7960  
  7961  	// can't push EOF
  7962  	if c < 0 {
  7963  		return -1
  7964  	}
  7965  
  7966  	// if output buffer empty, put byte at end (allows more pushing)
  7967  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) {
  7968  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(1)
  7969  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize<<1) - uintptr(1)
  7970  		*(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c)
  7971  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos--
  7972  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  7973  		return c
  7974  	}
  7975  
  7976  	// if no room, give up (must have already done a gzungetc())
  7977  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == (*Gz_state)(unsafe.Pointer(state)).Fsize<<1 {
  7978  		Xgz_error(tls, state, -3, ts+260)
  7979  		return -1
  7980  	}
  7981  
  7982  	// slide output data if needed and insert byte before existing data
  7983  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext == (*Gz_state)(unsafe.Pointer(state)).Fout {
  7984  		var src uintptr = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)
  7985  		var dest uintptr = (*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize<<1)
  7986  		for src > (*Gz_state)(unsafe.Pointer(state)).Fout {
  7987  			*(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&dest, 1))) = *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&src, 1)))
  7988  		}
  7989  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = dest
  7990  	}
  7991  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave++
  7992  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext--
  7993  	*(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c)
  7994  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos--
  7995  	(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  7996  	return c
  7997  }
  7998  
  7999  // -- see zlib.h --
  8000  func Xgzgets(tls *libc.TLS, file GzFile, buf uintptr, len int32) uintptr { /* gzread.c:543:6: */
  8001  	var left uint32
  8002  	var n uint32
  8003  	var str uintptr
  8004  	var eol uintptr
  8005  	var state Gz_statep
  8006  
  8007  	// check parameters and get internal structure
  8008  	if file == uintptr(0) || buf == uintptr(0) || len < 1 {
  8009  		return uintptr(0)
  8010  	}
  8011  	state = file
  8012  
  8013  	// check that we're reading and that there's no (serious) error
  8014  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK && (*Gz_state)(unsafe.Pointer(state)).Ferr != -5 {
  8015  		return uintptr(0)
  8016  	}
  8017  
  8018  	// process a skip request
  8019  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8020  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8021  		if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8022  			return uintptr(0)
  8023  		}
  8024  	}
  8025  
  8026  	// copy output bytes up to new line or len - 1, whichever comes first --
  8027  	//        append a terminating zero to the string (we don't check for a zero in
  8028  	//        the contents, let the user worry about that)
  8029  	str = buf
  8030  	left = uint32(len) - uint32(1)
  8031  	if left != 0 {
  8032  		for ok := true; ok; ok = left != 0 && eol == uintptr(0) {
  8033  			// assure that something is in the output buffer
  8034  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) && gz_fetch(tls, state) == -1 {
  8035  				return uintptr(0)
  8036  			} // error
  8037  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { // end of file
  8038  				(*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // read past end
  8039  				break                                        // return what we have
  8040  			}
  8041  
  8042  			// look for end-of-line in current output buffer
  8043  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > left {
  8044  				n = left
  8045  			} else {
  8046  				n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  8047  			}
  8048  			eol = libc.Xmemchr(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, '\n', n)
  8049  			if eol != uintptr(0) {
  8050  				n = uint32((int32(eol)-int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext))/1) + uint32(1)
  8051  			}
  8052  
  8053  			// copy through end-of-line, or remainder if not found
  8054  			libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, n)
  8055  			*(*uint32)(unsafe.Pointer(state)) -= n
  8056  			*(*uintptr)(unsafe.Pointer(state + 4)) += uintptr(n)
  8057  			*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(n)
  8058  			left = left - n
  8059  			buf += uintptr(n)
  8060  		}
  8061  	}
  8062  
  8063  	// return terminated string, or if nothing, end of file
  8064  	if buf == str {
  8065  		return uintptr(0)
  8066  	}
  8067  	*(*int8)(unsafe.Pointer(buf)) = int8(0)
  8068  	return str
  8069  }
  8070  
  8071  // -- see zlib.h --
  8072  func Xgzdirect(tls *libc.TLS, file GzFile) int32 { /* gzread.c:607:13: */
  8073  	var state Gz_statep
  8074  
  8075  	// get internal structure
  8076  	if file == uintptr(0) {
  8077  		return 0
  8078  	}
  8079  	state = file
  8080  
  8081  	// if the state is not known, but we can find out, then do so (this is
  8082  	//        mainly for right after a gzopen() or gzdopen())
  8083  	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) {
  8084  		gz_look(tls, state)
  8085  	}
  8086  
  8087  	// return 1 if transparent, 0 if processing a gzip stream
  8088  	return (*Gz_state)(unsafe.Pointer(state)).Fdirect
  8089  }
  8090  
  8091  // -- see zlib.h --
  8092  func Xgzclose_r(tls *libc.TLS, file GzFile) int32 { /* gzread.c:627:13: */
  8093  	var ret int32
  8094  	var err int32
  8095  	var state Gz_statep
  8096  
  8097  	// get internal structure
  8098  	if file == uintptr(0) {
  8099  		return -2
  8100  	}
  8101  	state = file
  8102  
  8103  	// check that we're reading
  8104  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ {
  8105  		return -2
  8106  	}
  8107  
  8108  	// free memory and close file
  8109  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
  8110  		XinflateEnd(tls, state+96)
  8111  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  8112  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  8113  	}
  8114  	if (*Gz_state)(unsafe.Pointer(state)).Ferr == -5 {
  8115  		err = -5
  8116  	} else {
  8117  		err = Z_OK
  8118  	}
  8119  	Xgz_error(tls, state, Z_OK, uintptr(0))
  8120  	libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)
  8121  	ret = libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd)
  8122  	libc.Xfree(tls, state)
  8123  	if ret != 0 {
  8124  		return -1
  8125  	}
  8126  	return err
  8127  }
  8128  
  8129  // Initialize state for writing a gzip file.  Mark initialization by setting
  8130  //    state->size to non-zero.  Return -1 on a memory allocation failure, or 0 on
  8131  //    success.
  8132  func gz_init(tls *libc.TLS, state Gz_statep) int32 { /* gzwrite.c:17:11: */
  8133  	var ret int32
  8134  	var strm Z_streamp = state + 96
  8135  
  8136  	// allocate input buffer (double size for gzprintf)
  8137  	(*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, (*Gz_state)(unsafe.Pointer(state)).Fwant<<1)
  8138  	if (*Gz_state)(unsafe.Pointer(state)).Fin == uintptr(0) {
  8139  		Xgz_error(tls, state, -4, ts+87)
  8140  		return -1
  8141  	}
  8142  
  8143  	// only need output buffer and deflate state if compressing
  8144  	if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) {
  8145  		// allocate output buffer
  8146  		(*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, (*Gz_state)(unsafe.Pointer(state)).Fwant)
  8147  		if (*Gz_state)(unsafe.Pointer(state)).Fout == uintptr(0) {
  8148  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  8149  			Xgz_error(tls, state, -4, ts+87)
  8150  			return -1
  8151  		}
  8152  
  8153  		// allocate deflate memory, set up for gzip compression
  8154  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = Alloc_func(Z_NULL)
  8155  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = Free_func(Z_NULL)
  8156  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = Voidpf(Z_NULL)
  8157  		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{})))
  8158  		if ret != Z_OK {
  8159  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  8160  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  8161  			Xgz_error(tls, state, -4, ts+87)
  8162  			return -1
  8163  		}
  8164  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = uintptr(0)
  8165  	}
  8166  
  8167  	// mark state as initialized
  8168  	(*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant
  8169  
  8170  	// initialize write buffer if compressing
  8171  	if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) {
  8172  		(*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize
  8173  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout
  8174  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
  8175  	}
  8176  	return 0
  8177  }
  8178  
  8179  // Compress whatever is at avail_in and next_in and write to the output file.
  8180  //    Return -1 if there is an error writing to the output file or if gz_init()
  8181  //    fails to allocate memory, otherwise 0.  flush is assumed to be a valid
  8182  //    deflate() flush value.  If flush is Z_FINISH, then the deflate() state is
  8183  //    reset to start a new gzip stream.  If gz->direct is true, then simply write
  8184  //    to the output file without compressing, and ignore flush.
  8185  func gz_comp(tls *libc.TLS, state Gz_statep, flush int32) int32 { /* gzwrite.c:73:11: */
  8186  	var ret int32
  8187  	var writ int32
  8188  	var have uint32
  8189  	var put uint32
  8190  	var max uint32 = uint32(libc.Uint32(libc.Uint32FromInt32(-1)))>>2 + uint32(1)
  8191  	var strm Z_streamp = state + 96
  8192  
  8193  	// allocate memory if this is the first time through
  8194  	if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 {
  8195  		return -1
  8196  	}
  8197  
  8198  	// write directly if requested
  8199  	if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 {
  8200  		for (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 {
  8201  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_in > max {
  8202  				put = max
  8203  			} else {
  8204  				put = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  8205  			}
  8206  			writ = libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, put)
  8207  			if writ < 0 {
  8208  				Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__error(tls)))))
  8209  				return -1
  8210  			}
  8211  			*(*UInt)(unsafe.Pointer(strm + 4)) -= uint32(writ)
  8212  			*(*uintptr)(unsafe.Pointer(strm)) += uintptr(writ)
  8213  		}
  8214  		return 0
  8215  	}
  8216  
  8217  	// run deflate() on provided input until it produces no more output
  8218  	ret = Z_OK
  8219  	for ok := true; ok; ok = have != 0 {
  8220  		// write out current buffer contents if full, or if flushing, but if
  8221  		//            doing Z_FINISH then don't write until we get to Z_STREAM_END
  8222  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) || flush != Z_NO_FLUSH && (flush != Z_FINISH || ret == Z_STREAM_END) {
  8223  			for (*Z_stream)(unsafe.Pointer(strm)).Fnext_out > (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext {
  8224  				if (int32((*Z_stream)(unsafe.Pointer(strm)).Fnext_out)-int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext))/1 > int32(max) {
  8225  					put = max
  8226  				} else {
  8227  					put = uint32((int32((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int32((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)
  8228  				}
  8229  				writ = libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, put)
  8230  				if writ < 0 {
  8231  					Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__error(tls)))))
  8232  					return -1
  8233  				}
  8234  				*(*uintptr)(unsafe.Pointer(state + 4)) += uintptr(writ)
  8235  			}
  8236  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  8237  				(*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize
  8238  				(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout
  8239  				(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout
  8240  			}
  8241  		}
  8242  
  8243  		// compress
  8244  		have = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  8245  		ret = Xdeflate(tls, strm, flush)
  8246  		if ret == -2 {
  8247  			Xgz_error(tls, state, -2,
  8248  				ts+291)
  8249  			return -1
  8250  		}
  8251  		have = have - (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  8252  	}
  8253  
  8254  	// if that completed a deflate stream, allow another to start
  8255  	if flush == Z_FINISH {
  8256  		XdeflateReset(tls, strm)
  8257  	}
  8258  
  8259  	// all done, no errors
  8260  	return 0
  8261  }
  8262  
  8263  // Compress len zeros to output.  Return -1 on a write error or memory
  8264  //    allocation failure by gz_comp(), or 0 on success.
  8265  func gz_zero(tls *libc.TLS, state Gz_statep, len Off_t) int32 { /* gzwrite.c:145:11: */
  8266  	var first int32
  8267  	var n uint32
  8268  	var strm Z_streamp = state + 96
  8269  
  8270  	// consume whatever's left in the input buffer
  8271  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8272  		return -1
  8273  	}
  8274  
  8275  	// compress len zeros (len guaranteed > 0)
  8276  	first = 1
  8277  	for len != 0 {
  8278  		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 {
  8279  			n = uint32(len)
  8280  		} else {
  8281  			n = (*Gz_state)(unsafe.Pointer(state)).Fsize
  8282  		}
  8283  		if first != 0 {
  8284  			libc.Xmemset(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, 0, n)
  8285  			first = 0
  8286  		}
  8287  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = n
  8288  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  8289  		*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(n)
  8290  		if gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8291  			return -1
  8292  		}
  8293  		len = len - Off_t(n)
  8294  	}
  8295  	return 0
  8296  }
  8297  
  8298  // Write len bytes from buf to file.  Return the number of bytes written.  If
  8299  //    the returned value is less than len, then there was an error.
  8300  func gz_write(tls *libc.TLS, state Gz_statep, buf Voidpc, len Z_size_t) Z_size_t { /* gzwrite.c:178:16: */
  8301  	var put Z_size_t = len
  8302  
  8303  	// if len is zero, avoid unnecessary operations
  8304  	if len == Z_size_t(0) {
  8305  		return Z_size_t(0)
  8306  	}
  8307  
  8308  	// allocate memory if this is the first time through
  8309  	if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 {
  8310  		return Z_size_t(0)
  8311  	}
  8312  
  8313  	// check for seek request
  8314  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8315  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8316  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8317  			return Z_size_t(0)
  8318  		}
  8319  	}
  8320  
  8321  	// for small len, copy to input buffer, otherwise compress directly
  8322  	if len < (*Gz_state)(unsafe.Pointer(state)).Fsize {
  8323  		// copy to input buffer, compress when full
  8324  		for ok := true; ok; ok = len != 0 {
  8325  			var have uint32
  8326  			var copy uint32
  8327  
  8328  			if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) {
  8329  				(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  8330  			}
  8331  			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)
  8332  			copy = (*Gz_state)(unsafe.Pointer(state)).Fsize - have
  8333  			if copy > len {
  8334  				copy = len
  8335  			}
  8336  			libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr(have), buf, copy)
  8337  			*(*UInt)(unsafe.Pointer(state + 96 + 4)) += copy
  8338  			*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(copy)
  8339  			buf = buf + uintptr(copy)
  8340  			len = len - copy
  8341  			if len != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8342  				return Z_size_t(0)
  8343  			}
  8344  		}
  8345  	} else {
  8346  		// consume whatever's left in the input buffer
  8347  		if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in != 0 && gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8348  			return Z_size_t(0)
  8349  		}
  8350  
  8351  		// directly compress user buffer to file
  8352  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = buf
  8353  		for ok1 := true; ok1; ok1 = len != 0 {
  8354  			var n uint32 = libc.Uint32(libc.Uint32FromInt32(-1))
  8355  			if n > len {
  8356  				n = len
  8357  			}
  8358  			(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = n
  8359  			*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(n)
  8360  			if gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8361  				return Z_size_t(0)
  8362  			}
  8363  			len = len - n
  8364  		}
  8365  	}
  8366  
  8367  	// input was all buffered or compressed
  8368  	return put
  8369  }
  8370  
  8371  // -- see zlib.h --
  8372  func Xgzwrite(tls *libc.TLS, file GzFile, buf Voidpc, len uint32) int32 { /* gzwrite.c:246:13: */
  8373  	var state Gz_statep
  8374  
  8375  	// get internal structure
  8376  	if file == uintptr(0) {
  8377  		return 0
  8378  	}
  8379  	state = file
  8380  
  8381  	// check that we're writing and that there's no error
  8382  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8383  		return 0
  8384  	}
  8385  
  8386  	// since an int is returned, make sure len fits in one, otherwise return
  8387  	//        with an error (this avoids a flaw in the interface)
  8388  	if int32(len) < 0 {
  8389  		Xgz_error(tls, state, -3, ts+330)
  8390  		return 0
  8391  	}
  8392  
  8393  	// write len bytes from buf (the return value will fit in an int)
  8394  	return int32(gz_write(tls, state, buf, len))
  8395  }
  8396  
  8397  // -- see zlib.h --
  8398  func Xgzfwrite(tls *libc.TLS, buf Voidpc, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzwrite.c:274:18: */
  8399  	var len Z_size_t
  8400  	var state Gz_statep
  8401  
  8402  	// get internal structure
  8403  	if file == uintptr(0) {
  8404  		return Z_size_t(0)
  8405  	}
  8406  	state = file
  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 Z_size_t(0)
  8411  	}
  8412  
  8413  	// compute bytes to read -- error on overflow
  8414  	len = nitems * size
  8415  	if size != 0 && len/size != nitems {
  8416  		Xgz_error(tls, state, -2, ts+227)
  8417  		return Z_size_t(0)
  8418  	}
  8419  
  8420  	// write len bytes to buf, return the number of full items written
  8421  	if len != 0 {
  8422  		return gz_write(tls, state, buf, len) / size
  8423  	}
  8424  	return uint32(0)
  8425  }
  8426  
  8427  // -- see zlib.h --
  8428  func Xgzputc(tls *libc.TLS, file GzFile, c int32) int32 { /* gzwrite.c:304:13: */
  8429  	bp := tls.Alloc(1)
  8430  	defer tls.Free(1)
  8431  
  8432  	var have uint32
  8433  	// var buf [1]uint8 at bp, 1
  8434  
  8435  	var state Gz_statep
  8436  	var strm Z_streamp
  8437  
  8438  	// get internal structure
  8439  	if file == uintptr(0) {
  8440  		return -1
  8441  	}
  8442  	state = file
  8443  	strm = state + 96
  8444  
  8445  	// check that we're writing and that there's no error
  8446  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8447  		return -1
  8448  	}
  8449  
  8450  	// check for seek request
  8451  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8452  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8453  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8454  			return -1
  8455  		}
  8456  	}
  8457  
  8458  	// try writing to input buffer for speed (state->size == 0 if buffer not
  8459  	//        initialized)
  8460  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
  8461  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
  8462  			(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  8463  		}
  8464  		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)
  8465  		if have < (*Gz_state)(unsafe.Pointer(state)).Fsize {
  8466  			*(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have))) = uint8(c)
  8467  			(*Z_stream)(unsafe.Pointer(strm)).Favail_in++
  8468  			(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++
  8469  			return c & 0xff
  8470  		}
  8471  	}
  8472  
  8473  	// no room in buffer or not initialized, use gz_write()
  8474  	*(*uint8)(unsafe.Pointer(bp)) = uint8(c)
  8475  	if gz_write(tls, state, bp, uint32(1)) != Z_size_t(1) {
  8476  		return -1
  8477  	}
  8478  	return c & 0xff
  8479  }
  8480  
  8481  // -- see zlib.h --
  8482  func Xgzputs(tls *libc.TLS, file GzFile, str uintptr) int32 { /* gzwrite.c:352:13: */
  8483  	var ret int32
  8484  	var len Z_size_t
  8485  	var state Gz_statep
  8486  
  8487  	// get internal structure
  8488  	if file == uintptr(0) {
  8489  		return -1
  8490  	}
  8491  	state = file
  8492  
  8493  	// check that we're writing and that there's no error
  8494  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8495  		return -1
  8496  	}
  8497  
  8498  	// write string
  8499  	len = libc.Xstrlen(tls, str)
  8500  	ret = int32(gz_write(tls, state, str, len))
  8501  	if ret == 0 && len != Z_size_t(0) {
  8502  		return -1
  8503  	}
  8504  	return ret
  8505  }
  8506  
  8507  // -
  8508  // This file is in the public domain.
  8509  // $FreeBSD$
  8510  
  8511  // -
  8512  // SPDX-License-Identifier: BSD-2-Clause
  8513  //
  8514  // Copyright (c) 2017 Poul-Henning Kamp.  All rights reserved.
  8515  //
  8516  // Redistribution and use in source and binary forms, with or without
  8517  // modification, are permitted provided that the following conditions
  8518  // are met:
  8519  // 1. Redistributions of source code must retain the above copyright
  8520  //    notice, this list of conditions and the following disclaimer.
  8521  // 2. Redistributions in binary form must reproduce the above copyright
  8522  //    notice, this list of conditions and the following disclaimer in the
  8523  //    documentation and/or other materials provided with the distribution.
  8524  //
  8525  // THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  8526  // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  8527  // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  8528  // ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  8529  // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  8530  // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  8531  // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  8532  // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  8533  // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  8534  // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  8535  // SUCH DAMAGE.
  8536  //
  8537  // $FreeBSD$
  8538  
  8539  // -- see zlib.h --
  8540  func Xgzvprintf(tls *libc.TLS, file GzFile, format uintptr, va Va_list) int32 { /* gzwrite.c:379:15: */
  8541  	var len int32
  8542  	var left uint32
  8543  	var next uintptr
  8544  	var state Gz_statep
  8545  	var strm Z_streamp
  8546  
  8547  	// get internal structure
  8548  	if file == uintptr(0) {
  8549  		return -2
  8550  	}
  8551  	state = file
  8552  	strm = state + 96
  8553  
  8554  	// check that we're writing and that there's no error
  8555  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8556  		return -2
  8557  	}
  8558  
  8559  	// make sure we have some buffer space
  8560  	if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && gz_init(tls, state) == -1 {
  8561  		return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8562  	}
  8563  
  8564  	// check for seek request
  8565  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8566  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8567  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8568  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8569  		}
  8570  	}
  8571  
  8572  	// do the printf() into the input buffer, put length in len -- the input
  8573  	//        buffer is double-sized just for this function, so there is guaranteed to
  8574  	//        be state->size bytes available after the current contents
  8575  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
  8576  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  8577  	}
  8578  	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)
  8579  	*(*int8)(unsafe.Pointer(next + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize-uint32(1)))) = int8(0)
  8580  	len = libc.Xvsnprintf(tls, next, (*Gz_state)(unsafe.Pointer(state)).Fsize, format, va)
  8581  
  8582  	// check that printf() results fit in buffer
  8583  	if len == 0 || uint32(len) >= (*Gz_state)(unsafe.Pointer(state)).Fsize || int32(*(*int8)(unsafe.Pointer(next + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize-uint32(1))))) != 0 {
  8584  		return 0
  8585  	}
  8586  
  8587  	// update buffer and position, compress first half if past that
  8588  	*(*UInt)(unsafe.Pointer(strm + 4)) += uint32(len)
  8589  	*(*Off_t)(unsafe.Pointer(state + 8)) += Off_t(len)
  8590  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in >= (*Gz_state)(unsafe.Pointer(state)).Fsize {
  8591  		left = (*Z_stream)(unsafe.Pointer(strm)).Favail_in - (*Gz_state)(unsafe.Pointer(state)).Fsize
  8592  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = (*Gz_state)(unsafe.Pointer(state)).Fsize
  8593  		if gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  8594  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8595  		}
  8596  		libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, (*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize), left)
  8597  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  8598  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = left
  8599  	}
  8600  	return len
  8601  }
  8602  
  8603  func Xgzprintf(tls *libc.TLS, file GzFile, format uintptr, va uintptr) int32 { /* gzwrite.c:451:15: */
  8604  	var va1 Va_list
  8605  	_ = va1
  8606  	var ret int32
  8607  
  8608  	va1 = va
  8609  	ret = Xgzvprintf(tls, file, format, va1)
  8610  	_ = va1
  8611  	return ret
  8612  }
  8613  
  8614  // -- see zlib.h --
  8615  func Xgzflush(tls *libc.TLS, file GzFile, flush int32) int32 { /* gzwrite.c:553:13: */
  8616  	var state Gz_statep
  8617  
  8618  	// get internal structure
  8619  	if file == uintptr(0) {
  8620  		return -2
  8621  	}
  8622  	state = file
  8623  
  8624  	// check that we're writing and that there's no error
  8625  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8626  		return -2
  8627  	}
  8628  
  8629  	// check flush parameter
  8630  	if flush < 0 || flush > Z_FINISH {
  8631  		return -2
  8632  	}
  8633  
  8634  	// check for seek request
  8635  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8636  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8637  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8638  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8639  		}
  8640  	}
  8641  
  8642  	// compress remaining data with requested flush
  8643  	gz_comp(tls, state, flush)
  8644  	return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8645  }
  8646  
  8647  // -- see zlib.h --
  8648  func Xgzsetparams(tls *libc.TLS, file GzFile, level int32, strategy int32) int32 { /* gzwrite.c:585:13: */
  8649  	var state Gz_statep
  8650  	var strm Z_streamp
  8651  
  8652  	// get internal structure
  8653  	if file == uintptr(0) {
  8654  		return -2
  8655  	}
  8656  	state = file
  8657  	strm = state + 96
  8658  
  8659  	// check that we're writing and that there's no error
  8660  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE || (*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK {
  8661  		return -2
  8662  	}
  8663  
  8664  	// if no change is requested, then do nothing
  8665  	if level == (*Gz_state)(unsafe.Pointer(state)).Flevel && strategy == (*Gz_state)(unsafe.Pointer(state)).Fstrategy {
  8666  		return Z_OK
  8667  	}
  8668  
  8669  	// check for seek request
  8670  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8671  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8672  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8673  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8674  		}
  8675  	}
  8676  
  8677  	// change compression parameters for subsequent input
  8678  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
  8679  		// flush previous input with previous parameters before changing
  8680  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 && gz_comp(tls, state, Z_BLOCK) == -1 {
  8681  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
  8682  		}
  8683  		XdeflateParams(tls, strm, level, strategy)
  8684  	}
  8685  	(*Gz_state)(unsafe.Pointer(state)).Flevel = level
  8686  	(*Gz_state)(unsafe.Pointer(state)).Fstrategy = strategy
  8687  	return Z_OK
  8688  }
  8689  
  8690  // -- see zlib.h --
  8691  func Xgzclose_w(tls *libc.TLS, file GzFile) int32 { /* gzwrite.c:627:13: */
  8692  	var ret int32 = Z_OK
  8693  	var state Gz_statep
  8694  
  8695  	// get internal structure
  8696  	if file == uintptr(0) {
  8697  		return -2
  8698  	}
  8699  	state = file
  8700  
  8701  	// check that we're writing
  8702  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
  8703  		return -2
  8704  	}
  8705  
  8706  	// check for seek request
  8707  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8708  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8709  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  8710  			ret = (*Gz_state)(unsafe.Pointer(state)).Ferr
  8711  		}
  8712  	}
  8713  
  8714  	// flush, free memory, and close file
  8715  	if gz_comp(tls, state, Z_FINISH) == -1 {
  8716  		ret = (*Gz_state)(unsafe.Pointer(state)).Ferr
  8717  	}
  8718  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
  8719  		if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) {
  8720  			XdeflateEnd(tls, state+96)
  8721  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  8722  		}
  8723  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  8724  	}
  8725  	Xgz_error(tls, state, Z_OK, uintptr(0))
  8726  	libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)
  8727  	if libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) == -1 {
  8728  		ret = -1
  8729  	}
  8730  	libc.Xfree(tls, state)
  8731  	return ret
  8732  }
  8733  
  8734  // Reverse the bytes in a 32-bit value
  8735  
  8736  // inftrees.h -- header to use inftrees.c
  8737  // Copyright (C) 1995-2005, 2010 Mark Adler
  8738  // For conditions of distribution and use, see copyright notice in zlib.h
  8739  
  8740  // WARNING: this file should *not* be used by applications. It is
  8741  //    part of the implementation of the compression library and is
  8742  //    subject to change. Applications should only use zlib.h.
  8743  //
  8744  
  8745  // Structure for decoding tables.  Each entry provides either the
  8746  //    information needed to do the operation requested by the code that
  8747  //    indexed that table entry, or it provides a pointer to another
  8748  //    table that indexes more bits of the code.  op indicates whether
  8749  //    the entry is a pointer to another table, a literal, a length or
  8750  //    distance, an end-of-block, or an invalid code.  For a table
  8751  //    pointer, the low four bits of op is the number of index bits of
  8752  //    that table.  For a length or distance, the low four bits of op
  8753  //    is the number of extra bits to get after the code.  bits is
  8754  //    the number of bits in this code or part of the code to drop off
  8755  //    of the bit buffer.  val is the actual byte to output in the case
  8756  //    of a literal, the base length or distance, or the offset from
  8757  //    the current table to the next table.  Each entry is four bytes.
  8758  type Code = struct {
  8759  	Fop   uint8
  8760  	Fbits uint8
  8761  	Fval  uint16
  8762  } /* inftrees.h:28:3 */
  8763  
  8764  // op values as set by inflate_table():
  8765  //     00000000 - literal
  8766  //     0000tttt - table link, tttt != 0 is the number of table index bits
  8767  //     0001eeee - length or distance, eeee is the number of extra bits
  8768  //     01100000 - end of block
  8769  //     01000000 - invalid code
  8770  //
  8771  
  8772  // Maximum size of the dynamic table.  The maximum number of code structures is
  8773  //    1444, which is the sum of 852 for literal/length codes and 592 for distance
  8774  //    codes.  These values were found by exhaustive searches using the program
  8775  //    examples/enough.c found in the zlib distribtution.  The arguments to that
  8776  //    program are the number of symbols, the initial root table size, and the
  8777  //    maximum bit length of a code.  "enough 286 9 15" for literal/length codes
  8778  //    returns returns 852, and "enough 30 6 15" for distance codes returns 592.
  8779  //    The initial root table size (9 or 6) is found in the fifth argument of the
  8780  //    inflate_table() calls in inflate.c and infback.c.  If the root table size is
  8781  //    changed, then these maximum sizes would be need to be recalculated and
  8782  //    updated.
  8783  
  8784  // Type of code to build for inflate_table()
  8785  type Codetype = uint32 /* inftrees.h:58:3 */
  8786  // inflate.h -- internal inflate state definition
  8787  // Copyright (C) 1995-2016 Mark Adler
  8788  // For conditions of distribution and use, see copyright notice in zlib.h
  8789  
  8790  // WARNING: this file should *not* be used by applications. It is
  8791  //    part of the implementation of the compression library and is
  8792  //    subject to change. Applications should only use zlib.h.
  8793  //
  8794  
  8795  // define NO_GZIP when compiling if you want to disable gzip header and
  8796  //    trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
  8797  //    the crc code when it is not needed.  For shared libraries, gzip decoding
  8798  //    should be left enabled.
  8799  
  8800  // Possible inflate modes between inflate() calls
  8801  type Inflate_mode = uint32 /* inflate.h:53:3 */
  8802  
  8803  //
  8804  //     State transitions between above modes -
  8805  //
  8806  //     (most modes can go to BAD or MEM on error -- not shown for clarity)
  8807  //
  8808  //     Process header:
  8809  //         HEAD -> (gzip) or (zlib) or (raw)
  8810  //         (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT ->
  8811  //                   HCRC -> TYPE
  8812  //         (zlib) -> DICTID or TYPE
  8813  //         DICTID -> DICT -> TYPE
  8814  //         (raw) -> TYPEDO
  8815  //     Read deflate blocks:
  8816  //             TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK
  8817  //             STORED -> COPY_ -> COPY -> TYPE
  8818  //             TABLE -> LENLENS -> CODELENS -> LEN_
  8819  //             LEN_ -> LEN
  8820  //     Read deflate codes in fixed or dynamic block:
  8821  //                 LEN -> LENEXT or LIT or TYPE
  8822  //                 LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
  8823  //                 LIT -> LEN
  8824  //     Process trailer:
  8825  //         CHECK -> LENGTH -> DONE
  8826  //
  8827  
  8828  // State maintained between inflate() calls -- approximately 7K bytes, not
  8829  //    including the allocated sliding window, which is up to 32K bytes.
  8830  type Inflate_state = struct {
  8831  	Fstrm     Z_streamp
  8832  	Fmode     Inflate_mode
  8833  	Flast     int32
  8834  	Fwrap     int32
  8835  	Fhavedict int32
  8836  	Fflags    int32
  8837  	Fdmax     uint32
  8838  	Fcheck    uint32
  8839  	Ftotal    uint32
  8840  	Fhead     Gz_headerp
  8841  	Fwbits    uint32
  8842  	Fwsize    uint32
  8843  	Fwhave    uint32
  8844  	Fwnext    uint32
  8845  	Fwindow   uintptr
  8846  	Fhold     uint32
  8847  	Fbits     uint32
  8848  	Flength   uint32
  8849  	Foffset   uint32
  8850  	Fextra    uint32
  8851  	Flencode  uintptr
  8852  	Fdistcode uintptr
  8853  	Flenbits  uint32
  8854  	Fdistbits uint32
  8855  	Fncode    uint32
  8856  	Fnlen     uint32
  8857  	Fndist    uint32
  8858  	Fhave     uint32
  8859  	Fnext     uintptr
  8860  	Flens     [320]uint16
  8861  	Fwork     [288]uint16
  8862  	Fcodes    [1444]Code
  8863  	Fsane     int32
  8864  	Fback     int32
  8865  	Fwas      uint32
  8866  } /* inflate.h:82:1 */
  8867  
  8868  //
  8869  //    strm provides memory allocation functions in zalloc and zfree, or
  8870  //    Z_NULL to use the library memory allocation functions.
  8871  //
  8872  //    windowBits is in the range 8..15, and window is a user-supplied
  8873  //    window and output buffer that is 2**windowBits bytes.
  8874  //
  8875  func XinflateBackInit_(tls *libc.TLS, strm Z_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) int32 { /* infback.c:28:13: */
  8876  	var state uintptr
  8877  
  8878  	if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts))) || stream_size != int32(unsafe.Sizeof(Z_stream{})) {
  8879  		return -6
  8880  	}
  8881  	if strm == uintptr(Z_NULL) || window == uintptr(Z_NULL) || windowBits < 8 || windowBits > 15 {
  8882  		return -2
  8883  	}
  8884  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error
  8885  	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
  8886  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
  8887  			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
  8888  		}{Xzcalloc}))
  8889  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
  8890  	}
  8891  	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
  8892  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
  8893  			f func(*libc.TLS, Voidpf, Voidpf)
  8894  		}{Xzcfree}))
  8895  	}
  8896  	state = (*struct {
  8897  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
  8898  	})(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{})))
  8899  	if state == uintptr(Z_NULL) {
  8900  		return -4
  8901  	}
  8902  
  8903  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = state
  8904  	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768
  8905  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = UInt(windowBits)
  8906  	(*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << windowBits
  8907  	(*Inflate_state)(unsafe.Pointer(state)).Fwindow = window
  8908  	(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
  8909  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
  8910  	return Z_OK
  8911  }
  8912  
  8913  //
  8914  //    Return state with length and distance decoding tables and index sizes set to
  8915  //    fixed code decoding.  Normally this returns fixed tables from inffixed.h.
  8916  //    If BUILDFIXED is defined, then instead this routine builds the tables the
  8917  //    first time it's called, and returns those tables the first time and
  8918  //    thereafter.  This reduces the size of the code by about 2K bytes, in
  8919  //    exchange for a little execution time.  However, BUILDFIXED should not be
  8920  //    used for threaded applications, since the rewriting of the tables and virgin
  8921  //    may not be thread-safe.
  8922  //
  8923  func fixedtables(tls *libc.TLS, state uintptr) { /* infback.c:82:12: */
  8924  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix))
  8925  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
  8926  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix))
  8927  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5)
  8928  }
  8929  
  8930  var lenfix = [512]Code{
  8931  	{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)},
  8932  	{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)},
  8933  	{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)},
  8934  	{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)},
  8935  	{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)},
  8936  	{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)},
  8937  	{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)},
  8938  	{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)},
  8939  	{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)},
  8940  	{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)},
  8941  	{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)},
  8942  	{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)},
  8943  	{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)},
  8944  	{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)},
  8945  	{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)},
  8946  	{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)},
  8947  	{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)},
  8948  	{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)},
  8949  	{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)},
  8950  	{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)},
  8951  	{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)},
  8952  	{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)},
  8953  	{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)},
  8954  	{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)},
  8955  	{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)},
  8956  	{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)},
  8957  	{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)},
  8958  	{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)},
  8959  	{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)},
  8960  	{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)},
  8961  	{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)},
  8962  	{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)},
  8963  	{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)},
  8964  	{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)},
  8965  	{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)},
  8966  	{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)},
  8967  	{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)},
  8968  	{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)},
  8969  	{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)},
  8970  	{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)},
  8971  	{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)},
  8972  	{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)},
  8973  	{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)},
  8974  	{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)},
  8975  	{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)},
  8976  	{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)},
  8977  	{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)},
  8978  	{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)},
  8979  	{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)},
  8980  	{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)},
  8981  	{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)},
  8982  	{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)},
  8983  	{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)},
  8984  	{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)},
  8985  	{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)},
  8986  	{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)},
  8987  	{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)},
  8988  	{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)},
  8989  	{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)},
  8990  	{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)},
  8991  	{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)},
  8992  	{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)},
  8993  	{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)},
  8994  	{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)},
  8995  	{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)},
  8996  	{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)},
  8997  	{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)},
  8998  	{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)},
  8999  	{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)},
  9000  	{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)},
  9001  	{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)},
  9002  	{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)},
  9003  	{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)},
  9004  	{Fbits: uint8(9), Fval: uint16(255)},
  9005  } /* inffixed.h:10:23 */
  9006  var distfix = [32]Code{
  9007  	{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)},
  9008  	{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)},
  9009  	{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)},
  9010  	{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)},
  9011  	{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)},
  9012  	{Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)},
  9013  } /* inffixed.h:87:23 */
  9014  
  9015  // Macros for inflateBack():
  9016  
  9017  // Load returned state from inflate_fast()
  9018  
  9019  // Set state from registers for inflate_fast()
  9020  
  9021  // Clear the input bit accumulator
  9022  
  9023  // Assure that some input is available.  If input is requested, but denied,
  9024  //    then return a Z_BUF_ERROR from inflateBack().
  9025  
  9026  // Get a byte of input into the bit accumulator, or return from inflateBack()
  9027  //    with an error if there is no input available.
  9028  
  9029  // Assure that there are at least n bits in the bit accumulator.  If there is
  9030  //    not enough available input to do that, then return from inflateBack() with
  9031  //    an error.
  9032  
  9033  // Return the low n bits of the bit accumulator (n < 16)
  9034  
  9035  // Remove n bits from the bit accumulator
  9036  
  9037  // Remove zero to seven bits as needed to go to a byte boundary
  9038  
  9039  // Assure that some output space is available, by writing out the window
  9040  //    if it's full.  If the write fails, return from inflateBack() with a
  9041  //    Z_BUF_ERROR.
  9042  
  9043  //
  9044  //    strm provides the memory allocation functions and window buffer on input,
  9045  //    and provides information on the unused input on return.  For Z_DATA_ERROR
  9046  //    returns, strm will also provide an error message.
  9047  //
  9048  //    in() and out() are the call-back input and output functions.  When
  9049  //    inflateBack() needs more input, it calls in().  When inflateBack() has
  9050  //    filled the window with output, or when it completes with data in the
  9051  //    window, it calls out() to write out the data.  The application must not
  9052  //    change the provided input until in() is called again or inflateBack()
  9053  //    returns.  The application must not change the window/output buffer until
  9054  //    inflateBack() returns.
  9055  //
  9056  //    in() and out() are called with a descriptor parameter provided in the
  9057  //    inflateBack() call.  This parameter can be a structure that provides the
  9058  //    information required to do the read or write, as well as accumulated
  9059  //    information on the input and output such as totals and check values.
  9060  //
  9061  //    in() should return zero on failure.  out() should return non-zero on
  9062  //    failure.  If either in() or out() fails, than inflateBack() returns a
  9063  //    Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
  9064  //    was in() or out() that caused in the error.  Otherwise,  inflateBack()
  9065  //    returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
  9066  //    error, or Z_MEM_ERROR if it could not allocate memory for the state.
  9067  //    inflateBack() can also return Z_STREAM_ERROR if the input parameters
  9068  //    are not correct, i.e. strm is Z_NULL or the state was not initialized.
  9069  //
  9070  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: */
  9071  	bp := tls.Alloc(4)
  9072  	defer tls.Free(4)
  9073  
  9074  	var state uintptr
  9075  	// var next uintptr at bp, 4
  9076  	// next input
  9077  	var put uintptr // next output
  9078  	var have uint32
  9079  	var left uint32  // available input and output
  9080  	var hold uint32  // bit buffer
  9081  	var bits uint32  // bits in bit buffer
  9082  	var copy uint32  // number of stored or match bytes to copy
  9083  	var from uintptr // where to copy match bytes from
  9084  	var here Code    // current decoding table entry
  9085  	var last Code    // parent table entry
  9086  	var len uint32   // length to copy for repeats, bits to drop
  9087  	var ret int32
  9088  
  9089  	// Check that the strm exists and that the state was initialized
  9090  	if !(strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL)) {
  9091  		goto __1
  9092  	}
  9093  	return -2
  9094  __1:
  9095  	;
  9096  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  9097  
  9098  	// Reset the state
  9099  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
  9100  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
  9101  	(*Inflate_state)(unsafe.Pointer(state)).Flast = 0
  9102  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
  9103  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
  9104  	if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(Z_NULL) {
  9105  		have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  9106  	} else {
  9107  		have = uint32(0)
  9108  	}
  9109  	hold = uint32(0)
  9110  	bits = uint32(0)
  9111  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
  9112  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
  9113  
  9114  	// Inflate until end of block marked as last
  9115  __2:
  9116  	switch (*Inflate_state)(unsafe.Pointer(state)).Fmode {
  9117  	case TYPE:
  9118  		goto __6
  9119  
  9120  	case STORED:
  9121  		goto __7
  9122  
  9123  	case TABLE:
  9124  		goto __8
  9125  
  9126  	case LEN:
  9127  		goto __9
  9128  
  9129  	case DONE:
  9130  		goto __10
  9131  
  9132  	case BAD:
  9133  		goto __11
  9134  
  9135  	default:
  9136  		goto __12
  9137  	}
  9138  	goto __5
  9139  __6:
  9140  	// determine and dispatch block type
  9141  	if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) {
  9142  		goto __13
  9143  	}
  9144  __14:
  9145  	hold >>= bits & uint32(7)
  9146  	bits = bits - bits&uint32(7)
  9147  	goto __15
  9148  __15:
  9149  	if 0 != 0 {
  9150  		goto __14
  9151  	}
  9152  	goto __16
  9153  __16:
  9154  	;
  9155  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE
  9156  	goto __5
  9157  __13:
  9158  	;
  9159  __17:
  9160  __20:
  9161  	if !(bits < uint32(3)) {
  9162  		goto __21
  9163  	}
  9164  __22:
  9165  __25:
  9166  	if !(have == uint32(0)) {
  9167  		goto __28
  9168  	}
  9169  	have = (*struct {
  9170  		f func(*libc.TLS, uintptr, uintptr) uint32
  9171  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9172  	if !(have == uint32(0)) {
  9173  		goto __29
  9174  	}
  9175  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9176  	ret = -5
  9177  	goto inf_leave
  9178  __29:
  9179  	;
  9180  __28:
  9181  	;
  9182  	goto __26
  9183  __26:
  9184  	if 0 != 0 {
  9185  		goto __25
  9186  	}
  9187  	goto __27
  9188  __27:
  9189  	;
  9190  	have--
  9191  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9192  	bits = bits + uint32(8)
  9193  	goto __23
  9194  __23:
  9195  	if 0 != 0 {
  9196  		goto __22
  9197  	}
  9198  	goto __24
  9199  __24:
  9200  	;
  9201  	goto __20
  9202  __21:
  9203  	;
  9204  	goto __18
  9205  __18:
  9206  	if 0 != 0 {
  9207  		goto __17
  9208  	}
  9209  	goto __19
  9210  __19:
  9211  	;
  9212  	(*Inflate_state)(unsafe.Pointer(state)).Flast = int32(uint32(hold) & (uint32(1)<<1 - uint32(1)))
  9213  __30:
  9214  	hold >>= 1
  9215  	bits = bits - uint32(1)
  9216  	goto __31
  9217  __31:
  9218  	if 0 != 0 {
  9219  		goto __30
  9220  	}
  9221  	goto __32
  9222  __32:
  9223  	;
  9224  	switch uint32(hold) & (uint32(1)<<2 - uint32(1)) {
  9225  	case uint32(0):
  9226  		goto __34
  9227  	case uint32(1):
  9228  		goto __35
  9229  	case uint32(2):
  9230  		goto __36
  9231  	case uint32(3):
  9232  		goto __37
  9233  	}
  9234  	goto __33
  9235  __34: // stored block
  9236  	;
  9237  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED
  9238  	goto __33
  9239  __35: // fixed block
  9240  	fixedtables(tls, state)
  9241  
  9242  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN // decode codes
  9243  	goto __33
  9244  __36: // dynamic block
  9245  	;
  9246  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE
  9247  	goto __33
  9248  __37:
  9249  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */
  9250  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9251  __33:
  9252  	;
  9253  __38:
  9254  	hold >>= 2
  9255  	bits = bits - uint32(2)
  9256  	goto __39
  9257  __39:
  9258  	if 0 != 0 {
  9259  		goto __38
  9260  	}
  9261  	goto __40
  9262  __40:
  9263  	;
  9264  	goto __5
  9265  
  9266  __7:
  9267  	// get and verify stored block length
  9268  __41:
  9269  	hold >>= bits & uint32(7)
  9270  	bits = bits - bits&uint32(7)
  9271  	goto __42
  9272  __42:
  9273  	if 0 != 0 {
  9274  		goto __41
  9275  	}
  9276  	goto __43
  9277  __43:
  9278  	; // go to byte boundary
  9279  __44:
  9280  __47:
  9281  	if !(bits < uint32(32)) {
  9282  		goto __48
  9283  	}
  9284  __49:
  9285  __52:
  9286  	if !(have == uint32(0)) {
  9287  		goto __55
  9288  	}
  9289  	have = (*struct {
  9290  		f func(*libc.TLS, uintptr, uintptr) uint32
  9291  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9292  	if !(have == uint32(0)) {
  9293  		goto __56
  9294  	}
  9295  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9296  	ret = -5
  9297  	goto inf_leave
  9298  __56:
  9299  	;
  9300  __55:
  9301  	;
  9302  	goto __53
  9303  __53:
  9304  	if 0 != 0 {
  9305  		goto __52
  9306  	}
  9307  	goto __54
  9308  __54:
  9309  	;
  9310  	have--
  9311  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9312  	bits = bits + uint32(8)
  9313  	goto __50
  9314  __50:
  9315  	if 0 != 0 {
  9316  		goto __49
  9317  	}
  9318  	goto __51
  9319  __51:
  9320  	;
  9321  	goto __47
  9322  __48:
  9323  	;
  9324  	goto __45
  9325  __45:
  9326  	if 0 != 0 {
  9327  		goto __44
  9328  	}
  9329  	goto __46
  9330  __46:
  9331  	;
  9332  	if !(hold&uint32(0xffff) != hold>>16^uint32(0xffff)) {
  9333  		goto __57
  9334  	}
  9335  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */
  9336  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9337  	goto __5
  9338  __57:
  9339  	;
  9340  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff)
  9341  
  9342  __58:
  9343  	hold = uint32(0)
  9344  	bits = uint32(0)
  9345  	goto __59
  9346  __59:
  9347  	if 0 != 0 {
  9348  		goto __58
  9349  	}
  9350  	goto __60
  9351  __60:
  9352  	;
  9353  
  9354  	// copy stored block from input to output
  9355  __61:
  9356  	if !((*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0)) {
  9357  		goto __62
  9358  	}
  9359  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
  9360  __63:
  9361  	if !(have == uint32(0)) {
  9362  		goto __66
  9363  	}
  9364  	have = (*struct {
  9365  		f func(*libc.TLS, uintptr, uintptr) uint32
  9366  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9367  	if !(have == uint32(0)) {
  9368  		goto __67
  9369  	}
  9370  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9371  	ret = -5
  9372  	goto inf_leave
  9373  __67:
  9374  	;
  9375  __66:
  9376  	;
  9377  	goto __64
  9378  __64:
  9379  	if 0 != 0 {
  9380  		goto __63
  9381  	}
  9382  	goto __65
  9383  __65:
  9384  	;
  9385  __68:
  9386  	if !(left == uint32(0)) {
  9387  		goto __71
  9388  	}
  9389  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
  9390  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
  9391  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
  9392  	if !((*struct {
  9393  		f func(*libc.TLS, uintptr, uintptr, uint32) int32
  9394  	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) {
  9395  		goto __72
  9396  	}
  9397  	ret = -5
  9398  	goto inf_leave
  9399  __72:
  9400  	;
  9401  __71:
  9402  	;
  9403  	goto __69
  9404  __69:
  9405  	if 0 != 0 {
  9406  		goto __68
  9407  	}
  9408  	goto __70
  9409  __70:
  9410  	;
  9411  	if !(copy > have) {
  9412  		goto __73
  9413  	}
  9414  	copy = have
  9415  __73:
  9416  	;
  9417  	if !(copy > left) {
  9418  		goto __74
  9419  	}
  9420  	copy = left
  9421  __74:
  9422  	;
  9423  	libc.Xmemcpy(tls, put, *(*uintptr)(unsafe.Pointer(bp /* next */)), copy)
  9424  	have = have - copy
  9425  	*(*uintptr)(unsafe.Pointer(bp /* next */)) += uintptr(copy)
  9426  	left = left - copy
  9427  	put += uintptr(copy)
  9428  	*(*uint32)(unsafe.Pointer(state + 68)) -= copy
  9429  	goto __61
  9430  __62:
  9431  	;
  9432  
  9433  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
  9434  	goto __5
  9435  
  9436  __8:
  9437  	// get dynamic table entries descriptor
  9438  __75:
  9439  __78:
  9440  	if !(bits < uint32(14)) {
  9441  		goto __79
  9442  	}
  9443  __80:
  9444  __83:
  9445  	if !(have == uint32(0)) {
  9446  		goto __86
  9447  	}
  9448  	have = (*struct {
  9449  		f func(*libc.TLS, uintptr, uintptr) uint32
  9450  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9451  	if !(have == uint32(0)) {
  9452  		goto __87
  9453  	}
  9454  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9455  	ret = -5
  9456  	goto inf_leave
  9457  __87:
  9458  	;
  9459  __86:
  9460  	;
  9461  	goto __84
  9462  __84:
  9463  	if 0 != 0 {
  9464  		goto __83
  9465  	}
  9466  	goto __85
  9467  __85:
  9468  	;
  9469  	have--
  9470  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9471  	bits = bits + uint32(8)
  9472  	goto __81
  9473  __81:
  9474  	if 0 != 0 {
  9475  		goto __80
  9476  	}
  9477  	goto __82
  9478  __82:
  9479  	;
  9480  	goto __78
  9481  __79:
  9482  	;
  9483  	goto __76
  9484  __76:
  9485  	if 0 != 0 {
  9486  		goto __75
  9487  	}
  9488  	goto __77
  9489  __77:
  9490  	;
  9491  	(*Inflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(257)
  9492  __88:
  9493  	hold >>= 5
  9494  	bits = bits - uint32(5)
  9495  	goto __89
  9496  __89:
  9497  	if 0 != 0 {
  9498  		goto __88
  9499  	}
  9500  	goto __90
  9501  __90:
  9502  	;
  9503  	(*Inflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(1)
  9504  __91:
  9505  	hold >>= 5
  9506  	bits = bits - uint32(5)
  9507  	goto __92
  9508  __92:
  9509  	if 0 != 0 {
  9510  		goto __91
  9511  	}
  9512  	goto __93
  9513  __93:
  9514  	;
  9515  	(*Inflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(4)
  9516  __94:
  9517  	hold >>= 4
  9518  	bits = bits - uint32(4)
  9519  	goto __95
  9520  __95:
  9521  	if 0 != 0 {
  9522  		goto __94
  9523  	}
  9524  	goto __96
  9525  __96:
  9526  	;
  9527  	if !((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30)) {
  9528  		goto __97
  9529  	}
  9530  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */
  9531  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9532  	goto __5
  9533  __97:
  9534  	;
  9535  
  9536  	// get code length code lengths (not a typo)
  9537  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
  9538  __98:
  9539  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) {
  9540  		goto __99
  9541  	}
  9542  __100:
  9543  __103:
  9544  	if !(bits < uint32(3)) {
  9545  		goto __104
  9546  	}
  9547  __105:
  9548  __108:
  9549  	if !(have == uint32(0)) {
  9550  		goto __111
  9551  	}
  9552  	have = (*struct {
  9553  		f func(*libc.TLS, uintptr, uintptr) uint32
  9554  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9555  	if !(have == uint32(0)) {
  9556  		goto __112
  9557  	}
  9558  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9559  	ret = -5
  9560  	goto inf_leave
  9561  __112:
  9562  	;
  9563  __111:
  9564  	;
  9565  	goto __109
  9566  __109:
  9567  	if 0 != 0 {
  9568  		goto __108
  9569  	}
  9570  	goto __110
  9571  __110:
  9572  	;
  9573  	have--
  9574  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9575  	bits = bits + uint32(8)
  9576  	goto __106
  9577  __106:
  9578  	if 0 != 0 {
  9579  		goto __105
  9580  	}
  9581  	goto __107
  9582  __107:
  9583  	;
  9584  	goto __103
  9585  __104:
  9586  	;
  9587  	goto __101
  9588  __101:
  9589  	if 0 != 0 {
  9590  		goto __100
  9591  	}
  9592  	goto __102
  9593  __102:
  9594  	;
  9595  	*(*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)))
  9596  __113:
  9597  	hold >>= 3
  9598  	bits = bits - uint32(3)
  9599  	goto __114
  9600  __114:
  9601  	if 0 != 0 {
  9602  		goto __113
  9603  	}
  9604  	goto __115
  9605  __115:
  9606  	;
  9607  	goto __98
  9608  __99:
  9609  	;
  9610  __116:
  9611  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) {
  9612  		goto __117
  9613  	}
  9614  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0)
  9615  	goto __116
  9616  __117:
  9617  	;
  9618  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */
  9619  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
  9620  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7)
  9621  	ret = Xinflate_table(tls, CODES, state+116, uint32(19), state+112,
  9622  		state+88, state+756)
  9623  	if !(ret != 0) {
  9624  		goto __118
  9625  	}
  9626  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */
  9627  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9628  	goto __5
  9629  __118:
  9630  	;
  9631  
  9632  	// get length and distance code code lengths
  9633  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
  9634  __119:
  9635  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
  9636  		goto __120
  9637  	}
  9638  __121:
  9639  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
  9640  	if !(uint32(here.Fbits) <= bits) {
  9641  		goto __124
  9642  	}
  9643  	goto __123
  9644  __124:
  9645  	;
  9646  __125:
  9647  __128:
  9648  	if !(have == uint32(0)) {
  9649  		goto __131
  9650  	}
  9651  	have = (*struct {
  9652  		f func(*libc.TLS, uintptr, uintptr) uint32
  9653  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9654  	if !(have == uint32(0)) {
  9655  		goto __132
  9656  	}
  9657  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9658  	ret = -5
  9659  	goto inf_leave
  9660  __132:
  9661  	;
  9662  __131:
  9663  	;
  9664  	goto __129
  9665  __129:
  9666  	if 0 != 0 {
  9667  		goto __128
  9668  	}
  9669  	goto __130
  9670  __130:
  9671  	;
  9672  	have--
  9673  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9674  	bits = bits + uint32(8)
  9675  	goto __126
  9676  __126:
  9677  	if 0 != 0 {
  9678  		goto __125
  9679  	}
  9680  	goto __127
  9681  __127:
  9682  	;
  9683  	goto __122
  9684  __122:
  9685  	goto __121
  9686  	goto __123
  9687  __123:
  9688  	;
  9689  	if !(int32(here.Fval) < 16) {
  9690  		goto __133
  9691  	}
  9692  __135:
  9693  	hold >>= int32(here.Fbits)
  9694  	bits = bits - uint32(here.Fbits)
  9695  	goto __136
  9696  __136:
  9697  	if 0 != 0 {
  9698  		goto __135
  9699  	}
  9700  	goto __137
  9701  __137:
  9702  	;
  9703  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval
  9704  	goto __134
  9705  __133:
  9706  	if !(int32(here.Fval) == 16) {
  9707  		goto __138
  9708  	}
  9709  __140:
  9710  __143:
  9711  	if !(bits < uint32(int32(here.Fbits)+2)) {
  9712  		goto __144
  9713  	}
  9714  __145:
  9715  __148:
  9716  	if !(have == uint32(0)) {
  9717  		goto __151
  9718  	}
  9719  	have = (*struct {
  9720  		f func(*libc.TLS, uintptr, uintptr) uint32
  9721  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9722  	if !(have == uint32(0)) {
  9723  		goto __152
  9724  	}
  9725  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9726  	ret = -5
  9727  	goto inf_leave
  9728  __152:
  9729  	;
  9730  __151:
  9731  	;
  9732  	goto __149
  9733  __149:
  9734  	if 0 != 0 {
  9735  		goto __148
  9736  	}
  9737  	goto __150
  9738  __150:
  9739  	;
  9740  	have--
  9741  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9742  	bits = bits + uint32(8)
  9743  	goto __146
  9744  __146:
  9745  	if 0 != 0 {
  9746  		goto __145
  9747  	}
  9748  	goto __147
  9749  __147:
  9750  	;
  9751  	goto __143
  9752  __144:
  9753  	;
  9754  	goto __141
  9755  __141:
  9756  	if 0 != 0 {
  9757  		goto __140
  9758  	}
  9759  	goto __142
  9760  __142:
  9761  	;
  9762  __153:
  9763  	hold >>= int32(here.Fbits)
  9764  	bits = bits - uint32(here.Fbits)
  9765  	goto __154
  9766  __154:
  9767  	if 0 != 0 {
  9768  		goto __153
  9769  	}
  9770  	goto __155
  9771  __155:
  9772  	;
  9773  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) {
  9774  		goto __156
  9775  	}
  9776  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
  9777  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9778  	goto __120
  9779  __156:
  9780  	;
  9781  	len = uint32(*(*uint16)(unsafe.Pointer(state + 116 + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2)))
  9782  	copy = uint32(3) + uint32(hold)&(uint32(1)<<2-uint32(1))
  9783  __157:
  9784  	hold >>= 2
  9785  	bits = bits - uint32(2)
  9786  	goto __158
  9787  __158:
  9788  	if 0 != 0 {
  9789  		goto __157
  9790  	}
  9791  	goto __159
  9792  __159:
  9793  	;
  9794  	goto __139
  9795  __138:
  9796  	if !(int32(here.Fval) == 17) {
  9797  		goto __160
  9798  	}
  9799  __162:
  9800  __165:
  9801  	if !(bits < uint32(int32(here.Fbits)+3)) {
  9802  		goto __166
  9803  	}
  9804  __167:
  9805  __170:
  9806  	if !(have == uint32(0)) {
  9807  		goto __173
  9808  	}
  9809  	have = (*struct {
  9810  		f func(*libc.TLS, uintptr, uintptr) uint32
  9811  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9812  	if !(have == uint32(0)) {
  9813  		goto __174
  9814  	}
  9815  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9816  	ret = -5
  9817  	goto inf_leave
  9818  __174:
  9819  	;
  9820  __173:
  9821  	;
  9822  	goto __171
  9823  __171:
  9824  	if 0 != 0 {
  9825  		goto __170
  9826  	}
  9827  	goto __172
  9828  __172:
  9829  	;
  9830  	have--
  9831  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9832  	bits = bits + uint32(8)
  9833  	goto __168
  9834  __168:
  9835  	if 0 != 0 {
  9836  		goto __167
  9837  	}
  9838  	goto __169
  9839  __169:
  9840  	;
  9841  	goto __165
  9842  __166:
  9843  	;
  9844  	goto __163
  9845  __163:
  9846  	if 0 != 0 {
  9847  		goto __162
  9848  	}
  9849  	goto __164
  9850  __164:
  9851  	;
  9852  __175:
  9853  	hold >>= int32(here.Fbits)
  9854  	bits = bits - uint32(here.Fbits)
  9855  	goto __176
  9856  __176:
  9857  	if 0 != 0 {
  9858  		goto __175
  9859  	}
  9860  	goto __177
  9861  __177:
  9862  	;
  9863  	len = uint32(0)
  9864  	copy = uint32(3) + uint32(hold)&(uint32(1)<<3-uint32(1))
  9865  __178:
  9866  	hold >>= 3
  9867  	bits = bits - uint32(3)
  9868  	goto __179
  9869  __179:
  9870  	if 0 != 0 {
  9871  		goto __178
  9872  	}
  9873  	goto __180
  9874  __180:
  9875  	;
  9876  	goto __161
  9877  __160:
  9878  __181:
  9879  __184:
  9880  	if !(bits < uint32(int32(here.Fbits)+7)) {
  9881  		goto __185
  9882  	}
  9883  __186:
  9884  __189:
  9885  	if !(have == uint32(0)) {
  9886  		goto __192
  9887  	}
  9888  	have = (*struct {
  9889  		f func(*libc.TLS, uintptr, uintptr) uint32
  9890  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
  9891  	if !(have == uint32(0)) {
  9892  		goto __193
  9893  	}
  9894  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
  9895  	ret = -5
  9896  	goto inf_leave
  9897  __193:
  9898  	;
  9899  __192:
  9900  	;
  9901  	goto __190
  9902  __190:
  9903  	if 0 != 0 {
  9904  		goto __189
  9905  	}
  9906  	goto __191
  9907  __191:
  9908  	;
  9909  	have--
  9910  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
  9911  	bits = bits + uint32(8)
  9912  	goto __187
  9913  __187:
  9914  	if 0 != 0 {
  9915  		goto __186
  9916  	}
  9917  	goto __188
  9918  __188:
  9919  	;
  9920  	goto __184
  9921  __185:
  9922  	;
  9923  	goto __182
  9924  __182:
  9925  	if 0 != 0 {
  9926  		goto __181
  9927  	}
  9928  	goto __183
  9929  __183:
  9930  	;
  9931  __194:
  9932  	hold >>= int32(here.Fbits)
  9933  	bits = bits - uint32(here.Fbits)
  9934  	goto __195
  9935  __195:
  9936  	if 0 != 0 {
  9937  		goto __194
  9938  	}
  9939  	goto __196
  9940  __196:
  9941  	;
  9942  	len = uint32(0)
  9943  	copy = uint32(11) + uint32(hold)&(uint32(1)<<7-uint32(1))
  9944  __197:
  9945  	hold >>= 7
  9946  	bits = bits - uint32(7)
  9947  	goto __198
  9948  __198:
  9949  	if 0 != 0 {
  9950  		goto __197
  9951  	}
  9952  	goto __199
  9953  __199:
  9954  	;
  9955  __161:
  9956  	;
  9957  __139:
  9958  	;
  9959  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave+copy > (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
  9960  		goto __200
  9961  	}
  9962  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
  9963  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9964  	goto __120
  9965  __200:
  9966  	;
  9967  __201:
  9968  	if !(libc.PostDecUint32(&copy, 1) != 0) {
  9969  		goto __202
  9970  	}
  9971  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len)
  9972  	goto __201
  9973  __202:
  9974  	;
  9975  __134:
  9976  	;
  9977  	goto __119
  9978  __120:
  9979  	;
  9980  
  9981  	// handle error breaks in while
  9982  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) {
  9983  		goto __203
  9984  	}
  9985  	goto __5
  9986  __203:
  9987  	;
  9988  
  9989  	// check for end-of-block code (better have one)
  9990  	if !(int32(*(*uint16)(unsafe.Pointer(state + 116 + 256*2))) == 0) {
  9991  		goto __204
  9992  	}
  9993  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */
  9994  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
  9995  	goto __5
  9996  __204:
  9997  	;
  9998  
  9999  	// build code tables -- note: do not change the lenbits or distbits
 10000  	//                values here (9 and 6) without reading the comments in inftrees.h
 10001  	//                concerning the ENOUGH constants, which depend on those values
 10002  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */
 10003  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 10004  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
 10005  	ret = Xinflate_table(tls, LENS, state+116, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, state+112,
 10006  		state+88, state+756)
 10007  	if !(ret != 0) {
 10008  		goto __205
 10009  	}
 10010  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */
 10011  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10012  	goto __5
 10013  __205:
 10014  	;
 10015  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 10016  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6)
 10017  	ret = Xinflate_table(tls, DISTS, state+116+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Inflate_state)(unsafe.Pointer(state)).Fndist,
 10018  		state+112, state+92, state+756)
 10019  	if !(ret != 0) {
 10020  		goto __206
 10021  	}
 10022  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */
 10023  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10024  	goto __5
 10025  __206:
 10026  	;
 10027  
 10028  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 10029  
 10030  __9:
 10031  	// use inflate_fast() if we have enough input and output
 10032  	if !(have >= uint32(6) && left >= uint32(258)) {
 10033  		goto __207
 10034  	}
 10035  __208:
 10036  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 10037  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 10038  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */))
 10039  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 10040  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 10041  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 10042  	goto __209
 10043  __209:
 10044  	if 0 != 0 {
 10045  		goto __208
 10046  	}
 10047  	goto __210
 10048  __210:
 10049  	;
 10050  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) {
 10051  		goto __211
 10052  	}
 10053  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - left
 10054  __211:
 10055  	;
 10056  	Xinflate_fast(tls, strm, (*Inflate_state)(unsafe.Pointer(state)).Fwsize)
 10057  __212:
 10058  	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 10059  	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 10060  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 10061  	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 10062  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 10063  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 10064  	goto __213
 10065  __213:
 10066  	if 0 != 0 {
 10067  		goto __212
 10068  	}
 10069  	goto __214
 10070  __214:
 10071  	;
 10072  	goto __5
 10073  __207:
 10074  	;
 10075  
 10076  	// get a literal, length, or end-of-block code
 10077  __215:
 10078  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
 10079  	if !(uint32(here.Fbits) <= bits) {
 10080  		goto __218
 10081  	}
 10082  	goto __217
 10083  __218:
 10084  	;
 10085  __219:
 10086  __222:
 10087  	if !(have == uint32(0)) {
 10088  		goto __225
 10089  	}
 10090  	have = (*struct {
 10091  		f func(*libc.TLS, uintptr, uintptr) uint32
 10092  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10093  	if !(have == uint32(0)) {
 10094  		goto __226
 10095  	}
 10096  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10097  	ret = -5
 10098  	goto inf_leave
 10099  __226:
 10100  	;
 10101  __225:
 10102  	;
 10103  	goto __223
 10104  __223:
 10105  	if 0 != 0 {
 10106  		goto __222
 10107  	}
 10108  	goto __224
 10109  __224:
 10110  	;
 10111  	have--
 10112  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10113  	bits = bits + uint32(8)
 10114  	goto __220
 10115  __220:
 10116  	if 0 != 0 {
 10117  		goto __219
 10118  	}
 10119  	goto __221
 10120  __221:
 10121  	;
 10122  	goto __216
 10123  __216:
 10124  	goto __215
 10125  	goto __217
 10126  __217:
 10127  	;
 10128  	if !(here.Fop != 0 && int32(here.Fop)&0xf0 == 0) {
 10129  		goto __227
 10130  	}
 10131  	last = here
 10132  __228:
 10133  	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))
 10134  	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
 10135  		goto __231
 10136  	}
 10137  	goto __230
 10138  __231:
 10139  	;
 10140  __232:
 10141  __235:
 10142  	if !(have == uint32(0)) {
 10143  		goto __238
 10144  	}
 10145  	have = (*struct {
 10146  		f func(*libc.TLS, uintptr, uintptr) uint32
 10147  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10148  	if !(have == uint32(0)) {
 10149  		goto __239
 10150  	}
 10151  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10152  	ret = -5
 10153  	goto inf_leave
 10154  __239:
 10155  	;
 10156  __238:
 10157  	;
 10158  	goto __236
 10159  __236:
 10160  	if 0 != 0 {
 10161  		goto __235
 10162  	}
 10163  	goto __237
 10164  __237:
 10165  	;
 10166  	have--
 10167  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10168  	bits = bits + uint32(8)
 10169  	goto __233
 10170  __233:
 10171  	if 0 != 0 {
 10172  		goto __232
 10173  	}
 10174  	goto __234
 10175  __234:
 10176  	;
 10177  	goto __229
 10178  __229:
 10179  	goto __228
 10180  	goto __230
 10181  __230:
 10182  	;
 10183  __240:
 10184  	hold >>= int32(last.Fbits)
 10185  	bits = bits - uint32(last.Fbits)
 10186  	goto __241
 10187  __241:
 10188  	if 0 != 0 {
 10189  		goto __240
 10190  	}
 10191  	goto __242
 10192  __242:
 10193  	;
 10194  __227:
 10195  	;
 10196  __243:
 10197  	hold >>= int32(here.Fbits)
 10198  	bits = bits - uint32(here.Fbits)
 10199  	goto __244
 10200  __244:
 10201  	if 0 != 0 {
 10202  		goto __243
 10203  	}
 10204  	goto __245
 10205  __245:
 10206  	;
 10207  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval)
 10208  
 10209  	// process literal
 10210  	if !(int32(here.Fop) == 0) {
 10211  		goto __246
 10212  	}
 10213  
 10214  __247:
 10215  	if !(left == uint32(0)) {
 10216  		goto __250
 10217  	}
 10218  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 10219  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 10220  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
 10221  	if !((*struct {
 10222  		f func(*libc.TLS, uintptr, uintptr, uint32) int32
 10223  	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) {
 10224  		goto __251
 10225  	}
 10226  	ret = -5
 10227  	goto inf_leave
 10228  __251:
 10229  	;
 10230  __250:
 10231  	;
 10232  	goto __248
 10233  __248:
 10234  	if 0 != 0 {
 10235  		goto __247
 10236  	}
 10237  	goto __249
 10238  __249:
 10239  	;
 10240  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength)
 10241  	left--
 10242  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 10243  	goto __5
 10244  __246:
 10245  	;
 10246  
 10247  	// process end of block
 10248  	if !(int32(here.Fop)&32 != 0) {
 10249  		goto __252
 10250  	}
 10251  
 10252  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 10253  	goto __5
 10254  __252:
 10255  	;
 10256  
 10257  	// invalid code
 10258  	if !(int32(here.Fop)&64 != 0) {
 10259  		goto __253
 10260  	}
 10261  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */
 10262  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10263  	goto __5
 10264  __253:
 10265  	;
 10266  
 10267  	// length code -- get extra bits, if any
 10268  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
 10269  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) {
 10270  		goto __254
 10271  	}
 10272  __255:
 10273  __258:
 10274  	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
 10275  		goto __259
 10276  	}
 10277  __260:
 10278  __263:
 10279  	if !(have == uint32(0)) {
 10280  		goto __266
 10281  	}
 10282  	have = (*struct {
 10283  		f func(*libc.TLS, uintptr, uintptr) uint32
 10284  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10285  	if !(have == uint32(0)) {
 10286  		goto __267
 10287  	}
 10288  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10289  	ret = -5
 10290  	goto inf_leave
 10291  __267:
 10292  	;
 10293  __266:
 10294  	;
 10295  	goto __264
 10296  __264:
 10297  	if 0 != 0 {
 10298  		goto __263
 10299  	}
 10300  	goto __265
 10301  __265:
 10302  	;
 10303  	have--
 10304  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10305  	bits = bits + uint32(8)
 10306  	goto __261
 10307  __261:
 10308  	if 0 != 0 {
 10309  		goto __260
 10310  	}
 10311  	goto __262
 10312  __262:
 10313  	;
 10314  	goto __258
 10315  __259:
 10316  	;
 10317  	goto __256
 10318  __256:
 10319  	if 0 != 0 {
 10320  		goto __255
 10321  	}
 10322  	goto __257
 10323  __257:
 10324  	;
 10325  	*(*uint32)(unsafe.Pointer(state + 68)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
 10326  __268:
 10327  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 10328  	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
 10329  	goto __269
 10330  __269:
 10331  	if 0 != 0 {
 10332  		goto __268
 10333  	}
 10334  	goto __270
 10335  __270:
 10336  	;
 10337  __254:
 10338  	;
 10339  
 10340  	// get distance code
 10341  __271:
 10342  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits-uint32(1)))*4))
 10343  	if !(uint32(here.Fbits) <= bits) {
 10344  		goto __274
 10345  	}
 10346  	goto __273
 10347  __274:
 10348  	;
 10349  __275:
 10350  __278:
 10351  	if !(have == uint32(0)) {
 10352  		goto __281
 10353  	}
 10354  	have = (*struct {
 10355  		f func(*libc.TLS, uintptr, uintptr) uint32
 10356  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10357  	if !(have == uint32(0)) {
 10358  		goto __282
 10359  	}
 10360  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10361  	ret = -5
 10362  	goto inf_leave
 10363  __282:
 10364  	;
 10365  __281:
 10366  	;
 10367  	goto __279
 10368  __279:
 10369  	if 0 != 0 {
 10370  		goto __278
 10371  	}
 10372  	goto __280
 10373  __280:
 10374  	;
 10375  	have--
 10376  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10377  	bits = bits + uint32(8)
 10378  	goto __276
 10379  __276:
 10380  	if 0 != 0 {
 10381  		goto __275
 10382  	}
 10383  	goto __277
 10384  __277:
 10385  	;
 10386  	goto __272
 10387  __272:
 10388  	goto __271
 10389  	goto __273
 10390  __273:
 10391  	;
 10392  	if !(int32(here.Fop)&0xf0 == 0) {
 10393  		goto __283
 10394  	}
 10395  	last = here
 10396  __284:
 10397  	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))
 10398  	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
 10399  		goto __287
 10400  	}
 10401  	goto __286
 10402  __287:
 10403  	;
 10404  __288:
 10405  __291:
 10406  	if !(have == uint32(0)) {
 10407  		goto __294
 10408  	}
 10409  	have = (*struct {
 10410  		f func(*libc.TLS, uintptr, uintptr) uint32
 10411  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10412  	if !(have == uint32(0)) {
 10413  		goto __295
 10414  	}
 10415  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10416  	ret = -5
 10417  	goto inf_leave
 10418  __295:
 10419  	;
 10420  __294:
 10421  	;
 10422  	goto __292
 10423  __292:
 10424  	if 0 != 0 {
 10425  		goto __291
 10426  	}
 10427  	goto __293
 10428  __293:
 10429  	;
 10430  	have--
 10431  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10432  	bits = bits + uint32(8)
 10433  	goto __289
 10434  __289:
 10435  	if 0 != 0 {
 10436  		goto __288
 10437  	}
 10438  	goto __290
 10439  __290:
 10440  	;
 10441  	goto __285
 10442  __285:
 10443  	goto __284
 10444  	goto __286
 10445  __286:
 10446  	;
 10447  __296:
 10448  	hold >>= int32(last.Fbits)
 10449  	bits = bits - uint32(last.Fbits)
 10450  	goto __297
 10451  __297:
 10452  	if 0 != 0 {
 10453  		goto __296
 10454  	}
 10455  	goto __298
 10456  __298:
 10457  	;
 10458  __283:
 10459  	;
 10460  __299:
 10461  	hold >>= int32(here.Fbits)
 10462  	bits = bits - uint32(here.Fbits)
 10463  	goto __300
 10464  __300:
 10465  	if 0 != 0 {
 10466  		goto __299
 10467  	}
 10468  	goto __301
 10469  __301:
 10470  	;
 10471  	if !(int32(here.Fop)&64 != 0) {
 10472  		goto __302
 10473  	}
 10474  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */
 10475  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10476  	goto __5
 10477  __302:
 10478  	;
 10479  	(*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval)
 10480  
 10481  	// get distance extra bits, if any
 10482  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
 10483  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) {
 10484  		goto __303
 10485  	}
 10486  __304:
 10487  __307:
 10488  	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
 10489  		goto __308
 10490  	}
 10491  __309:
 10492  __312:
 10493  	if !(have == uint32(0)) {
 10494  		goto __315
 10495  	}
 10496  	have = (*struct {
 10497  		f func(*libc.TLS, uintptr, uintptr) uint32
 10498  	})(unsafe.Pointer(&struct{ uintptr }{in})).f(tls, in_desc, bp /* &next */)
 10499  	if !(have == uint32(0)) {
 10500  		goto __316
 10501  	}
 10502  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10503  	ret = -5
 10504  	goto inf_leave
 10505  __316:
 10506  	;
 10507  __315:
 10508  	;
 10509  	goto __313
 10510  __313:
 10511  	if 0 != 0 {
 10512  		goto __312
 10513  	}
 10514  	goto __314
 10515  __314:
 10516  	;
 10517  	have--
 10518  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))<<bits
 10519  	bits = bits + uint32(8)
 10520  	goto __310
 10521  __310:
 10522  	if 0 != 0 {
 10523  		goto __309
 10524  	}
 10525  	goto __311
 10526  __311:
 10527  	;
 10528  	goto __307
 10529  __308:
 10530  	;
 10531  	goto __305
 10532  __305:
 10533  	if 0 != 0 {
 10534  		goto __304
 10535  	}
 10536  	goto __306
 10537  __306:
 10538  	;
 10539  	*(*uint32)(unsafe.Pointer(state + 72)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
 10540  __317:
 10541  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 10542  	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
 10543  	goto __318
 10544  __318:
 10545  	if 0 != 0 {
 10546  		goto __317
 10547  	}
 10548  	goto __319
 10549  __319:
 10550  	;
 10551  __303:
 10552  	;
 10553  	if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > (*Inflate_state)(unsafe.Pointer(state)).Fwsize-func() uint32 {
 10554  		if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 10555  			return left
 10556  		}
 10557  		return uint32(0)
 10558  	}()) {
 10559  		goto __320
 10560  	}
 10561  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */
 10562  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10563  	goto __5
 10564  __320:
 10565  	;
 10566  
 10567  	// copy match from window to output
 10568  __321:
 10569  __324:
 10570  	if !(left == uint32(0)) {
 10571  		goto __327
 10572  	}
 10573  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 10574  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 10575  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
 10576  	if !((*struct {
 10577  		f func(*libc.TLS, uintptr, uintptr, uint32) int32
 10578  	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, put, left) != 0) {
 10579  		goto __328
 10580  	}
 10581  	ret = -5
 10582  	goto inf_leave
 10583  __328:
 10584  	;
 10585  __327:
 10586  	;
 10587  	goto __325
 10588  __325:
 10589  	if 0 != 0 {
 10590  		goto __324
 10591  	}
 10592  	goto __326
 10593  __326:
 10594  	;
 10595  	copy = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Foffset
 10596  	if !(copy < left) {
 10597  		goto __329
 10598  	}
 10599  	from = put + uintptr(copy)
 10600  	copy = left - copy
 10601  	goto __330
 10602  __329:
 10603  	from = put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)
 10604  	copy = left
 10605  __330:
 10606  	;
 10607  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) {
 10608  		goto __331
 10609  	}
 10610  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 10611  __331:
 10612  	;
 10613  	*(*uint32)(unsafe.Pointer(state + 68)) -= copy
 10614  	left = left - copy
 10615  __332:
 10616  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10617  	goto __333
 10618  __333:
 10619  	if libc.PreDecUint32(&copy, 1) != 0 {
 10620  		goto __332
 10621  	}
 10622  	goto __334
 10623  __334:
 10624  	;
 10625  	goto __322
 10626  __322:
 10627  	if (*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0) {
 10628  		goto __321
 10629  	}
 10630  	goto __323
 10631  __323:
 10632  	;
 10633  	goto __5
 10634  
 10635  __10:
 10636  	// inflate stream terminated properly -- write leftover output
 10637  	ret = Z_STREAM_END
 10638  	if !(left < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) {
 10639  		goto __335
 10640  	}
 10641  	if !((*struct {
 10642  		f func(*libc.TLS, uintptr, uintptr, uint32) int32
 10643  	})(unsafe.Pointer(&struct{ uintptr }{out})).f(tls, out_desc, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (*Inflate_state)(unsafe.Pointer(state)).Fwsize-left) != 0) {
 10644  		goto __336
 10645  	}
 10646  	ret = -5
 10647  __336:
 10648  	;
 10649  __335:
 10650  	;
 10651  	goto inf_leave
 10652  
 10653  __11:
 10654  	ret = -3
 10655  	goto inf_leave
 10656  
 10657  __12: // can't happen, but makes compilers happy
 10658  	ret = -2
 10659  	goto inf_leave
 10660  __5:
 10661  	;
 10662  	goto __3
 10663  __3:
 10664  	goto __2
 10665  	goto __4
 10666  __4:
 10667  	;
 10668  
 10669  	// Return unused input
 10670  inf_leave:
 10671  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */))
 10672  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 10673  	return ret
 10674  }
 10675  
 10676  var order =                                                                                                                                                                                                                          // permutation of code lengths
 10677  [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 */
 10678  
 10679  func XinflateBackEnd(tls *libc.TLS, strm Z_streamp) int32 { /* infback.c:631:13: */
 10680  	if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
 10681  		return -2
 10682  	}
 10683  	(*struct {
 10684  		f func(*libc.TLS, Voidpf, Voidpf)
 10685  	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
 10686  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
 10687  
 10688  	return Z_OK
 10689  }
 10690  
 10691  //
 10692  //    Decode literal, length, and distance codes and write out the resulting
 10693  //    literal and match bytes until either not enough input or output is
 10694  //    available, an end-of-block is encountered, or a data error is encountered.
 10695  //    When large enough input and output buffers are supplied to inflate(), for
 10696  //    example, a 16K input buffer and a 64K output buffer, more than 95% of the
 10697  //    inflate execution time is spent in this routine.
 10698  //
 10699  //    Entry assumptions:
 10700  //
 10701  //         state->mode == LEN
 10702  //         strm->avail_in >= 6
 10703  //         strm->avail_out >= 258
 10704  //         start >= strm->avail_out
 10705  //         state->bits < 8
 10706  //
 10707  //    On return, state->mode is one of:
 10708  //
 10709  //         LEN -- ran out of enough output space or enough available input
 10710  //         TYPE -- reached end of block code, inflate() to interpret next block
 10711  //         BAD -- error in block data
 10712  //
 10713  //    Notes:
 10714  //
 10715  //     - The maximum input bits used by a length/distance pair is 15 bits for the
 10716  //       length code, 5 bits for the length extra, 15 bits for the distance code,
 10717  //       and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
 10718  //       Therefore if strm->avail_in >= 6, then there is enough input to avoid
 10719  //       checking for available input while decoding.
 10720  //
 10721  //     - The maximum bytes that a single length/distance pair can output is 258
 10722  //       bytes, which is the maximum length that can be coded.  inflate_fast()
 10723  //       requires strm->avail_out >= 258 for each loop to avoid checking for
 10724  //       output space.
 10725  //
 10726  func Xinflate_fast(tls *libc.TLS, strm Z_streamp, start uint32) { /* inffast.c:50:20: */
 10727  	var state uintptr
 10728  	var in uintptr     // local strm->next_in
 10729  	var last uintptr   // have enough input while in < last
 10730  	var out uintptr    // local strm->next_out
 10731  	var beg uintptr    // inflate()'s initial strm->next_out
 10732  	var end uintptr    // while out < end, enough space available
 10733  	var wsize uint32   // window size or zero if not using window
 10734  	var whave uint32   // valid bytes in the window
 10735  	var wnext uint32   // window write index
 10736  	var window uintptr // allocated sliding window, if wsize != 0
 10737  	var hold uint32    // local strm->hold
 10738  	var bits uint32    // local strm->bits
 10739  	var lcode uintptr  // local strm->lencode
 10740  	var dcode uintptr  // local strm->distcode
 10741  	var lmask uint32   // mask for first level of length codes
 10742  	var dmask uint32   // mask for first level of distance codes
 10743  	var here Code      // retrieved table entry
 10744  	var op uint32      // code bits, operation, extra bits, or
 10745  	//  window position, window bytes to copy
 10746  	var len uint32   // match length, unused bytes
 10747  	var dist uint32  // match distance
 10748  	var from uintptr // where to copy match from
 10749  
 10750  	// copy state to local variables
 10751  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 10752  	in = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 10753  	last = in + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in-UInt(5))
 10754  	out = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 10755  	beg = out - uintptr(start-(*Z_stream)(unsafe.Pointer(strm)).Favail_out)
 10756  	end = out + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_out-UInt(257))
 10757  	wsize = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 10758  	whave = (*Inflate_state)(unsafe.Pointer(state)).Fwhave
 10759  	wnext = (*Inflate_state)(unsafe.Pointer(state)).Fwnext
 10760  	window = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 10761  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 10762  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 10763  	lcode = (*Inflate_state)(unsafe.Pointer(state)).Flencode
 10764  	dcode = (*Inflate_state)(unsafe.Pointer(state)).Fdistcode
 10765  	lmask = uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits - uint32(1)
 10766  	dmask = uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits - uint32(1)
 10767  
 10768  	// decode literals and length/distances until end-of-block or not enough
 10769  	//        input data or output space
 10770  __1:
 10771  	if !(bits < uint32(15)) {
 10772  		goto __4
 10773  	}
 10774  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10775  	bits = bits + uint32(8)
 10776  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10777  	bits = bits + uint32(8)
 10778  __4:
 10779  	;
 10780  	here = *(*Code)(unsafe.Pointer(lcode + uintptr(hold&uint32(lmask))*4))
 10781  dolen:
 10782  	op = uint32(here.Fbits)
 10783  	hold >>= op
 10784  	bits = bits - op
 10785  	op = uint32(here.Fop)
 10786  	if !(op == uint32(0)) {
 10787  		goto __5
 10788  	} // literal
 10789  
 10790  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = uint8(here.Fval)
 10791  	goto __6
 10792  __5:
 10793  	if !(op&uint32(16) != 0) {
 10794  		goto __7
 10795  	} // length base
 10796  	len = uint32(here.Fval)
 10797  	op = op & uint32(15) // number of extra bits
 10798  	if !(op != 0) {
 10799  		goto __9
 10800  	}
 10801  	if !(bits < op) {
 10802  		goto __10
 10803  	}
 10804  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10805  	bits = bits + uint32(8)
 10806  __10:
 10807  	;
 10808  	len = len + uint32(hold)&(uint32(1)<<op-uint32(1))
 10809  	hold >>= op
 10810  	bits = bits - op
 10811  __9:
 10812  	;
 10813  
 10814  	if !(bits < uint32(15)) {
 10815  		goto __11
 10816  	}
 10817  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10818  	bits = bits + uint32(8)
 10819  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10820  	bits = bits + uint32(8)
 10821  __11:
 10822  	;
 10823  	here = *(*Code)(unsafe.Pointer(dcode + uintptr(hold&uint32(dmask))*4))
 10824  dodist:
 10825  	op = uint32(here.Fbits)
 10826  	hold >>= op
 10827  	bits = bits - op
 10828  	op = uint32(here.Fop)
 10829  	if !(op&uint32(16) != 0) {
 10830  		goto __12
 10831  	} // distance base
 10832  	dist = uint32(here.Fval)
 10833  	op = op & uint32(15) // number of extra bits
 10834  	if !(bits < op) {
 10835  		goto __14
 10836  	}
 10837  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10838  	bits = bits + uint32(8)
 10839  	if !(bits < op) {
 10840  		goto __15
 10841  	}
 10842  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))<<bits
 10843  	bits = bits + uint32(8)
 10844  __15:
 10845  	;
 10846  __14:
 10847  	;
 10848  	dist = dist + uint32(hold)&(uint32(1)<<op-uint32(1))
 10849  	hold >>= op
 10850  	bits = bits - op
 10851  
 10852  	op = uint32((int32(out) - int32(beg)) / 1) // max distance in output
 10853  	if !(dist > op) {
 10854  		goto __16
 10855  	} // see if copy from window
 10856  	op = dist - op // distance back in window
 10857  	if !(op > whave) {
 10858  		goto __18
 10859  	}
 10860  	if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) {
 10861  		goto __19
 10862  	}
 10863  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */
 10864  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10865  	goto __3
 10866  __19:
 10867  	;
 10868  __18:
 10869  	;
 10870  	from = window
 10871  	if !(wnext == uint32(0)) {
 10872  		goto __20
 10873  	} // very common case
 10874  	from += uintptr(wsize - op)
 10875  	if !(op < len) {
 10876  		goto __22
 10877  	} // some from window
 10878  	len = len - op
 10879  __23:
 10880  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10881  	goto __24
 10882  __24:
 10883  	if libc.PreDecUint32(&op, 1) != 0 {
 10884  		goto __23
 10885  	}
 10886  	goto __25
 10887  __25:
 10888  	;
 10889  	from = out - uintptr(dist) // rest from output
 10890  __22:
 10891  	;
 10892  	goto __21
 10893  __20:
 10894  	if !(wnext < op) {
 10895  		goto __26
 10896  	} // wrap around window
 10897  	from += uintptr(wsize + wnext - op)
 10898  	op = op - wnext
 10899  	if !(op < len) {
 10900  		goto __28
 10901  	} // some from end of window
 10902  	len = len - op
 10903  __29:
 10904  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10905  	goto __30
 10906  __30:
 10907  	if libc.PreDecUint32(&op, 1) != 0 {
 10908  		goto __29
 10909  	}
 10910  	goto __31
 10911  __31:
 10912  	;
 10913  	from = window
 10914  	if !(wnext < len) {
 10915  		goto __32
 10916  	} // some from start of window
 10917  	op = wnext
 10918  	len = len - op
 10919  __33:
 10920  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10921  	goto __34
 10922  __34:
 10923  	if libc.PreDecUint32(&op, 1) != 0 {
 10924  		goto __33
 10925  	}
 10926  	goto __35
 10927  __35:
 10928  	;
 10929  	from = out - uintptr(dist) // rest from output
 10930  __32:
 10931  	;
 10932  __28:
 10933  	;
 10934  	goto __27
 10935  __26: // contiguous in window
 10936  	from += uintptr(wnext - op)
 10937  	if !(op < len) {
 10938  		goto __36
 10939  	} // some from window
 10940  	len = len - op
 10941  __37:
 10942  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10943  	goto __38
 10944  __38:
 10945  	if libc.PreDecUint32(&op, 1) != 0 {
 10946  		goto __37
 10947  	}
 10948  	goto __39
 10949  __39:
 10950  	;
 10951  	from = out - uintptr(dist) // rest from output
 10952  __36:
 10953  	;
 10954  __27:
 10955  	;
 10956  __21:
 10957  	;
 10958  __40:
 10959  	if !(len > uint32(2)) {
 10960  		goto __41
 10961  	}
 10962  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10963  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10964  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10965  	len = len - uint32(3)
 10966  	goto __40
 10967  __41:
 10968  	;
 10969  	if !(len != 0) {
 10970  		goto __42
 10971  	}
 10972  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10973  	if !(len > uint32(1)) {
 10974  		goto __43
 10975  	}
 10976  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10977  __43:
 10978  	;
 10979  __42:
 10980  	;
 10981  	goto __17
 10982  __16:
 10983  	from = out - uintptr(dist) // copy direct from output
 10984  __44: // minimum length is three
 10985  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10986  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10987  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 10988  	len = len - uint32(3)
 10989  	goto __45
 10990  __45:
 10991  	if len > uint32(2) {
 10992  		goto __44
 10993  	}
 10994  	goto __46
 10995  __46:
 10996  	;
 10997  	if !(len != 0) {
 10998  		goto __47
 10999  	}
 11000  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 11001  	if !(len > uint32(1)) {
 11002  		goto __48
 11003  	}
 11004  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 11005  __48:
 11006  	;
 11007  __47:
 11008  	;
 11009  __17:
 11010  	;
 11011  	goto __13
 11012  __12:
 11013  	if !(op&uint32(64) == uint32(0)) {
 11014  		goto __49
 11015  	} // 2nd level distance code
 11016  	here = *(*Code)(unsafe.Pointer(dcode + uintptr(uint32(here.Fval)+hold&uint32(uint32(1)<<op-uint32(1)))*4))
 11017  	goto dodist
 11018  	goto __50
 11019  __49:
 11020  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */
 11021  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11022  	goto __3
 11023  __50:
 11024  	;
 11025  __13:
 11026  	;
 11027  	goto __8
 11028  __7:
 11029  	if !(op&uint32(64) == uint32(0)) {
 11030  		goto __51
 11031  	} // 2nd level length code
 11032  	here = *(*Code)(unsafe.Pointer(lcode + uintptr(uint32(here.Fval)+hold&uint32(uint32(1)<<op-uint32(1)))*4))
 11033  	goto dolen
 11034  	goto __52
 11035  __51:
 11036  	if !(op&uint32(32) != 0) {
 11037  		goto __53
 11038  	} // end-of-block
 11039  
 11040  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 11041  	goto __3
 11042  	goto __54
 11043  __53:
 11044  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */
 11045  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11046  	goto __3
 11047  __54:
 11048  	;
 11049  __52:
 11050  	;
 11051  __8:
 11052  	;
 11053  __6:
 11054  	;
 11055  	goto __2
 11056  __2:
 11057  	if in < last && out < end {
 11058  		goto __1
 11059  	}
 11060  	goto __3
 11061  __3:
 11062  	;
 11063  
 11064  	// return unused bytes (on entry, bits < 8, so in won't go too far back)
 11065  	len = bits >> 3
 11066  	in -= uintptr(len)
 11067  	bits = bits - len<<3
 11068  	hold = hold & uint32(uint32(1)<<bits-uint32(1))
 11069  
 11070  	// update state and return
 11071  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = in
 11072  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = out
 11073  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = func() uint32 {
 11074  		if in < last {
 11075  			return uint32(5 + (int32(last)-int32(in))/1)
 11076  		}
 11077  		return uint32(5 - (int32(in)-int32(last))/1)
 11078  	}()
 11079  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = func() uint32 {
 11080  		if out < end {
 11081  			return uint32(257 + (int32(end)-int32(out))/1)
 11082  		}
 11083  		return uint32(257 - (int32(out)-int32(end))/1)
 11084  	}()
 11085  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 11086  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 11087  	return
 11088  }
 11089  
 11090  //
 11091  //    inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
 11092  //    - Using bit fields for code structure
 11093  //    - Different op definition to avoid & for extra bits (do & for table bits)
 11094  //    - Three separate decoding do-loops for direct, window, and wnext == 0
 11095  //    - Special case for distance > 1 copies to do overlapped load and store copy
 11096  //    - Explicit branch predictions (based on measured branch probabilities)
 11097  //    - Deferring match copy and interspersed it with decoding subsequent codes
 11098  //    - Swapping literal/length else
 11099  //    - Swapping window/direct else
 11100  //    - Larger unrolled copy loops (three is about right)
 11101  //    - Moving len -= 3 statement into middle of loop
 11102  //
 11103  
 11104  func inflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:105:11: */
 11105  	var state uintptr
 11106  	if strm == uintptr(Z_NULL) || (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) || (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
 11107  		return 1
 11108  	}
 11109  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11110  	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 {
 11111  		return 1
 11112  	}
 11113  	return 0
 11114  }
 11115  
 11116  func XinflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:119:13: */
 11117  	var state uintptr
 11118  
 11119  	if inflateStateCheck(tls, strm) != 0 {
 11120  		return -2
 11121  	}
 11122  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11123  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint32(strm+20, libc.AssignPtrUint32(state+32, uint32(0)))
 11124  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
 11125  	if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 { // to support ill-conceived Java test suite
 11126  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = ULong((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1)
 11127  	}
 11128  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD
 11129  	(*Inflate_state)(unsafe.Pointer(state)).Flast = 0
 11130  	(*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 0
 11131  	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768
 11132  	(*Inflate_state)(unsafe.Pointer(state)).Fhead = Gz_headerp(Z_NULL)
 11133  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = uint32(0)
 11134  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0)
 11135  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = libc.AssignPtrUintptr(state+84, libc.AssignPtrUintptr(state+112, state+1332 /* &.codes */))
 11136  	(*Inflate_state)(unsafe.Pointer(state)).Fsane = 1
 11137  	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
 11138  
 11139  	return Z_OK
 11140  }
 11141  
 11142  func XinflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:144:13: */
 11143  	var state uintptr
 11144  
 11145  	if inflateStateCheck(tls, strm) != 0 {
 11146  		return -2
 11147  	}
 11148  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11149  	(*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0)
 11150  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
 11151  	(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 11152  	return XinflateResetKeep(tls, strm)
 11153  }
 11154  
 11155  func XinflateReset2(tls *libc.TLS, strm Z_streamp, windowBits int32) int32 { /* inflate.c:157:13: */
 11156  	var wrap int32
 11157  	var state uintptr
 11158  
 11159  	// get the state
 11160  	if inflateStateCheck(tls, strm) != 0 {
 11161  		return -2
 11162  	}
 11163  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11164  
 11165  	// extract wrap request from windowBits parameter
 11166  	if windowBits < 0 {
 11167  		wrap = 0
 11168  		windowBits = -windowBits
 11169  	} else {
 11170  		wrap = windowBits>>4 + 5
 11171  		if windowBits < 48 {
 11172  			windowBits = windowBits & 15
 11173  		}
 11174  	}
 11175  
 11176  	// set number of window bits, free window if different
 11177  	if windowBits != 0 && (windowBits < 8 || windowBits > 15) {
 11178  		return -2
 11179  	}
 11180  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) && (*Inflate_state)(unsafe.Pointer(state)).Fwbits != uint32(windowBits) {
 11181  		(*struct {
 11182  			f func(*libc.TLS, Voidpf, Voidpf)
 11183  		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow)
 11184  		(*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL)
 11185  	}
 11186  
 11187  	// update state and reset the rest of it
 11188  	(*Inflate_state)(unsafe.Pointer(state)).Fwrap = wrap
 11189  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(windowBits)
 11190  	return XinflateReset(tls, strm)
 11191  }
 11192  
 11193  func XinflateInit2_(tls *libc.TLS, strm Z_streamp, windowBits int32, version uintptr, stream_size int32) int32 { /* inflate.c:195:13: */
 11194  	var ret int32
 11195  	var state uintptr
 11196  
 11197  	if version == uintptr(Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts))) || stream_size != int32(unsafe.Sizeof(Z_stream{})) {
 11198  		return -6
 11199  	}
 11200  	if strm == uintptr(Z_NULL) {
 11201  		return -2
 11202  	}
 11203  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error
 11204  	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
 11205  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
 11206  			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
 11207  		}{Xzcalloc}))
 11208  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
 11209  	}
 11210  	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
 11211  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
 11212  			f func(*libc.TLS, Voidpf, Voidpf)
 11213  		}{Xzcfree}))
 11214  	}
 11215  	state = (*struct {
 11216  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
 11217  	})(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{})))
 11218  	if state == uintptr(Z_NULL) {
 11219  		return -4
 11220  	}
 11221  
 11222  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = state
 11223  	(*Inflate_state)(unsafe.Pointer(state)).Fstrm = strm
 11224  	(*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL)
 11225  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD // to pass state test in inflateReset2()
 11226  	ret = XinflateReset2(tls, strm, windowBits)
 11227  	if ret != Z_OK {
 11228  		(*struct {
 11229  			f func(*libc.TLS, Voidpf, Voidpf)
 11230  		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, state)
 11231  		(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
 11232  	}
 11233  	return ret
 11234  }
 11235  
 11236  func XinflateInit_(tls *libc.TLS, strm Z_streamp, version uintptr, stream_size int32) int32 { /* inflate.c:239:13: */
 11237  	return XinflateInit2_(tls, strm, MAX_WBITS, version, stream_size)
 11238  }
 11239  
 11240  func XinflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* inflate.c:247:13: */
 11241  	var state uintptr
 11242  
 11243  	if inflateStateCheck(tls, strm) != 0 {
 11244  		return -2
 11245  	}
 11246  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11247  	if bits < 0 {
 11248  		(*Inflate_state)(unsafe.Pointer(state)).Fhold = uint32(0)
 11249  		(*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0)
 11250  		return Z_OK
 11251  	}
 11252  	if bits > 16 || (*Inflate_state)(unsafe.Pointer(state)).Fbits+UInt(bits) > uint32(32) {
 11253  		return -2
 11254  	}
 11255  	value = int32(int32(value) & (int32(1)<<bits - 1))
 11256  	*(*uint32)(unsafe.Pointer(state + 60)) += uint32(uint32(value) << (*Inflate_state)(unsafe.Pointer(state)).Fbits)
 11257  	*(*uint32)(unsafe.Pointer(state + 64)) += UInt(bits)
 11258  	return Z_OK
 11259  }
 11260  
 11261  //
 11262  //    Return state with length and distance decoding tables and index sizes set to
 11263  //    fixed code decoding.  Normally this returns fixed tables from inffixed.h.
 11264  //    If BUILDFIXED is defined, then instead this routine builds the tables the
 11265  //    first time it's called, and returns those tables the first time and
 11266  //    thereafter.  This reduces the size of the code by about 2K bytes, in
 11267  //    exchange for a little execution time.  However, BUILDFIXED should not be
 11268  //    used for threaded applications, since the rewriting of the tables and virgin
 11269  //    may not be thread-safe.
 11270  //
 11271  func fixedtables1(tls *libc.TLS, state uintptr) { /* inflate.c:278:12: */
 11272  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix1))
 11273  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
 11274  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix1))
 11275  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5)
 11276  }
 11277  
 11278  var lenfix1 = [512]Code{
 11279  	{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)},
 11280  	{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)},
 11281  	{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)},
 11282  	{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)},
 11283  	{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)},
 11284  	{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)},
 11285  	{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)},
 11286  	{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)},
 11287  	{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)},
 11288  	{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)},
 11289  	{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)},
 11290  	{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)},
 11291  	{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)},
 11292  	{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)},
 11293  	{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)},
 11294  	{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)},
 11295  	{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)},
 11296  	{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)},
 11297  	{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)},
 11298  	{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)},
 11299  	{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)},
 11300  	{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)},
 11301  	{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)},
 11302  	{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)},
 11303  	{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)},
 11304  	{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)},
 11305  	{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)},
 11306  	{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)},
 11307  	{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)},
 11308  	{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)},
 11309  	{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)},
 11310  	{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)},
 11311  	{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)},
 11312  	{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)},
 11313  	{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)},
 11314  	{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)},
 11315  	{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)},
 11316  	{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)},
 11317  	{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)},
 11318  	{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)},
 11319  	{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)},
 11320  	{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)},
 11321  	{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)},
 11322  	{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)},
 11323  	{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)},
 11324  	{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)},
 11325  	{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)},
 11326  	{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)},
 11327  	{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)},
 11328  	{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)},
 11329  	{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)},
 11330  	{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)},
 11331  	{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)},
 11332  	{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)},
 11333  	{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)},
 11334  	{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)},
 11335  	{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)},
 11336  	{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)},
 11337  	{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)},
 11338  	{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)},
 11339  	{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)},
 11340  	{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)},
 11341  	{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)},
 11342  	{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)},
 11343  	{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)},
 11344  	{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)},
 11345  	{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)},
 11346  	{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)},
 11347  	{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)},
 11348  	{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)},
 11349  	{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)},
 11350  	{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)},
 11351  	{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)},
 11352  	{Fbits: uint8(9), Fval: uint16(255)},
 11353  } /* inffixed.h:10:23 */
 11354  var distfix1 = [32]Code{
 11355  	{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)},
 11356  	{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)},
 11357  	{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)},
 11358  	{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)},
 11359  	{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)},
 11360  	{Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)},
 11361  } /* inffixed.h:87:23 */
 11362  
 11363  //
 11364  //    Update the window with the last wsize (normally 32K) bytes written before
 11365  //    returning.  If window does not exist yet, create it.  This is only called
 11366  //    when a window is already in use, or when output has been written during this
 11367  //    inflate call, but the end of the deflate stream has not been reached yet.
 11368  //    It is also called to create a window for dictionary data when a dictionary
 11369  //    is loaded.
 11370  //
 11371  //    Providing output buffers larger than 32K to inflate() should provide a speed
 11372  //    advantage, since only the last 32K of output is copied to the sliding window
 11373  //    upon return from inflate(), and since all distances after the first 32K of
 11374  //    output will fall in the output data, making match copies simpler and faster.
 11375  //    The advantage may be dependent on the size of the processor's data caches.
 11376  //
 11377  func updatewindow(tls *libc.TLS, strm Z_streamp, end uintptr, copy uint32) int32 { /* inflate.c:396:11: */
 11378  	var state uintptr
 11379  	var dist uint32
 11380  
 11381  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11382  
 11383  	// if it hasn't been done already, allocate space for the window
 11384  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) {
 11385  		(*Inflate_state)(unsafe.Pointer(state)).Fwindow = (*struct {
 11386  			f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
 11387  		})(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))))
 11388  		if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) {
 11389  			return 1
 11390  		}
 11391  	}
 11392  
 11393  	// if window not in use yet, initialize
 11394  	if (*Inflate_state)(unsafe.Pointer(state)).Fwsize == uint32(0) {
 11395  		(*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits
 11396  		(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 11397  		(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
 11398  	}
 11399  
 11400  	// copy state->wsize or less output bytes into the circular window
 11401  	if copy >= (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 11402  		libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize), (*Inflate_state)(unsafe.Pointer(state)).Fwsize)
 11403  		(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 11404  		(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 11405  	} else {
 11406  		dist = (*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Fwnext
 11407  		if dist > copy {
 11408  			dist = copy
 11409  		}
 11410  		libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext), end-uintptr(copy), dist)
 11411  		copy = copy - dist
 11412  		if copy != 0 {
 11413  			libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr(copy), copy)
 11414  			(*Inflate_state)(unsafe.Pointer(state)).Fwnext = copy
 11415  			(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 11416  		} else {
 11417  			*(*uint32)(unsafe.Pointer(state + 52)) += dist
 11418  			if (*Inflate_state)(unsafe.Pointer(state)).Fwnext == (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 11419  				(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 11420  			}
 11421  			if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 11422  				*(*uint32)(unsafe.Pointer(state + 48)) += dist
 11423  			}
 11424  		}
 11425  	}
 11426  	return 0
 11427  }
 11428  
 11429  // Macros for inflate():
 11430  
 11431  // check function to use adler32() for zlib or crc32() for gzip
 11432  
 11433  // check macros for header crc
 11434  
 11435  // Load registers with state in inflate() for speed
 11436  
 11437  // Restore state from registers in inflate()
 11438  
 11439  // Clear the input bit accumulator
 11440  
 11441  // Get a byte of input into the bit accumulator, or return from inflate()
 11442  //    if there is no input available.
 11443  
 11444  // Assure that there are at least n bits in the bit accumulator.  If there is
 11445  //    not enough available input to do that, then return from inflate().
 11446  
 11447  // Return the low n bits of the bit accumulator (n < 16)
 11448  
 11449  // Remove n bits from the bit accumulator
 11450  
 11451  // Remove zero to seven bits as needed to go to a byte boundary
 11452  
 11453  //
 11454  //    inflate() uses a state machine to process as much input data and generate as
 11455  //    much output data as possible before returning.  The state machine is
 11456  //    structured roughly as follows:
 11457  //
 11458  //     for (;;) switch (state) {
 11459  //     ...
 11460  //     case STATEn:
 11461  //         if (not enough input data or output space to make progress)
 11462  //             return;
 11463  //         ... make progress ...
 11464  //         state = STATEm;
 11465  //         break;
 11466  //     ...
 11467  //     }
 11468  //
 11469  //    so when inflate() is called again, the same case is attempted again, and
 11470  //    if the appropriate resources are provided, the machine proceeds to the
 11471  //    next state.  The NEEDBITS() macro is usually the way the state evaluates
 11472  //    whether it can proceed or should return.  NEEDBITS() does the return if
 11473  //    the requested bits are not available.  The typical use of the BITS macros
 11474  //    is:
 11475  //
 11476  //         NEEDBITS(n);
 11477  //         ... do something with BITS(n) ...
 11478  //         DROPBITS(n);
 11479  //
 11480  //    where NEEDBITS(n) either returns from inflate() if there isn't enough
 11481  //    input left to load n bits into the accumulator, or it continues.  BITS(n)
 11482  //    gives the low n bits in the accumulator.  When done, DROPBITS(n) drops
 11483  //    the low n bits off the accumulator.  INITBITS() clears the accumulator
 11484  //    and sets the number of available bits to zero.  BYTEBITS() discards just
 11485  //    enough bits to put the accumulator on a byte boundary.  After BYTEBITS()
 11486  //    and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
 11487  //
 11488  //    NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
 11489  //    if there is no input available.  The decoding of variable length codes uses
 11490  //    PULLBYTE() directly in order to pull just enough bytes to decode the next
 11491  //    code, and no more.
 11492  //
 11493  //    Some states loop until they get enough input, making sure that enough
 11494  //    state information is maintained to continue the loop where it left off
 11495  //    if NEEDBITS() returns in the loop.  For example, want, need, and keep
 11496  //    would all have to actually be part of the saved state in case NEEDBITS()
 11497  //    returns:
 11498  //
 11499  //     case STATEw:
 11500  //         while (want < need) {
 11501  //             NEEDBITS(n);
 11502  //             keep[want++] = BITS(n);
 11503  //             DROPBITS(n);
 11504  //         }
 11505  //         state = STATEx;
 11506  //     case STATEx:
 11507  //
 11508  //    As shown above, if the next state is also the next case, then the break
 11509  //    is omitted.
 11510  //
 11511  //    A state may also return if there is not enough output space available to
 11512  //    complete that state.  Those states are copying stored data, writing a
 11513  //    literal byte, and copying a matching string.
 11514  //
 11515  //    When returning, a "goto inf_leave" is used to update the total counters,
 11516  //    update the check value, and determine whether any progress has been made
 11517  //    during that inflate() call in order to return the proper return code.
 11518  //    Progress is defined as a change in either strm->avail_in or strm->avail_out.
 11519  //    When there is a window, goto inf_leave will update the window with the last
 11520  //    output written.  If a goto inf_leave occurs in the middle of decompression
 11521  //    and there is no window currently, goto inf_leave will create one and copy
 11522  //    output to the window for the next call of inflate().
 11523  //
 11524  //    In this implementation, the flush parameter of inflate() only affects the
 11525  //    return code (per zlib.h).  inflate() always writes as much as possible to
 11526  //    strm->next_out, given the space available and the provided input--the effect
 11527  //    documented in zlib.h of Z_SYNC_FLUSH.  Furthermore, inflate() always defers
 11528  //    the allocation of and copying into a sliding window until necessary, which
 11529  //    provides the effect documented in zlib.h for Z_FINISH when the entire input
 11530  //    stream available.  So the only thing the flush parameter actually does is:
 11531  //    when flush is set to Z_FINISH, inflate() cannot return Z_OK.  Instead it
 11532  //    will return Z_BUF_ERROR if it has not reached the end of the stream.
 11533  //
 11534  
 11535  func Xinflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* inflate.c:622:13: */
 11536  	bp := tls.Alloc(4)
 11537  	defer tls.Free(4)
 11538  
 11539  	var state uintptr
 11540  	var next uintptr // next input
 11541  	var put uintptr  // next output
 11542  	var have uint32
 11543  	var left uint32 // available input and output
 11544  	var hold uint32 // bit buffer
 11545  	var bits uint32 // bits in bit buffer
 11546  	var in uint32
 11547  	var out uint32   // save starting available input and output
 11548  	var copy uint32  // number of stored or match bytes to copy
 11549  	var from uintptr // where to copy match bytes from
 11550  	var here Code    // current decoding table entry
 11551  	var last Code    // parent table entry
 11552  	var len uint32   // length to copy for repeats, bits to drop
 11553  	var ret int32    // return code
 11554  	// var hbuf [4]uint8 at bp, 4
 11555  
 11556  	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)) {
 11557  		goto __1
 11558  	}
 11559  	return -2
 11560  __1:
 11561  	;
 11562  
 11563  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 11564  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) {
 11565  		goto __2
 11566  	}
 11567  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO
 11568  __2:
 11569  	; // skip check
 11570  __3:
 11571  	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 11572  	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 11573  	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 11574  	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 11575  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 11576  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 11577  	goto __4
 11578  __4:
 11579  	if 0 != 0 {
 11580  		goto __3
 11581  	}
 11582  	goto __5
 11583  __5:
 11584  	;
 11585  	in = have
 11586  	out = left
 11587  	ret = Z_OK
 11588  __6:
 11589  	switch (*Inflate_state)(unsafe.Pointer(state)).Fmode {
 11590  	case HEAD:
 11591  		goto __10
 11592  	case FLAGS:
 11593  		goto __11
 11594  	case TIME:
 11595  		goto __12
 11596  	case OS:
 11597  		goto __13
 11598  	case EXLEN:
 11599  		goto __14
 11600  	case EXTRA:
 11601  		goto __15
 11602  	case NAME:
 11603  		goto __16
 11604  	case COMMENT:
 11605  		goto __17
 11606  	case HCRC:
 11607  		goto __18
 11608  	case DICTID:
 11609  		goto __19
 11610  	case DICT:
 11611  		goto __20
 11612  	case TYPE:
 11613  		goto __21
 11614  	case TYPEDO:
 11615  		goto __22
 11616  	case STORED:
 11617  		goto __23
 11618  	case COPY_:
 11619  		goto __24
 11620  	case COPY:
 11621  		goto __25
 11622  	case TABLE:
 11623  		goto __26
 11624  	case LENLENS:
 11625  		goto __27
 11626  	case CODELENS:
 11627  		goto __28
 11628  	case LEN_:
 11629  		goto __29
 11630  	case LEN:
 11631  		goto __30
 11632  	case LENEXT:
 11633  		goto __31
 11634  	case DIST:
 11635  		goto __32
 11636  	case DISTEXT:
 11637  		goto __33
 11638  	case MATCH:
 11639  		goto __34
 11640  	case LIT:
 11641  		goto __35
 11642  	case CHECK:
 11643  		goto __36
 11644  	case LENGTH:
 11645  		goto __37
 11646  	case DONE:
 11647  		goto __38
 11648  	case BAD:
 11649  		goto __39
 11650  	case MEM:
 11651  		goto __40
 11652  	case SYNC:
 11653  		goto __41
 11654  	default:
 11655  		goto __42
 11656  	}
 11657  	goto __9
 11658  __10:
 11659  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap == 0) {
 11660  		goto __43
 11661  	}
 11662  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO
 11663  	goto __9
 11664  __43:
 11665  	;
 11666  __44:
 11667  __47:
 11668  	if !(bits < uint32(16)) {
 11669  		goto __48
 11670  	}
 11671  __49:
 11672  	if !(have == uint32(0)) {
 11673  		goto __52
 11674  	}
 11675  	goto inf_leave
 11676  __52:
 11677  	;
 11678  	have--
 11679  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 11680  	bits = bits + uint32(8)
 11681  	goto __50
 11682  __50:
 11683  	if 0 != 0 {
 11684  		goto __49
 11685  	}
 11686  	goto __51
 11687  __51:
 11688  	;
 11689  	goto __47
 11690  __48:
 11691  	;
 11692  	goto __45
 11693  __45:
 11694  	if 0 != 0 {
 11695  		goto __44
 11696  	}
 11697  	goto __46
 11698  __46:
 11699  	;
 11700  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&2 != 0 && hold == uint32(0x8b1f)) {
 11701  		goto __53
 11702  	} // gzip header
 11703  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) {
 11704  		goto __54
 11705  	}
 11706  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15)
 11707  __54:
 11708  	;
 11709  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
 11710  __55:
 11711  	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
 11712  	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
 11713  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
 11714  	goto __56
 11715  __56:
 11716  	if 0 != 0 {
 11717  		goto __55
 11718  	}
 11719  	goto __57
 11720  __57:
 11721  	;
 11722  __58:
 11723  	hold = uint32(0)
 11724  	bits = uint32(0)
 11725  	goto __59
 11726  __59:
 11727  	if 0 != 0 {
 11728  		goto __58
 11729  	}
 11730  	goto __60
 11731  __60:
 11732  	;
 11733  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = FLAGS
 11734  	goto __9
 11735  __53:
 11736  	;
 11737  	(*Inflate_state)(unsafe.Pointer(state)).Fflags = 0 // expect zlib header
 11738  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 11739  		goto __61
 11740  	}
 11741  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -1
 11742  __61:
 11743  	;
 11744  	if !(!((*Inflate_state)(unsafe.Pointer(state)).Fwrap&1 != 0) || (uint32(uint32(hold)&(uint32(1)<<8-uint32(1))<<8)+hold>>8)%uint32(31) != 0) {
 11745  		goto __62
 11746  	}
 11747  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 669 /* "incorrect header..." */
 11748  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11749  	goto __9
 11750  __62:
 11751  	;
 11752  	if !(uint32(hold)&(uint32(1)<<4-uint32(1)) != uint32(Z_DEFLATED)) {
 11753  		goto __63
 11754  	}
 11755  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */
 11756  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11757  	goto __9
 11758  __63:
 11759  	;
 11760  __64:
 11761  	hold >>= 4
 11762  	bits = bits - uint32(4)
 11763  	goto __65
 11764  __65:
 11765  	if 0 != 0 {
 11766  		goto __64
 11767  	}
 11768  	goto __66
 11769  __66:
 11770  	;
 11771  	len = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(8)
 11772  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) {
 11773  		goto __67
 11774  	}
 11775  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = len
 11776  __67:
 11777  	;
 11778  	if !(len > uint32(15) || len > (*Inflate_state)(unsafe.Pointer(state)).Fwbits) {
 11779  		goto __68
 11780  	}
 11781  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 719 /* "invalid window s..." */
 11782  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11783  	goto __9
 11784  __68:
 11785  	;
 11786  	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = uint32(1) << len
 11787  
 11788  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)))
 11789  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = func() uint32 {
 11790  		if hold&uint32(0x200) != 0 {
 11791  			return DICTID
 11792  		}
 11793  		return TYPE
 11794  	}()
 11795  __69:
 11796  	hold = uint32(0)
 11797  	bits = uint32(0)
 11798  	goto __70
 11799  __70:
 11800  	if 0 != 0 {
 11801  		goto __69
 11802  	}
 11803  	goto __71
 11804  __71:
 11805  	;
 11806  	goto __9
 11807  __11:
 11808  __72:
 11809  __75:
 11810  	if !(bits < uint32(16)) {
 11811  		goto __76
 11812  	}
 11813  __77:
 11814  	if !(have == uint32(0)) {
 11815  		goto __80
 11816  	}
 11817  	goto inf_leave
 11818  __80:
 11819  	;
 11820  	have--
 11821  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 11822  	bits = bits + uint32(8)
 11823  	goto __78
 11824  __78:
 11825  	if 0 != 0 {
 11826  		goto __77
 11827  	}
 11828  	goto __79
 11829  __79:
 11830  	;
 11831  	goto __75
 11832  __76:
 11833  	;
 11834  	goto __73
 11835  __73:
 11836  	if 0 != 0 {
 11837  		goto __72
 11838  	}
 11839  	goto __74
 11840  __74:
 11841  	;
 11842  	(*Inflate_state)(unsafe.Pointer(state)).Fflags = int32(hold)
 11843  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0xff != Z_DEFLATED) {
 11844  		goto __81
 11845  	}
 11846  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */
 11847  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11848  	goto __9
 11849  __81:
 11850  	;
 11851  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0xe000 != 0) {
 11852  		goto __82
 11853  	}
 11854  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 739 /* "unknown header f..." */
 11855  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11856  	goto __9
 11857  __82:
 11858  	;
 11859  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 11860  		goto __83
 11861  	}
 11862  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = int32(hold >> 8 & uint32(1))
 11863  __83:
 11864  	;
 11865  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 11866  		goto __84
 11867  	}
 11868  __85:
 11869  	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
 11870  	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
 11871  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
 11872  	goto __86
 11873  __86:
 11874  	if 0 != 0 {
 11875  		goto __85
 11876  	}
 11877  	goto __87
 11878  __87:
 11879  	;
 11880  __84:
 11881  	;
 11882  __88:
 11883  	hold = uint32(0)
 11884  	bits = uint32(0)
 11885  	goto __89
 11886  __89:
 11887  	if 0 != 0 {
 11888  		goto __88
 11889  	}
 11890  	goto __90
 11891  __90:
 11892  	;
 11893  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TIME
 11894  __12:
 11895  __91:
 11896  __94:
 11897  	if !(bits < uint32(32)) {
 11898  		goto __95
 11899  	}
 11900  __96:
 11901  	if !(have == uint32(0)) {
 11902  		goto __99
 11903  	}
 11904  	goto inf_leave
 11905  __99:
 11906  	;
 11907  	have--
 11908  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 11909  	bits = bits + uint32(8)
 11910  	goto __97
 11911  __97:
 11912  	if 0 != 0 {
 11913  		goto __96
 11914  	}
 11915  	goto __98
 11916  __98:
 11917  	;
 11918  	goto __94
 11919  __95:
 11920  	;
 11921  	goto __92
 11922  __92:
 11923  	if 0 != 0 {
 11924  		goto __91
 11925  	}
 11926  	goto __93
 11927  __93:
 11928  	;
 11929  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 11930  		goto __100
 11931  	}
 11932  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold
 11933  __100:
 11934  	;
 11935  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 11936  		goto __101
 11937  	}
 11938  __102:
 11939  	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
 11940  	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
 11941  	*(*uint8)(unsafe.Pointer(bp + 2)) = uint8(hold >> 16)
 11942  	*(*uint8)(unsafe.Pointer(bp + 3)) = uint8(hold >> 24)
 11943  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(4))
 11944  	goto __103
 11945  __103:
 11946  	if 0 != 0 {
 11947  		goto __102
 11948  	}
 11949  	goto __104
 11950  __104:
 11951  	;
 11952  __101:
 11953  	;
 11954  __105:
 11955  	hold = uint32(0)
 11956  	bits = uint32(0)
 11957  	goto __106
 11958  __106:
 11959  	if 0 != 0 {
 11960  		goto __105
 11961  	}
 11962  	goto __107
 11963  __107:
 11964  	;
 11965  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = OS
 11966  __13:
 11967  __108:
 11968  __111:
 11969  	if !(bits < uint32(16)) {
 11970  		goto __112
 11971  	}
 11972  __113:
 11973  	if !(have == uint32(0)) {
 11974  		goto __116
 11975  	}
 11976  	goto inf_leave
 11977  __116:
 11978  	;
 11979  	have--
 11980  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 11981  	bits = bits + uint32(8)
 11982  	goto __114
 11983  __114:
 11984  	if 0 != 0 {
 11985  		goto __113
 11986  	}
 11987  	goto __115
 11988  __115:
 11989  	;
 11990  	goto __111
 11991  __112:
 11992  	;
 11993  	goto __109
 11994  __109:
 11995  	if 0 != 0 {
 11996  		goto __108
 11997  	}
 11998  	goto __110
 11999  __110:
 12000  	;
 12001  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12002  		goto __117
 12003  	}
 12004  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = int32(hold & uint32(0xff))
 12005  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fos = int32(hold >> 8)
 12006  __117:
 12007  	;
 12008  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 12009  		goto __118
 12010  	}
 12011  __119:
 12012  	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
 12013  	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
 12014  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
 12015  	goto __120
 12016  __120:
 12017  	if 0 != 0 {
 12018  		goto __119
 12019  	}
 12020  	goto __121
 12021  __121:
 12022  	;
 12023  __118:
 12024  	;
 12025  __122:
 12026  	hold = uint32(0)
 12027  	bits = uint32(0)
 12028  	goto __123
 12029  __123:
 12030  	if 0 != 0 {
 12031  		goto __122
 12032  	}
 12033  	goto __124
 12034  __124:
 12035  	;
 12036  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = EXLEN
 12037  __14:
 12038  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0400 != 0) {
 12039  		goto __125
 12040  	}
 12041  __127:
 12042  __130:
 12043  	if !(bits < uint32(16)) {
 12044  		goto __131
 12045  	}
 12046  __132:
 12047  	if !(have == uint32(0)) {
 12048  		goto __135
 12049  	}
 12050  	goto inf_leave
 12051  __135:
 12052  	;
 12053  	have--
 12054  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12055  	bits = bits + uint32(8)
 12056  	goto __133
 12057  __133:
 12058  	if 0 != 0 {
 12059  		goto __132
 12060  	}
 12061  	goto __134
 12062  __134:
 12063  	;
 12064  	goto __130
 12065  __131:
 12066  	;
 12067  	goto __128
 12068  __128:
 12069  	if 0 != 0 {
 12070  		goto __127
 12071  	}
 12072  	goto __129
 12073  __129:
 12074  	;
 12075  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold)
 12076  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12077  		goto __136
 12078  	}
 12079  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold)
 12080  __136:
 12081  	;
 12082  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 12083  		goto __137
 12084  	}
 12085  __138:
 12086  	*(*uint8)(unsafe.Pointer(bp)) = uint8(hold)
 12087  	*(*uint8)(unsafe.Pointer(bp + 1)) = uint8(hold >> 8)
 12088  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2))
 12089  	goto __139
 12090  __139:
 12091  	if 0 != 0 {
 12092  		goto __138
 12093  	}
 12094  	goto __140
 12095  __140:
 12096  	;
 12097  __137:
 12098  	;
 12099  __141:
 12100  	hold = uint32(0)
 12101  	bits = uint32(0)
 12102  	goto __142
 12103  __142:
 12104  	if 0 != 0 {
 12105  		goto __141
 12106  	}
 12107  	goto __143
 12108  __143:
 12109  	;
 12110  	goto __126
 12111  __125:
 12112  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12113  		goto __144
 12114  	}
 12115  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(Z_NULL)
 12116  __144:
 12117  	;
 12118  __126:
 12119  	;
 12120  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = EXTRA
 12121  __15:
 12122  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0400 != 0) {
 12123  		goto __145
 12124  	}
 12125  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 12126  	if !(copy > have) {
 12127  		goto __146
 12128  	}
 12129  	copy = have
 12130  __146:
 12131  	;
 12132  	if !(copy != 0) {
 12133  		goto __147
 12134  	}
 12135  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL) && (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(Z_NULL)) {
 12136  		goto __148
 12137  	}
 12138  	len = (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Inflate_state)(unsafe.Pointer(state)).Flength
 12139  	libc.Xmemcpy(tls, (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra+uintptr(len), next,
 12140  		func() uint32 {
 12141  			if len+copy > (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max {
 12142  				return (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len
 12143  			}
 12144  			return copy
 12145  		}())
 12146  __148:
 12147  	;
 12148  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 12149  		goto __149
 12150  	}
 12151  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
 12152  __149:
 12153  	;
 12154  	have = have - copy
 12155  	next += uintptr(copy)
 12156  	*(*uint32)(unsafe.Pointer(state + 68)) -= copy
 12157  __147:
 12158  	;
 12159  	if !((*Inflate_state)(unsafe.Pointer(state)).Flength != 0) {
 12160  		goto __150
 12161  	}
 12162  	goto inf_leave
 12163  __150:
 12164  	;
 12165  __145:
 12166  	;
 12167  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0)
 12168  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = NAME
 12169  __16:
 12170  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0800 != 0) {
 12171  		goto __151
 12172  	}
 12173  	if !(have == uint32(0)) {
 12174  		goto __153
 12175  	}
 12176  	goto inf_leave
 12177  __153:
 12178  	;
 12179  	copy = uint32(0)
 12180  __154:
 12181  	len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(&copy, 1)))))
 12182  	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) {
 12183  		goto __157
 12184  	}
 12185  	*(*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)
 12186  __157:
 12187  	;
 12188  	goto __155
 12189  __155:
 12190  	if len != 0 && copy < have {
 12191  		goto __154
 12192  	}
 12193  	goto __156
 12194  __156:
 12195  	;
 12196  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 12197  		goto __158
 12198  	}
 12199  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
 12200  __158:
 12201  	;
 12202  	have = have - copy
 12203  	next += uintptr(copy)
 12204  	if !(len != 0) {
 12205  		goto __159
 12206  	}
 12207  	goto inf_leave
 12208  __159:
 12209  	;
 12210  	goto __152
 12211  __151:
 12212  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12213  		goto __160
 12214  	}
 12215  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(Z_NULL)
 12216  __160:
 12217  	;
 12218  __152:
 12219  	;
 12220  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0)
 12221  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COMMENT
 12222  __17:
 12223  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x1000 != 0) {
 12224  		goto __161
 12225  	}
 12226  	if !(have == uint32(0)) {
 12227  		goto __163
 12228  	}
 12229  	goto inf_leave
 12230  __163:
 12231  	;
 12232  	copy = uint32(0)
 12233  __164:
 12234  	len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(&copy, 1)))))
 12235  	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) {
 12236  		goto __167
 12237  	}
 12238  	*(*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)
 12239  __167:
 12240  	;
 12241  	goto __165
 12242  __165:
 12243  	if len != 0 && copy < have {
 12244  		goto __164
 12245  	}
 12246  	goto __166
 12247  __166:
 12248  	;
 12249  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0) {
 12250  		goto __168
 12251  	}
 12252  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
 12253  __168:
 12254  	;
 12255  	have = have - copy
 12256  	next += uintptr(copy)
 12257  	if !(len != 0) {
 12258  		goto __169
 12259  	}
 12260  	goto inf_leave
 12261  __169:
 12262  	;
 12263  	goto __162
 12264  __161:
 12265  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12266  		goto __170
 12267  	}
 12268  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(Z_NULL)
 12269  __170:
 12270  	;
 12271  __162:
 12272  	;
 12273  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HCRC
 12274  __18:
 12275  	if !((*Inflate_state)(unsafe.Pointer(state)).Fflags&0x0200 != 0) {
 12276  		goto __171
 12277  	}
 12278  __172:
 12279  __175:
 12280  	if !(bits < uint32(16)) {
 12281  		goto __176
 12282  	}
 12283  __177:
 12284  	if !(have == uint32(0)) {
 12285  		goto __180
 12286  	}
 12287  	goto inf_leave
 12288  __180:
 12289  	;
 12290  	have--
 12291  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12292  	bits = bits + uint32(8)
 12293  	goto __178
 12294  __178:
 12295  	if 0 != 0 {
 12296  		goto __177
 12297  	}
 12298  	goto __179
 12299  __179:
 12300  	;
 12301  	goto __175
 12302  __176:
 12303  	;
 12304  	goto __173
 12305  __173:
 12306  	if 0 != 0 {
 12307  		goto __172
 12308  	}
 12309  	goto __174
 12310  __174:
 12311  	;
 12312  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && hold != (*Inflate_state)(unsafe.Pointer(state)).Fcheck&uint32(0xffff)) {
 12313  		goto __181
 12314  	}
 12315  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 764 /* "header crc misma..." */
 12316  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12317  	goto __9
 12318  __181:
 12319  	;
 12320  __182:
 12321  	hold = uint32(0)
 12322  	bits = uint32(0)
 12323  	goto __183
 12324  __183:
 12325  	if 0 != 0 {
 12326  		goto __182
 12327  	}
 12328  	goto __184
 12329  __184:
 12330  	;
 12331  __171:
 12332  	;
 12333  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 12334  		goto __185
 12335  	}
 12336  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (*Inflate_state)(unsafe.Pointer(state)).Fflags >> 9 & 1
 12337  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = 1
 12338  __185:
 12339  	;
 12340  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, Xcrc32(tls, uint32(0), uintptr(Z_NULL), uint32(0)))
 12341  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 12342  	goto __9
 12343  __19:
 12344  __186:
 12345  __189:
 12346  	if !(bits < uint32(32)) {
 12347  		goto __190
 12348  	}
 12349  __191:
 12350  	if !(have == uint32(0)) {
 12351  		goto __194
 12352  	}
 12353  	goto inf_leave
 12354  __194:
 12355  	;
 12356  	have--
 12357  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12358  	bits = bits + uint32(8)
 12359  	goto __192
 12360  __192:
 12361  	if 0 != 0 {
 12362  		goto __191
 12363  	}
 12364  	goto __193
 12365  __193:
 12366  	;
 12367  	goto __189
 12368  __190:
 12369  	;
 12370  	goto __187
 12371  __187:
 12372  	if 0 != 0 {
 12373  		goto __186
 12374  	}
 12375  	goto __188
 12376  __188:
 12377  	;
 12378  	(*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)
 12379  __195:
 12380  	hold = uint32(0)
 12381  	bits = uint32(0)
 12382  	goto __196
 12383  __196:
 12384  	if 0 != 0 {
 12385  		goto __195
 12386  	}
 12387  	goto __197
 12388  __197:
 12389  	;
 12390  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DICT
 12391  __20:
 12392  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhavedict == 0) {
 12393  		goto __198
 12394  	}
 12395  __199:
 12396  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 12397  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 12398  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
 12399  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 12400  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 12401  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 12402  	goto __200
 12403  __200:
 12404  	if 0 != 0 {
 12405  		goto __199
 12406  	}
 12407  	goto __201
 12408  __201:
 12409  	;
 12410  	return Z_NEED_DICT
 12411  __198:
 12412  	;
 12413  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0)))
 12414  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 12415  __21:
 12416  	if !(flush == Z_BLOCK || flush == Z_TREES) {
 12417  		goto __202
 12418  	}
 12419  	goto inf_leave
 12420  __202:
 12421  	;
 12422  __22:
 12423  	if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) {
 12424  		goto __203
 12425  	}
 12426  __204:
 12427  	hold >>= bits & uint32(7)
 12428  	bits = bits - bits&uint32(7)
 12429  	goto __205
 12430  __205:
 12431  	if 0 != 0 {
 12432  		goto __204
 12433  	}
 12434  	goto __206
 12435  __206:
 12436  	;
 12437  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = CHECK
 12438  	goto __9
 12439  __203:
 12440  	;
 12441  __207:
 12442  __210:
 12443  	if !(bits < uint32(3)) {
 12444  		goto __211
 12445  	}
 12446  __212:
 12447  	if !(have == uint32(0)) {
 12448  		goto __215
 12449  	}
 12450  	goto inf_leave
 12451  __215:
 12452  	;
 12453  	have--
 12454  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12455  	bits = bits + uint32(8)
 12456  	goto __213
 12457  __213:
 12458  	if 0 != 0 {
 12459  		goto __212
 12460  	}
 12461  	goto __214
 12462  __214:
 12463  	;
 12464  	goto __210
 12465  __211:
 12466  	;
 12467  	goto __208
 12468  __208:
 12469  	if 0 != 0 {
 12470  		goto __207
 12471  	}
 12472  	goto __209
 12473  __209:
 12474  	;
 12475  	(*Inflate_state)(unsafe.Pointer(state)).Flast = int32(uint32(hold) & (uint32(1)<<1 - uint32(1)))
 12476  __216:
 12477  	hold >>= 1
 12478  	bits = bits - uint32(1)
 12479  	goto __217
 12480  __217:
 12481  	if 0 != 0 {
 12482  		goto __216
 12483  	}
 12484  	goto __218
 12485  __218:
 12486  	;
 12487  	switch uint32(hold) & (uint32(1)<<2 - uint32(1)) {
 12488  	case uint32(0):
 12489  		goto __220
 12490  	case uint32(1):
 12491  		goto __221
 12492  	case uint32(2):
 12493  		goto __222
 12494  	case uint32(3):
 12495  		goto __223
 12496  	}
 12497  	goto __219
 12498  __220: // stored block
 12499  	;
 12500  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED
 12501  	goto __219
 12502  __221: // fixed block
 12503  	fixedtables1(tls, state)
 12504  
 12505  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ // decode codes
 12506  	if !(flush == Z_TREES) {
 12507  		goto __224
 12508  	}
 12509  __225:
 12510  	hold >>= 2
 12511  	bits = bits - uint32(2)
 12512  	goto __226
 12513  __226:
 12514  	if 0 != 0 {
 12515  		goto __225
 12516  	}
 12517  	goto __227
 12518  __227:
 12519  	;
 12520  	goto inf_leave
 12521  __224:
 12522  	;
 12523  	goto __219
 12524  __222: // dynamic block
 12525  	;
 12526  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE
 12527  	goto __219
 12528  __223:
 12529  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */
 12530  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12531  __219:
 12532  	;
 12533  __228:
 12534  	hold >>= 2
 12535  	bits = bits - uint32(2)
 12536  	goto __229
 12537  __229:
 12538  	if 0 != 0 {
 12539  		goto __228
 12540  	}
 12541  	goto __230
 12542  __230:
 12543  	;
 12544  	goto __9
 12545  __23:
 12546  __231:
 12547  	hold >>= bits & uint32(7)
 12548  	bits = bits - bits&uint32(7)
 12549  	goto __232
 12550  __232:
 12551  	if 0 != 0 {
 12552  		goto __231
 12553  	}
 12554  	goto __233
 12555  __233:
 12556  	; // go to byte boundary
 12557  __234:
 12558  __237:
 12559  	if !(bits < uint32(32)) {
 12560  		goto __238
 12561  	}
 12562  __239:
 12563  	if !(have == uint32(0)) {
 12564  		goto __242
 12565  	}
 12566  	goto inf_leave
 12567  __242:
 12568  	;
 12569  	have--
 12570  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12571  	bits = bits + uint32(8)
 12572  	goto __240
 12573  __240:
 12574  	if 0 != 0 {
 12575  		goto __239
 12576  	}
 12577  	goto __241
 12578  __241:
 12579  	;
 12580  	goto __237
 12581  __238:
 12582  	;
 12583  	goto __235
 12584  __235:
 12585  	if 0 != 0 {
 12586  		goto __234
 12587  	}
 12588  	goto __236
 12589  __236:
 12590  	;
 12591  	if !(hold&uint32(0xffff) != hold>>16^uint32(0xffff)) {
 12592  		goto __243
 12593  	}
 12594  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */
 12595  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12596  	goto __9
 12597  __243:
 12598  	;
 12599  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff)
 12600  
 12601  __244:
 12602  	hold = uint32(0)
 12603  	bits = uint32(0)
 12604  	goto __245
 12605  __245:
 12606  	if 0 != 0 {
 12607  		goto __244
 12608  	}
 12609  	goto __246
 12610  __246:
 12611  	;
 12612  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY_
 12613  	if !(flush == Z_TREES) {
 12614  		goto __247
 12615  	}
 12616  	goto inf_leave
 12617  __247:
 12618  	;
 12619  __24:
 12620  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY
 12621  __25:
 12622  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 12623  	if !(copy != 0) {
 12624  		goto __248
 12625  	}
 12626  	if !(copy > have) {
 12627  		goto __249
 12628  	}
 12629  	copy = have
 12630  __249:
 12631  	;
 12632  	if !(copy > left) {
 12633  		goto __250
 12634  	}
 12635  	copy = left
 12636  __250:
 12637  	;
 12638  	if !(copy == uint32(0)) {
 12639  		goto __251
 12640  	}
 12641  	goto inf_leave
 12642  __251:
 12643  	;
 12644  	libc.Xmemcpy(tls, put, next, copy)
 12645  	have = have - copy
 12646  	next += uintptr(copy)
 12647  	left = left - copy
 12648  	put += uintptr(copy)
 12649  	*(*uint32)(unsafe.Pointer(state + 68)) -= copy
 12650  	goto __9
 12651  __248:
 12652  	;
 12653  
 12654  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 12655  	goto __9
 12656  __26:
 12657  __252:
 12658  __255:
 12659  	if !(bits < uint32(14)) {
 12660  		goto __256
 12661  	}
 12662  __257:
 12663  	if !(have == uint32(0)) {
 12664  		goto __260
 12665  	}
 12666  	goto inf_leave
 12667  __260:
 12668  	;
 12669  	have--
 12670  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12671  	bits = bits + uint32(8)
 12672  	goto __258
 12673  __258:
 12674  	if 0 != 0 {
 12675  		goto __257
 12676  	}
 12677  	goto __259
 12678  __259:
 12679  	;
 12680  	goto __255
 12681  __256:
 12682  	;
 12683  	goto __253
 12684  __253:
 12685  	if 0 != 0 {
 12686  		goto __252
 12687  	}
 12688  	goto __254
 12689  __254:
 12690  	;
 12691  	(*Inflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(257)
 12692  __261:
 12693  	hold >>= 5
 12694  	bits = bits - uint32(5)
 12695  	goto __262
 12696  __262:
 12697  	if 0 != 0 {
 12698  		goto __261
 12699  	}
 12700  	goto __263
 12701  __263:
 12702  	;
 12703  	(*Inflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(uint32(1)<<5-uint32(1)) + uint32(1)
 12704  __264:
 12705  	hold >>= 5
 12706  	bits = bits - uint32(5)
 12707  	goto __265
 12708  __265:
 12709  	if 0 != 0 {
 12710  		goto __264
 12711  	}
 12712  	goto __266
 12713  __266:
 12714  	;
 12715  	(*Inflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(uint32(1)<<4-uint32(1)) + uint32(4)
 12716  __267:
 12717  	hold >>= 4
 12718  	bits = bits - uint32(4)
 12719  	goto __268
 12720  __268:
 12721  	if 0 != 0 {
 12722  		goto __267
 12723  	}
 12724  	goto __269
 12725  __269:
 12726  	;
 12727  	if !((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30)) {
 12728  		goto __270
 12729  	}
 12730  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */
 12731  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12732  	goto __9
 12733  __270:
 12734  	;
 12735  
 12736  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 12737  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENLENS
 12738  __27:
 12739  __271:
 12740  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) {
 12741  		goto __272
 12742  	}
 12743  __273:
 12744  __276:
 12745  	if !(bits < uint32(3)) {
 12746  		goto __277
 12747  	}
 12748  __278:
 12749  	if !(have == uint32(0)) {
 12750  		goto __281
 12751  	}
 12752  	goto inf_leave
 12753  __281:
 12754  	;
 12755  	have--
 12756  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12757  	bits = bits + uint32(8)
 12758  	goto __279
 12759  __279:
 12760  	if 0 != 0 {
 12761  		goto __278
 12762  	}
 12763  	goto __280
 12764  __280:
 12765  	;
 12766  	goto __276
 12767  __277:
 12768  	;
 12769  	goto __274
 12770  __274:
 12771  	if 0 != 0 {
 12772  		goto __273
 12773  	}
 12774  	goto __275
 12775  __275:
 12776  	;
 12777  	*(*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)))
 12778  __282:
 12779  	hold >>= 3
 12780  	bits = bits - uint32(3)
 12781  	goto __283
 12782  __283:
 12783  	if 0 != 0 {
 12784  		goto __282
 12785  	}
 12786  	goto __284
 12787  __284:
 12788  	;
 12789  	goto __271
 12790  __272:
 12791  	;
 12792  __285:
 12793  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) {
 12794  		goto __286
 12795  	}
 12796  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0)
 12797  	goto __285
 12798  __286:
 12799  	;
 12800  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */
 12801  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 12802  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7)
 12803  	ret = Xinflate_table(tls, CODES, state+116, uint32(19), state+112,
 12804  		state+88, state+756)
 12805  	if !(ret != 0) {
 12806  		goto __287
 12807  	}
 12808  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */
 12809  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12810  	goto __9
 12811  __287:
 12812  	;
 12813  
 12814  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 12815  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = CODELENS
 12816  __28:
 12817  __288:
 12818  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
 12819  		goto __289
 12820  	}
 12821  __290:
 12822  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
 12823  	if !(uint32(here.Fbits) <= bits) {
 12824  		goto __293
 12825  	}
 12826  	goto __292
 12827  __293:
 12828  	;
 12829  __294:
 12830  	if !(have == uint32(0)) {
 12831  		goto __297
 12832  	}
 12833  	goto inf_leave
 12834  __297:
 12835  	;
 12836  	have--
 12837  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12838  	bits = bits + uint32(8)
 12839  	goto __295
 12840  __295:
 12841  	if 0 != 0 {
 12842  		goto __294
 12843  	}
 12844  	goto __296
 12845  __296:
 12846  	;
 12847  	goto __291
 12848  __291:
 12849  	goto __290
 12850  	goto __292
 12851  __292:
 12852  	;
 12853  	if !(int32(here.Fval) < 16) {
 12854  		goto __298
 12855  	}
 12856  __300:
 12857  	hold >>= int32(here.Fbits)
 12858  	bits = bits - uint32(here.Fbits)
 12859  	goto __301
 12860  __301:
 12861  	if 0 != 0 {
 12862  		goto __300
 12863  	}
 12864  	goto __302
 12865  __302:
 12866  	;
 12867  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval
 12868  	goto __299
 12869  __298:
 12870  	if !(int32(here.Fval) == 16) {
 12871  		goto __303
 12872  	}
 12873  __305:
 12874  __308:
 12875  	if !(bits < uint32(int32(here.Fbits)+2)) {
 12876  		goto __309
 12877  	}
 12878  __310:
 12879  	if !(have == uint32(0)) {
 12880  		goto __313
 12881  	}
 12882  	goto inf_leave
 12883  __313:
 12884  	;
 12885  	have--
 12886  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12887  	bits = bits + uint32(8)
 12888  	goto __311
 12889  __311:
 12890  	if 0 != 0 {
 12891  		goto __310
 12892  	}
 12893  	goto __312
 12894  __312:
 12895  	;
 12896  	goto __308
 12897  __309:
 12898  	;
 12899  	goto __306
 12900  __306:
 12901  	if 0 != 0 {
 12902  		goto __305
 12903  	}
 12904  	goto __307
 12905  __307:
 12906  	;
 12907  __314:
 12908  	hold >>= int32(here.Fbits)
 12909  	bits = bits - uint32(here.Fbits)
 12910  	goto __315
 12911  __315:
 12912  	if 0 != 0 {
 12913  		goto __314
 12914  	}
 12915  	goto __316
 12916  __316:
 12917  	;
 12918  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) {
 12919  		goto __317
 12920  	}
 12921  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
 12922  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12923  	goto __289
 12924  __317:
 12925  	;
 12926  	len = uint32(*(*uint16)(unsafe.Pointer(state + 116 + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2)))
 12927  	copy = uint32(3) + uint32(hold)&(uint32(1)<<2-uint32(1))
 12928  __318:
 12929  	hold >>= 2
 12930  	bits = bits - uint32(2)
 12931  	goto __319
 12932  __319:
 12933  	if 0 != 0 {
 12934  		goto __318
 12935  	}
 12936  	goto __320
 12937  __320:
 12938  	;
 12939  	goto __304
 12940  __303:
 12941  	if !(int32(here.Fval) == 17) {
 12942  		goto __321
 12943  	}
 12944  __323:
 12945  __326:
 12946  	if !(bits < uint32(int32(here.Fbits)+3)) {
 12947  		goto __327
 12948  	}
 12949  __328:
 12950  	if !(have == uint32(0)) {
 12951  		goto __331
 12952  	}
 12953  	goto inf_leave
 12954  __331:
 12955  	;
 12956  	have--
 12957  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 12958  	bits = bits + uint32(8)
 12959  	goto __329
 12960  __329:
 12961  	if 0 != 0 {
 12962  		goto __328
 12963  	}
 12964  	goto __330
 12965  __330:
 12966  	;
 12967  	goto __326
 12968  __327:
 12969  	;
 12970  	goto __324
 12971  __324:
 12972  	if 0 != 0 {
 12973  		goto __323
 12974  	}
 12975  	goto __325
 12976  __325:
 12977  	;
 12978  __332:
 12979  	hold >>= int32(here.Fbits)
 12980  	bits = bits - uint32(here.Fbits)
 12981  	goto __333
 12982  __333:
 12983  	if 0 != 0 {
 12984  		goto __332
 12985  	}
 12986  	goto __334
 12987  __334:
 12988  	;
 12989  	len = uint32(0)
 12990  	copy = uint32(3) + uint32(hold)&(uint32(1)<<3-uint32(1))
 12991  __335:
 12992  	hold >>= 3
 12993  	bits = bits - uint32(3)
 12994  	goto __336
 12995  __336:
 12996  	if 0 != 0 {
 12997  		goto __335
 12998  	}
 12999  	goto __337
 13000  __337:
 13001  	;
 13002  	goto __322
 13003  __321:
 13004  __338:
 13005  __341:
 13006  	if !(bits < uint32(int32(here.Fbits)+7)) {
 13007  		goto __342
 13008  	}
 13009  __343:
 13010  	if !(have == uint32(0)) {
 13011  		goto __346
 13012  	}
 13013  	goto inf_leave
 13014  __346:
 13015  	;
 13016  	have--
 13017  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13018  	bits = bits + uint32(8)
 13019  	goto __344
 13020  __344:
 13021  	if 0 != 0 {
 13022  		goto __343
 13023  	}
 13024  	goto __345
 13025  __345:
 13026  	;
 13027  	goto __341
 13028  __342:
 13029  	;
 13030  	goto __339
 13031  __339:
 13032  	if 0 != 0 {
 13033  		goto __338
 13034  	}
 13035  	goto __340
 13036  __340:
 13037  	;
 13038  __347:
 13039  	hold >>= int32(here.Fbits)
 13040  	bits = bits - uint32(here.Fbits)
 13041  	goto __348
 13042  __348:
 13043  	if 0 != 0 {
 13044  		goto __347
 13045  	}
 13046  	goto __349
 13047  __349:
 13048  	;
 13049  	len = uint32(0)
 13050  	copy = uint32(11) + uint32(hold)&(uint32(1)<<7-uint32(1))
 13051  __350:
 13052  	hold >>= 7
 13053  	bits = bits - uint32(7)
 13054  	goto __351
 13055  __351:
 13056  	if 0 != 0 {
 13057  		goto __350
 13058  	}
 13059  	goto __352
 13060  __352:
 13061  	;
 13062  __322:
 13063  	;
 13064  __304:
 13065  	;
 13066  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave+copy > (*Inflate_state)(unsafe.Pointer(state)).Fnlen+(*Inflate_state)(unsafe.Pointer(state)).Fndist) {
 13067  		goto __353
 13068  	}
 13069  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
 13070  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13071  	goto __289
 13072  __353:
 13073  	;
 13074  __354:
 13075  	if !(libc.PostDecUint32(&copy, 1) != 0) {
 13076  		goto __355
 13077  	}
 13078  	*(*uint16)(unsafe.Pointer(state + 116 + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len)
 13079  	goto __354
 13080  __355:
 13081  	;
 13082  __299:
 13083  	;
 13084  	goto __288
 13085  __289:
 13086  	;
 13087  
 13088  	// handle error breaks in while
 13089  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) {
 13090  		goto __356
 13091  	}
 13092  	goto __9
 13093  __356:
 13094  	;
 13095  
 13096  	// check for end-of-block code (better have one)
 13097  	if !(int32(*(*uint16)(unsafe.Pointer(state + 116 + 256*2))) == 0) {
 13098  		goto __357
 13099  	}
 13100  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */
 13101  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13102  	goto __9
 13103  __357:
 13104  	;
 13105  
 13106  	// build code tables -- note: do not change the lenbits or distbits
 13107  	//                values here (9 and 6) without reading the comments in inftrees.h
 13108  	//                concerning the ENOUGH constants, which depend on those values
 13109  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1332 /* &.codes */
 13110  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 13111  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
 13112  	ret = Xinflate_table(tls, LENS, state+116, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, state+112,
 13113  		state+88, state+756)
 13114  	if !(ret != 0) {
 13115  		goto __358
 13116  	}
 13117  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */
 13118  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13119  	goto __9
 13120  __358:
 13121  	;
 13122  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 13123  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6)
 13124  	ret = Xinflate_table(tls, DISTS, state+116+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Inflate_state)(unsafe.Pointer(state)).Fndist,
 13125  		state+112, state+92, state+756)
 13126  	if !(ret != 0) {
 13127  		goto __359
 13128  	}
 13129  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */
 13130  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13131  	goto __9
 13132  __359:
 13133  	;
 13134  
 13135  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_
 13136  	if !(flush == Z_TREES) {
 13137  		goto __360
 13138  	}
 13139  	goto inf_leave
 13140  __360:
 13141  	;
 13142  __29:
 13143  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 13144  __30:
 13145  	if !(have >= uint32(6) && left >= uint32(258)) {
 13146  		goto __361
 13147  	}
 13148  __362:
 13149  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 13150  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 13151  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
 13152  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 13153  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 13154  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 13155  	goto __363
 13156  __363:
 13157  	if 0 != 0 {
 13158  		goto __362
 13159  	}
 13160  	goto __364
 13161  __364:
 13162  	;
 13163  	Xinflate_fast(tls, strm, out)
 13164  __365:
 13165  	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 13166  	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 13167  	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 13168  	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 13169  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 13170  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 13171  	goto __366
 13172  __366:
 13173  	if 0 != 0 {
 13174  		goto __365
 13175  	}
 13176  	goto __367
 13177  __367:
 13178  	;
 13179  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) {
 13180  		goto __368
 13181  	}
 13182  	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
 13183  __368:
 13184  	;
 13185  	goto __9
 13186  __361:
 13187  	;
 13188  	(*Inflate_state)(unsafe.Pointer(state)).Fback = 0
 13189  __369:
 13190  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Flenbits-uint32(1)))*4))
 13191  	if !(uint32(here.Fbits) <= bits) {
 13192  		goto __372
 13193  	}
 13194  	goto __371
 13195  __372:
 13196  	;
 13197  __373:
 13198  	if !(have == uint32(0)) {
 13199  		goto __376
 13200  	}
 13201  	goto inf_leave
 13202  __376:
 13203  	;
 13204  	have--
 13205  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13206  	bits = bits + uint32(8)
 13207  	goto __374
 13208  __374:
 13209  	if 0 != 0 {
 13210  		goto __373
 13211  	}
 13212  	goto __375
 13213  __375:
 13214  	;
 13215  	goto __370
 13216  __370:
 13217  	goto __369
 13218  	goto __371
 13219  __371:
 13220  	;
 13221  	if !(here.Fop != 0 && int32(here.Fop)&0xf0 == 0) {
 13222  		goto __377
 13223  	}
 13224  	last = here
 13225  __378:
 13226  	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))
 13227  	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
 13228  		goto __381
 13229  	}
 13230  	goto __380
 13231  __381:
 13232  	;
 13233  __382:
 13234  	if !(have == uint32(0)) {
 13235  		goto __385
 13236  	}
 13237  	goto inf_leave
 13238  __385:
 13239  	;
 13240  	have--
 13241  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13242  	bits = bits + uint32(8)
 13243  	goto __383
 13244  __383:
 13245  	if 0 != 0 {
 13246  		goto __382
 13247  	}
 13248  	goto __384
 13249  __384:
 13250  	;
 13251  	goto __379
 13252  __379:
 13253  	goto __378
 13254  	goto __380
 13255  __380:
 13256  	;
 13257  __386:
 13258  	hold >>= int32(last.Fbits)
 13259  	bits = bits - uint32(last.Fbits)
 13260  	goto __387
 13261  __387:
 13262  	if 0 != 0 {
 13263  		goto __386
 13264  	}
 13265  	goto __388
 13266  __388:
 13267  	;
 13268  	*(*int32)(unsafe.Pointer(state + 7112)) += int32(last.Fbits)
 13269  __377:
 13270  	;
 13271  __389:
 13272  	hold >>= int32(here.Fbits)
 13273  	bits = bits - uint32(here.Fbits)
 13274  	goto __390
 13275  __390:
 13276  	if 0 != 0 {
 13277  		goto __389
 13278  	}
 13279  	goto __391
 13280  __391:
 13281  	;
 13282  	*(*int32)(unsafe.Pointer(state + 7112)) += int32(here.Fbits)
 13283  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval)
 13284  	if !(int32(here.Fop) == 0) {
 13285  		goto __392
 13286  	}
 13287  
 13288  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LIT
 13289  	goto __9
 13290  __392:
 13291  	;
 13292  	if !(int32(here.Fop)&32 != 0) {
 13293  		goto __393
 13294  	}
 13295  
 13296  	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
 13297  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 13298  	goto __9
 13299  __393:
 13300  	;
 13301  	if !(int32(here.Fop)&64 != 0) {
 13302  		goto __394
 13303  	}
 13304  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */
 13305  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13306  	goto __9
 13307  __394:
 13308  	;
 13309  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
 13310  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENEXT
 13311  __31:
 13312  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) {
 13313  		goto __395
 13314  	}
 13315  __396:
 13316  __399:
 13317  	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
 13318  		goto __400
 13319  	}
 13320  __401:
 13321  	if !(have == uint32(0)) {
 13322  		goto __404
 13323  	}
 13324  	goto inf_leave
 13325  __404:
 13326  	;
 13327  	have--
 13328  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13329  	bits = bits + uint32(8)
 13330  	goto __402
 13331  __402:
 13332  	if 0 != 0 {
 13333  		goto __401
 13334  	}
 13335  	goto __403
 13336  __403:
 13337  	;
 13338  	goto __399
 13339  __400:
 13340  	;
 13341  	goto __397
 13342  __397:
 13343  	if 0 != 0 {
 13344  		goto __396
 13345  	}
 13346  	goto __398
 13347  __398:
 13348  	;
 13349  	*(*uint32)(unsafe.Pointer(state + 68)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
 13350  __405:
 13351  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 13352  	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
 13353  	goto __406
 13354  __406:
 13355  	if 0 != 0 {
 13356  		goto __405
 13357  	}
 13358  	goto __407
 13359  __407:
 13360  	;
 13361  	*(*int32)(unsafe.Pointer(state + 7112)) += int32((*Inflate_state)(unsafe.Pointer(state)).Fextra)
 13362  __395:
 13363  	;
 13364  
 13365  	(*Inflate_state)(unsafe.Pointer(state)).Fwas = (*Inflate_state)(unsafe.Pointer(state)).Flength
 13366  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DIST
 13367  __32:
 13368  __408:
 13369  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fdistbits-uint32(1)))*4))
 13370  	if !(uint32(here.Fbits) <= bits) {
 13371  		goto __411
 13372  	}
 13373  	goto __410
 13374  __411:
 13375  	;
 13376  __412:
 13377  	if !(have == uint32(0)) {
 13378  		goto __415
 13379  	}
 13380  	goto inf_leave
 13381  __415:
 13382  	;
 13383  	have--
 13384  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13385  	bits = bits + uint32(8)
 13386  	goto __413
 13387  __413:
 13388  	if 0 != 0 {
 13389  		goto __412
 13390  	}
 13391  	goto __414
 13392  __414:
 13393  	;
 13394  	goto __409
 13395  __409:
 13396  	goto __408
 13397  	goto __410
 13398  __410:
 13399  	;
 13400  	if !(int32(here.Fop)&0xf0 == 0) {
 13401  		goto __416
 13402  	}
 13403  	last = here
 13404  __417:
 13405  	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))
 13406  	if !(uint32(int32(last.Fbits)+int32(here.Fbits)) <= bits) {
 13407  		goto __420
 13408  	}
 13409  	goto __419
 13410  __420:
 13411  	;
 13412  __421:
 13413  	if !(have == uint32(0)) {
 13414  		goto __424
 13415  	}
 13416  	goto inf_leave
 13417  __424:
 13418  	;
 13419  	have--
 13420  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13421  	bits = bits + uint32(8)
 13422  	goto __422
 13423  __422:
 13424  	if 0 != 0 {
 13425  		goto __421
 13426  	}
 13427  	goto __423
 13428  __423:
 13429  	;
 13430  	goto __418
 13431  __418:
 13432  	goto __417
 13433  	goto __419
 13434  __419:
 13435  	;
 13436  __425:
 13437  	hold >>= int32(last.Fbits)
 13438  	bits = bits - uint32(last.Fbits)
 13439  	goto __426
 13440  __426:
 13441  	if 0 != 0 {
 13442  		goto __425
 13443  	}
 13444  	goto __427
 13445  __427:
 13446  	;
 13447  	*(*int32)(unsafe.Pointer(state + 7112)) += int32(last.Fbits)
 13448  __416:
 13449  	;
 13450  __428:
 13451  	hold >>= int32(here.Fbits)
 13452  	bits = bits - uint32(here.Fbits)
 13453  	goto __429
 13454  __429:
 13455  	if 0 != 0 {
 13456  		goto __428
 13457  	}
 13458  	goto __430
 13459  __430:
 13460  	;
 13461  	*(*int32)(unsafe.Pointer(state + 7112)) += int32(here.Fbits)
 13462  	if !(int32(here.Fop)&64 != 0) {
 13463  		goto __431
 13464  	}
 13465  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */
 13466  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13467  	goto __9
 13468  __431:
 13469  	;
 13470  	(*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval)
 13471  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15)
 13472  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DISTEXT
 13473  __33:
 13474  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) {
 13475  		goto __432
 13476  	}
 13477  __433:
 13478  __436:
 13479  	if !(bits < (*Inflate_state)(unsafe.Pointer(state)).Fextra) {
 13480  		goto __437
 13481  	}
 13482  __438:
 13483  	if !(have == uint32(0)) {
 13484  		goto __441
 13485  	}
 13486  	goto inf_leave
 13487  __441:
 13488  	;
 13489  	have--
 13490  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13491  	bits = bits + uint32(8)
 13492  	goto __439
 13493  __439:
 13494  	if 0 != 0 {
 13495  		goto __438
 13496  	}
 13497  	goto __440
 13498  __440:
 13499  	;
 13500  	goto __436
 13501  __437:
 13502  	;
 13503  	goto __434
 13504  __434:
 13505  	if 0 != 0 {
 13506  		goto __433
 13507  	}
 13508  	goto __435
 13509  __435:
 13510  	;
 13511  	*(*uint32)(unsafe.Pointer(state + 72)) += uint32(hold) & (uint32(1)<<(*Inflate_state)(unsafe.Pointer(state)).Fextra - uint32(1))
 13512  __442:
 13513  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 13514  	bits = bits - (*Inflate_state)(unsafe.Pointer(state)).Fextra
 13515  	goto __443
 13516  __443:
 13517  	if 0 != 0 {
 13518  		goto __442
 13519  	}
 13520  	goto __444
 13521  __444:
 13522  	;
 13523  	*(*int32)(unsafe.Pointer(state + 7112)) += int32((*Inflate_state)(unsafe.Pointer(state)).Fextra)
 13524  __432:
 13525  	;
 13526  
 13527  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = MATCH
 13528  __34:
 13529  	if !(left == uint32(0)) {
 13530  		goto __445
 13531  	}
 13532  	goto inf_leave
 13533  __445:
 13534  	;
 13535  	copy = out - left
 13536  	if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > copy) {
 13537  		goto __446
 13538  	} // copy from window
 13539  	copy = (*Inflate_state)(unsafe.Pointer(state)).Foffset - copy
 13540  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwhave) {
 13541  		goto __448
 13542  	}
 13543  	if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) {
 13544  		goto __449
 13545  	}
 13546  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */
 13547  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13548  	goto __9
 13549  __449:
 13550  	;
 13551  __448:
 13552  	;
 13553  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwnext) {
 13554  		goto __450
 13555  	}
 13556  	copy = copy - (*Inflate_state)(unsafe.Pointer(state)).Fwnext
 13557  	from = (*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize-copy)
 13558  	goto __451
 13559  __450:
 13560  	from = (*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext-copy)
 13561  __451:
 13562  	;
 13563  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) {
 13564  		goto __452
 13565  	}
 13566  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 13567  __452:
 13568  	;
 13569  	goto __447
 13570  __446: // copy from output
 13571  	from = put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset)
 13572  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 13573  __447:
 13574  	;
 13575  	if !(copy > left) {
 13576  		goto __453
 13577  	}
 13578  	copy = left
 13579  __453:
 13580  	;
 13581  	left = left - copy
 13582  	*(*uint32)(unsafe.Pointer(state + 68)) -= copy
 13583  __454:
 13584  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 13585  	goto __455
 13586  __455:
 13587  	if libc.PreDecUint32(&copy, 1) != 0 {
 13588  		goto __454
 13589  	}
 13590  	goto __456
 13591  __456:
 13592  	;
 13593  	if !((*Inflate_state)(unsafe.Pointer(state)).Flength == uint32(0)) {
 13594  		goto __457
 13595  	}
 13596  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 13597  __457:
 13598  	;
 13599  	goto __9
 13600  __35:
 13601  	if !(left == uint32(0)) {
 13602  		goto __458
 13603  	}
 13604  	goto inf_leave
 13605  __458:
 13606  	;
 13607  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength)
 13608  	left--
 13609  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 13610  	goto __9
 13611  __36:
 13612  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) {
 13613  		goto __459
 13614  	}
 13615  __460:
 13616  __463:
 13617  	if !(bits < uint32(32)) {
 13618  		goto __464
 13619  	}
 13620  __465:
 13621  	if !(have == uint32(0)) {
 13622  		goto __468
 13623  	}
 13624  	goto inf_leave
 13625  __468:
 13626  	;
 13627  	have--
 13628  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13629  	bits = bits + uint32(8)
 13630  	goto __466
 13631  __466:
 13632  	if 0 != 0 {
 13633  		goto __465
 13634  	}
 13635  	goto __467
 13636  __467:
 13637  	;
 13638  	goto __463
 13639  __464:
 13640  	;
 13641  	goto __461
 13642  __461:
 13643  	if 0 != 0 {
 13644  		goto __460
 13645  	}
 13646  	goto __462
 13647  __462:
 13648  	;
 13649  	out = out - left
 13650  	*(*ULong)(unsafe.Pointer(strm + 20)) += ULong(out)
 13651  	*(*uint32)(unsafe.Pointer(state + 32)) += uint32(out)
 13652  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && out != 0) {
 13653  		goto __469
 13654  	}
 13655  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, func() uint32 {
 13656  		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
 13657  			return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out)
 13658  		}
 13659  		return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out)
 13660  	}())
 13661  __469:
 13662  	;
 13663  	out = left
 13664  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && func() uint32 {
 13665  		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
 13666  			return hold
 13667  		}
 13668  		return hold>>24&uint32(0xff) + hold>>8&uint32(0xff00) + hold&uint32(0xff00)<<8 + hold&uint32(0xff)<<24
 13669  	}() != (*Inflate_state)(unsafe.Pointer(state)).Fcheck) {
 13670  		goto __470
 13671  	}
 13672  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 784 /* "incorrect data c..." */
 13673  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13674  	goto __9
 13675  __470:
 13676  	;
 13677  __471:
 13678  	hold = uint32(0)
 13679  	bits = uint32(0)
 13680  	goto __472
 13681  __472:
 13682  	if 0 != 0 {
 13683  		goto __471
 13684  	}
 13685  	goto __473
 13686  __473:
 13687  	;
 13688  
 13689  __459:
 13690  	;
 13691  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENGTH
 13692  __37:
 13693  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0) {
 13694  		goto __474
 13695  	}
 13696  __475:
 13697  __478:
 13698  	if !(bits < uint32(32)) {
 13699  		goto __479
 13700  	}
 13701  __480:
 13702  	if !(have == uint32(0)) {
 13703  		goto __483
 13704  	}
 13705  	goto inf_leave
 13706  __483:
 13707  	;
 13708  	have--
 13709  	hold = hold + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))<<bits
 13710  	bits = bits + uint32(8)
 13711  	goto __481
 13712  __481:
 13713  	if 0 != 0 {
 13714  		goto __480
 13715  	}
 13716  	goto __482
 13717  __482:
 13718  	;
 13719  	goto __478
 13720  __479:
 13721  	;
 13722  	goto __476
 13723  __476:
 13724  	if 0 != 0 {
 13725  		goto __475
 13726  	}
 13727  	goto __477
 13728  __477:
 13729  	;
 13730  	if !(hold != (*Inflate_state)(unsafe.Pointer(state)).Ftotal&0xffffffff) {
 13731  		goto __484
 13732  	}
 13733  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 805 /* "incorrect length..." */
 13734  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13735  	goto __9
 13736  __484:
 13737  	;
 13738  __485:
 13739  	hold = uint32(0)
 13740  	bits = uint32(0)
 13741  	goto __486
 13742  __486:
 13743  	if 0 != 0 {
 13744  		goto __485
 13745  	}
 13746  	goto __487
 13747  __487:
 13748  	;
 13749  
 13750  __474:
 13751  	;
 13752  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE
 13753  __38:
 13754  	ret = Z_STREAM_END
 13755  	goto inf_leave
 13756  __39:
 13757  	ret = -3
 13758  	goto inf_leave
 13759  __40:
 13760  	return -4
 13761  __41:
 13762  __42:
 13763  	return -2
 13764  __9:
 13765  	;
 13766  	goto __7
 13767  __7:
 13768  	goto __6
 13769  	goto __8
 13770  __8:
 13771  	;
 13772  
 13773  	//
 13774  	//        Return from inflate(), updating the total counts and the check value.
 13775  	//        If there was no progress during the inflate() call, return a buffer
 13776  	//        error.  Call updatewindow() to create and/or update the window state.
 13777  	//        Note: a memory error from inflate() is non-recoverable.
 13778  	//
 13779  inf_leave:
 13780  __488:
 13781  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 13782  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 13783  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
 13784  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 13785  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 13786  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 13787  	goto __489
 13788  __489:
 13789  	if 0 != 0 {
 13790  		goto __488
 13791  	}
 13792  	goto __490
 13793  __490:
 13794  	;
 13795  	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)) {
 13796  		goto __491
 13797  	}
 13798  	if !(updatewindow(tls, strm, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, out-(*Z_stream)(unsafe.Pointer(strm)).Favail_out) != 0) {
 13799  		goto __492
 13800  	}
 13801  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM
 13802  	return -4
 13803  __492:
 13804  	;
 13805  __491:
 13806  	;
 13807  	in = in - (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 13808  	out = out - (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 13809  	*(*ULong)(unsafe.Pointer(strm + 8)) += ULong(in)
 13810  	*(*ULong)(unsafe.Pointer(strm + 20)) += ULong(out)
 13811  	*(*uint32)(unsafe.Pointer(state + 32)) += uint32(out)
 13812  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap&4 != 0 && out != 0) {
 13813  		goto __493
 13814  	}
 13815  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint32(state+28, func() uint32 {
 13816  		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
 13817  			return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out-uintptr(out), out)
 13818  		}
 13819  		return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out-uintptr(out), out)
 13820  	}())
 13821  __493:
 13822  	;
 13823  	(*Z_stream)(unsafe.Pointer(strm)).Fdata_type = int32((*Inflate_state)(unsafe.Pointer(state)).Fbits) + func() int32 {
 13824  		if (*Inflate_state)(unsafe.Pointer(state)).Flast != 0 {
 13825  			return 64
 13826  		}
 13827  		return 0
 13828  	}() + func() int32 {
 13829  		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE {
 13830  			return 128
 13831  		}
 13832  		return 0
 13833  	}() + func() int32 {
 13834  		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == LEN_ || (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY_ {
 13835  			return 256
 13836  		}
 13837  		return 0
 13838  	}()
 13839  	if !((in == uint32(0) && out == uint32(0) || flush == Z_FINISH) && ret == Z_OK) {
 13840  		goto __494
 13841  	}
 13842  	ret = -5
 13843  __494:
 13844  	;
 13845  	return ret
 13846  }
 13847  
 13848  var order1 =                                                                                                                                                                                                                         // permutation of code lengths
 13849  [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 */
 13850  
 13851  func XinflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1277:13: */
 13852  	var state uintptr
 13853  	if inflateStateCheck(tls, strm) != 0 {
 13854  		return -2
 13855  	}
 13856  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13857  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) {
 13858  		(*struct {
 13859  			f func(*libc.TLS, Voidpf, Voidpf)
 13860  		})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow)
 13861  	}
 13862  	(*struct {
 13863  		f func(*libc.TLS, Voidpf, Voidpf)
 13864  	})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(strm)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
 13865  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
 13866  
 13867  	return Z_OK
 13868  }
 13869  
 13870  func XinflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* inflate.c:1291:13: */
 13871  	var state uintptr
 13872  
 13873  	// check state
 13874  	if inflateStateCheck(tls, strm) != 0 {
 13875  		return -2
 13876  	}
 13877  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13878  
 13879  	// copy dictionary
 13880  	if (*Inflate_state)(unsafe.Pointer(state)).Fwhave != 0 && dictionary != uintptr(Z_NULL) {
 13881  		libc.Xmemcpy(tls, dictionary, (*Inflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext),
 13882  			(*Inflate_state)(unsafe.Pointer(state)).Fwhave-(*Inflate_state)(unsafe.Pointer(state)).Fwnext)
 13883  		libc.Xmemcpy(tls, dictionary+uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwhave)-uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext),
 13884  			(*Inflate_state)(unsafe.Pointer(state)).Fwindow, (*Inflate_state)(unsafe.Pointer(state)).Fwnext)
 13885  	}
 13886  	if dictLength != uintptr(Z_NULL) {
 13887  		*(*UInt)(unsafe.Pointer(dictLength)) = (*Inflate_state)(unsafe.Pointer(state)).Fwhave
 13888  	}
 13889  	return Z_OK
 13890  }
 13891  
 13892  func XinflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* inflate.c:1314:13: */
 13893  	var state uintptr
 13894  	var dictid uint32
 13895  	var ret int32
 13896  
 13897  	// check state
 13898  	if inflateStateCheck(tls, strm) != 0 {
 13899  		return -2
 13900  	}
 13901  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13902  	if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 && (*Inflate_state)(unsafe.Pointer(state)).Fmode != DICT {
 13903  		return -2
 13904  	}
 13905  
 13906  	// check for correct dictionary identifier
 13907  	if (*Inflate_state)(unsafe.Pointer(state)).Fmode == DICT {
 13908  		dictid = Xadler32(tls, uint32(0), uintptr(Z_NULL), uint32(0))
 13909  		dictid = Xadler32(tls, dictid, dictionary, dictLength)
 13910  		if dictid != (*Inflate_state)(unsafe.Pointer(state)).Fcheck {
 13911  			return -3
 13912  		}
 13913  	}
 13914  
 13915  	// copy dictionary to window using updatewindow(), which will amend the
 13916  	//        existing dictionary if appropriate
 13917  	ret = updatewindow(tls, strm, dictionary+uintptr(dictLength), dictLength)
 13918  	if ret != 0 {
 13919  		(*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM
 13920  		return -4
 13921  	}
 13922  	(*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 1
 13923  
 13924  	return Z_OK
 13925  }
 13926  
 13927  func XinflateGetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* inflate.c:1349:13: */
 13928  	var state uintptr
 13929  
 13930  	// check state
 13931  	if inflateStateCheck(tls, strm) != 0 {
 13932  		return -2
 13933  	}
 13934  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13935  	if (*Inflate_state)(unsafe.Pointer(state)).Fwrap&2 == 0 {
 13936  		return -2
 13937  	}
 13938  
 13939  	// save header structure
 13940  	(*Inflate_state)(unsafe.Pointer(state)).Fhead = head
 13941  	(*Gz_header)(unsafe.Pointer(head)).Fdone = 0
 13942  	return Z_OK
 13943  }
 13944  
 13945  //
 13946  //    Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff.  Return when found
 13947  //    or when out of input.  When called, *have is the number of pattern bytes
 13948  //    found in order so far, in 0..3.  On return *have is updated to the new
 13949  //    state.  If on return *have equals four, then the pattern was found and the
 13950  //    return value is how many bytes were read including the last byte of the
 13951  //    pattern.  If *have is less than four, then the pattern has not been found
 13952  //    yet and the return value is len.  In the latter case, syncsearch() can be
 13953  //    called again with more data and the *have state.  *have is initialized to
 13954  //    zero for the first call.
 13955  //
 13956  func syncsearch(tls *libc.TLS, have uintptr, buf uintptr, len uint32) uint32 { /* inflate.c:1377:16: */
 13957  	var got uint32
 13958  	var next uint32
 13959  
 13960  	got = *(*uint32)(unsafe.Pointer(have))
 13961  	next = uint32(0)
 13962  	for next < len && got < uint32(4) {
 13963  		if int32(*(*uint8)(unsafe.Pointer(buf + uintptr(next)))) == func() int32 {
 13964  			if got < uint32(2) {
 13965  				return 0
 13966  			}
 13967  			return 0xff
 13968  		}() {
 13969  			got++
 13970  		} else if *(*uint8)(unsafe.Pointer(buf + uintptr(next))) != 0 {
 13971  			got = uint32(0)
 13972  		} else {
 13973  			got = uint32(4) - got
 13974  		}
 13975  		next++
 13976  	}
 13977  	*(*uint32)(unsafe.Pointer(have)) = got
 13978  	return next
 13979  }
 13980  
 13981  func XinflateSync(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1400:13: */
 13982  	bp := tls.Alloc(4)
 13983  	defer tls.Free(4)
 13984  
 13985  	var len uint32 // number of bytes to look at or looked at
 13986  	var in uint32
 13987  	var out uint32 // temporary to save total_in and total_out
 13988  	// var buf [4]uint8 at bp, 4
 13989  	// to restore bit buffer to byte string
 13990  	var state uintptr
 13991  
 13992  	// check parameters
 13993  	if inflateStateCheck(tls, strm) != 0 {
 13994  		return -2
 13995  	}
 13996  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13997  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) && (*Inflate_state)(unsafe.Pointer(state)).Fbits < uint32(8) {
 13998  		return -5
 13999  	}
 14000  
 14001  	// if first time, start search in bit buffer
 14002  	if (*Inflate_state)(unsafe.Pointer(state)).Fmode != SYNC {
 14003  		(*Inflate_state)(unsafe.Pointer(state)).Fmode = SYNC
 14004  		libc.AssignShlPtrUint32(state+60, int((*Inflate_state)(unsafe.Pointer(state)).Fbits&uint32(7)))
 14005  		*(*uint32)(unsafe.Pointer(state + 64)) -= (*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)
 14006  		len = uint32(0)
 14007  		for (*Inflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) {
 14008  			*(*uint8)(unsafe.Pointer(bp + uintptr(libc.PostIncUint32(&len, 1)))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Fhold)
 14009  			libc.AssignShrPtrUint32(state+60, int(8))
 14010  			*(*uint32)(unsafe.Pointer(state + 64)) -= uint32(8)
 14011  		}
 14012  		(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 14013  		syncsearch(tls, state+108, bp, len)
 14014  	}
 14015  
 14016  	// search available input
 14017  	len = syncsearch(tls, state+108, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in)
 14018  	*(*UInt)(unsafe.Pointer(strm + 4)) -= len
 14019  	*(*uintptr)(unsafe.Pointer(strm)) += uintptr(len)
 14020  	*(*ULong)(unsafe.Pointer(strm + 8)) += ULong(len)
 14021  
 14022  	// return no joy or set up to restart inflate() on a new block
 14023  	if (*Inflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) {
 14024  		return -3
 14025  	}
 14026  	in = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in
 14027  	out = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out
 14028  	XinflateReset(tls, strm)
 14029  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = in
 14030  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_out = out
 14031  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 14032  	return Z_OK
 14033  }
 14034  
 14035  //
 14036  //    Returns true if inflate is currently at the end of a block generated by
 14037  //    Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
 14038  //    implementation to provide an additional safety check. PPP uses
 14039  //    Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
 14040  //    block. When decompressing, PPP checks that at the end of input packet,
 14041  //    inflate is waiting for these length bytes.
 14042  //
 14043  func XinflateSyncPoint(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1451:13: */
 14044  	var state uintptr
 14045  
 14046  	if inflateStateCheck(tls, strm) != 0 {
 14047  		return -2
 14048  	}
 14049  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 14050  	return libc.Bool32((*Inflate_state)(unsafe.Pointer(state)).Fmode == STORED && (*Inflate_state)(unsafe.Pointer(state)).Fbits == uint32(0))
 14051  }
 14052  
 14053  func XinflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* inflate.c:1461:13: */
 14054  	var state uintptr
 14055  	var copy uintptr
 14056  	var window uintptr
 14057  	var wsize uint32
 14058  
 14059  	// check input
 14060  	if inflateStateCheck(tls, source) != 0 || dest == uintptr(Z_NULL) {
 14061  		return -2
 14062  	}
 14063  	state = (*Z_stream)(unsafe.Pointer(source)).Fstate
 14064  
 14065  	// allocate space
 14066  	copy = (*struct {
 14067  		f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
 14068  	})(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{})))
 14069  	if copy == uintptr(Z_NULL) {
 14070  		return -4
 14071  	}
 14072  	window = uintptr(Z_NULL)
 14073  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) {
 14074  		window = (*struct {
 14075  			f func(*libc.TLS, Voidpf, UInt, UInt) Voidpf
 14076  		})(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))))
 14077  		if window == uintptr(Z_NULL) {
 14078  			(*struct {
 14079  				f func(*libc.TLS, Voidpf, Voidpf)
 14080  			})(unsafe.Pointer(&struct{ uintptr }{(*Z_stream)(unsafe.Pointer(source)).Fzfree})).f(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, copy)
 14081  			return -4
 14082  		}
 14083  	}
 14084  
 14085  	// copy state
 14086  	libc.Xmemcpy(tls, dest, source, uint32(unsafe.Sizeof(Z_stream{})))
 14087  	libc.Xmemcpy(tls, copy, state, uint32(unsafe.Sizeof(Inflate_state{})))
 14088  	(*Inflate_state)(unsafe.Pointer(copy)).Fstrm = dest
 14089  	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 {
 14090  		(*Inflate_state)(unsafe.Pointer(copy)).Flencode = copy + 1332 + uintptr(int32(((*Inflate_state)(unsafe.Pointer(state)).Flencode-(state+1332))/4))*4
 14091  		(*Inflate_state)(unsafe.Pointer(copy)).Fdistcode = copy + 1332 + uintptr(int32(((*Inflate_state)(unsafe.Pointer(state)).Fdistcode-(state+1332))/4))*4
 14092  	}
 14093  	(*Inflate_state)(unsafe.Pointer(copy)).Fnext = copy + 1332 + uintptr(int32(((*Inflate_state)(unsafe.Pointer(state)).Fnext-(state+1332))/4))*4
 14094  	if window != uintptr(Z_NULL) {
 14095  		wsize = uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits
 14096  		libc.Xmemcpy(tls, window, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, wsize)
 14097  	}
 14098  	(*Inflate_state)(unsafe.Pointer(copy)).Fwindow = window
 14099  	(*Z_stream)(unsafe.Pointer(dest)).Fstate = copy
 14100  	return Z_OK
 14101  }
 14102  
 14103  func XinflateUndermine(tls *libc.TLS, strm Z_streamp, subvert int32) int32 { /* inflate.c:1508:13: */
 14104  	var state uintptr
 14105  
 14106  	if inflateStateCheck(tls, strm) != 0 {
 14107  		return -2
 14108  	}
 14109  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 14110  	_ = subvert
 14111  	(*Inflate_state)(unsafe.Pointer(state)).Fsane = 1
 14112  	return -3
 14113  }
 14114  
 14115  func XinflateValidate(tls *libc.TLS, strm Z_streamp, check int32) int32 { /* inflate.c:1526:13: */
 14116  	var state uintptr
 14117  
 14118  	if inflateStateCheck(tls, strm) != 0 {
 14119  		return -2
 14120  	}
 14121  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 14122  	if check != 0 {
 14123  		*(*int32)(unsafe.Pointer(state + 12)) |= 4
 14124  	} else {
 14125  		*(*int32)(unsafe.Pointer(state + 12)) &= libc.CplInt32(4)
 14126  	}
 14127  	return Z_OK
 14128  }
 14129  
 14130  func XinflateMark(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1541:14: */
 14131  	var state uintptr
 14132  
 14133  	if inflateStateCheck(tls, strm) != 0 {
 14134  		return -(int32(1) << 16)
 14135  	}
 14136  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 14137  	return int32(uint32(int32(uint32(int32((*Inflate_state)(unsafe.Pointer(state)).Fback))<<16)) + func() uint32 {
 14138  		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY {
 14139  			return uint32((*Inflate_state)(unsafe.Pointer(state)).Flength)
 14140  		}
 14141  		return func() uint32 {
 14142  			if (*Inflate_state)(unsafe.Pointer(state)).Fmode == MATCH {
 14143  				return uint32((*Inflate_state)(unsafe.Pointer(state)).Fwas - (*Inflate_state)(unsafe.Pointer(state)).Flength)
 14144  			}
 14145  			return uint32(0)
 14146  		}()
 14147  	}())
 14148  }
 14149  
 14150  func XinflateCodesUsed(tls *libc.TLS, strm Z_streamp) uint32 { /* inflate.c:1554:23: */
 14151  	var state uintptr
 14152  	if inflateStateCheck(tls, strm) != 0 {
 14153  		return libc.Uint32(libc.Uint32FromInt32(-1))
 14154  	}
 14155  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 14156  	return uint32(int32(((*Inflate_state)(unsafe.Pointer(state)).Fnext - (state + 1332)) / 4))
 14157  }
 14158  
 14159  var Xinflate_copyright = *(*[48]int8)(unsafe.Pointer(ts + 828)) /* inftrees.c:11:12 */
 14160  
 14161  //
 14162  //   If you use the zlib library in a product, an acknowledgment is welcome
 14163  //   in the documentation of your product. If for some reason you cannot
 14164  //   include such an acknowledgment, I would appreciate that you keep this
 14165  //   copyright string in the executable of your product.
 14166  //
 14167  
 14168  //
 14169  //    Build a set of tables to decode the provided canonical Huffman code.
 14170  //    The code lengths are lens[0..codes-1].  The result starts at *table,
 14171  //    whose indices are 0..2^bits-1.  work is a writable array of at least
 14172  //    lens shorts, which is used as a work area.  type is the type of code
 14173  //    to be generated, CODES, LENS, or DISTS.  On return, zero is success,
 14174  //    -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
 14175  //    on return points to the next available entry's address.  bits is the
 14176  //    requested root table index bits, and on return it is the actual root
 14177  //    table index bits.  It will differ if the request is greater than the
 14178  //    longest code or if it is less than the shortest code.
 14179  //
 14180  func Xinflate_table(tls *libc.TLS, type1 Codetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) int32 { /* inftrees.c:32:19: */
 14181  	bp := tls.Alloc(64)
 14182  	defer tls.Free(64)
 14183  
 14184  	var len uint32 // a code's length in bits
 14185  	var sym uint32 // index of code symbols
 14186  	var min uint32
 14187  	var max uint32    // minimum and maximum code lengths
 14188  	var root uint32   // number of index bits for root table
 14189  	var curr uint32   // number of index bits for current table
 14190  	var drop uint32   // code bits to drop for sub-table
 14191  	var left int32    // number of prefix codes available
 14192  	var used uint32   // code entries in table used
 14193  	var huff uint32   // Huffman code
 14194  	var incr uint32   // for incrementing code, index
 14195  	var fill uint32   // index for replicating entries
 14196  	var low uint32    // low bits for current root entry
 14197  	var mask uint32   // mask for low root bits
 14198  	var here Code     // table entry for duplication
 14199  	var next uintptr  // next available space in table
 14200  	var base uintptr  // base value table to use
 14201  	var extra uintptr // extra bits table to use
 14202  	var match uint32  // use base and extra for symbol >= match
 14203  	// var count [16]uint16 at bp, 32
 14204  	// number of codes of each length
 14205  	// var offs [16]uint16 at bp+32, 32
 14206  
 14207  	//
 14208  	//        Process a set of code lengths to create a canonical Huffman code.  The
 14209  	//        code lengths are lens[0..codes-1].  Each length corresponds to the
 14210  	//        symbols 0..codes-1.  The Huffman code is generated by first sorting the
 14211  	//        symbols by length from short to long, and retaining the symbol order
 14212  	//        for codes with equal lengths.  Then the code starts with all zero bits
 14213  	//        for the first code of the shortest length, and the codes are integer
 14214  	//        increments for the same length, and zeros are appended as the length
 14215  	//        increases.  For the deflate format, these bits are stored backwards
 14216  	//        from their more natural integer increment ordering, and so when the
 14217  	//        decoding tables are built in the large loop below, the integer codes
 14218  	//        are incremented backwards.
 14219  	//
 14220  	//        This routine assumes, but does not check, that all of the entries in
 14221  	//        lens[] are in the range 0..MAXBITS.  The caller must assure this.
 14222  	//        1..MAXBITS is interpreted as that code length.  zero means that that
 14223  	//        symbol does not occur in this code.
 14224  	//
 14225  	//        The codes are sorted by computing a count of codes for each length,
 14226  	//        creating from that a table of starting indices for each length in the
 14227  	//        sorted table, and then entering the symbols in order in the sorted
 14228  	//        table.  The sorted table is work[], with that space being provided by
 14229  	//        the caller.
 14230  	//
 14231  	//        The length counts are used for other purposes as well, i.e. finding
 14232  	//        the minimum and maximum length codes, determining if there are any
 14233  	//        codes at all, checking for a valid set of lengths, and looking ahead
 14234  	//        at length counts to determine sub-table sizes when building the
 14235  	//        decoding tables.
 14236  	//
 14237  
 14238  	// accumulate lengths for codes (assumes lens[] all in 0..MAXBITS)
 14239  	for len = uint32(0); len <= uint32(MAXBITS); len++ {
 14240  		*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)) = uint16(0)
 14241  	}
 14242  	for sym = uint32(0); sym < codes; sym++ {
 14243  		*(*uint16)(unsafe.Pointer(bp + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2))++
 14244  	}
 14245  
 14246  	// bound code lengths, force root to be within code lengths
 14247  	root = *(*uint32)(unsafe.Pointer(bits))
 14248  	for max = uint32(MAXBITS); max >= uint32(1); max-- {
 14249  		if int32(*(*uint16)(unsafe.Pointer(bp + uintptr(max)*2))) != 0 {
 14250  			break
 14251  		}
 14252  	}
 14253  	if root > max {
 14254  		root = max
 14255  	}
 14256  	if max == uint32(0) { // no symbols to code at all
 14257  		here.Fop = uint8(64) // invalid code marker
 14258  		here.Fbits = uint8(1)
 14259  		here.Fval = uint16(0)
 14260  		*(*Code)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(table)), 4))) = here // make a table to force an error
 14261  		*(*Code)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(table)), 4))) = here
 14262  		*(*uint32)(unsafe.Pointer(bits)) = uint32(1)
 14263  		return 0 // no symbols, but wait for decoding to report error
 14264  	}
 14265  	for min = uint32(1); min < max; min++ {
 14266  		if int32(*(*uint16)(unsafe.Pointer(bp + uintptr(min)*2))) != 0 {
 14267  			break
 14268  		}
 14269  	}
 14270  	if root < min {
 14271  		root = min
 14272  	}
 14273  
 14274  	// check for an over-subscribed or incomplete set of lengths
 14275  	left = 1
 14276  	for len = uint32(1); len <= uint32(MAXBITS); len++ {
 14277  		left <<= 1
 14278  		left = left - int32(*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)))
 14279  		if left < 0 {
 14280  			return -1
 14281  		} // over-subscribed
 14282  	}
 14283  	if left > 0 && (type1 == CODES || max != uint32(1)) {
 14284  		return -1
 14285  	} // incomplete set
 14286  
 14287  	// generate offsets into symbol table for each length for sorting
 14288  	*(*uint16)(unsafe.Pointer(bp + 32 + 1*2)) = uint16(0)
 14289  	for len = uint32(1); len < uint32(MAXBITS); len++ {
 14290  		*(*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))))
 14291  	}
 14292  
 14293  	// sort symbols by length, by symbol order within each length
 14294  	for sym = uint32(0); sym < codes; sym++ {
 14295  		if int32(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 {
 14296  			*(*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)
 14297  		}
 14298  	}
 14299  
 14300  	//
 14301  	//        Create and fill in decoding tables.  In this loop, the table being
 14302  	//        filled is at next and has curr index bits.  The code being used is huff
 14303  	//        with length len.  That code is converted to an index by dropping drop
 14304  	//        bits off of the bottom.  For codes where len is less than drop + curr,
 14305  	//        those top drop + curr - len bits are incremented through all values to
 14306  	//        fill the table with replicated entries.
 14307  	//
 14308  	//        root is the number of index bits for the root table.  When len exceeds
 14309  	//        root, sub-tables are created pointed to by the root entry with an index
 14310  	//        of the low root bits of huff.  This is saved in low to check for when a
 14311  	//        new sub-table should be started.  drop is zero when the root table is
 14312  	//        being filled, and drop is root when sub-tables are being filled.
 14313  	//
 14314  	//        When a new sub-table is needed, it is necessary to look ahead in the
 14315  	//        code lengths to determine what size sub-table is needed.  The length
 14316  	//        counts are used for this, and so count[] is decremented as codes are
 14317  	//        entered in the tables.
 14318  	//
 14319  	//        used keeps track of how many table entries have been allocated from the
 14320  	//        provided *table space.  It is checked for LENS and DIST tables against
 14321  	//        the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
 14322  	//        the initial root table size constants.  See the comments in inftrees.h
 14323  	//        for more information.
 14324  	//
 14325  	//        sym increments through all symbols, and the loop terminates when
 14326  	//        all codes of length max, i.e. all codes, have been processed.  This
 14327  	//        routine permits incomplete codes, so another loop after this one fills
 14328  	//        in the rest of the decoding tables with invalid code markers.
 14329  	//
 14330  
 14331  	// set up for code type
 14332  	switch type1 {
 14333  	case CODES:
 14334  		base = libc.AssignUintptr(&extra, work) // dummy value--not used
 14335  		match = uint32(20)
 14336  		break
 14337  	case LENS:
 14338  		base = uintptr(unsafe.Pointer(&lbase))
 14339  		extra = uintptr(unsafe.Pointer(&lext))
 14340  		match = uint32(257)
 14341  		break
 14342  	default: // DISTS
 14343  		base = uintptr(unsafe.Pointer(&dbase))
 14344  		extra = uintptr(unsafe.Pointer(&dext))
 14345  		match = uint32(0)
 14346  	}
 14347  
 14348  	// initialize state for loop
 14349  	huff = uint32(0)                            // starting code
 14350  	sym = uint32(0)                             // starting code symbol
 14351  	len = min                                   // starting code length
 14352  	next = *(*uintptr)(unsafe.Pointer(table))   // current table to fill in
 14353  	curr = root                                 // current table index bits
 14354  	drop = uint32(0)                            // current bits to drop from code for index
 14355  	low = libc.Uint32(libc.Uint32FromInt32(-1)) // trigger new sub-table when len > root
 14356  	used = uint32(1) << root                    // use root table entries
 14357  	mask = used - uint32(1)                     // mask for comparing low
 14358  
 14359  	// check available table space
 14360  	if type1 == LENS && used > uint32(ENOUGH_LENS) || type1 == DISTS && used > uint32(ENOUGH_DISTS) {
 14361  		return 1
 14362  	}
 14363  
 14364  	// process all codes and make table entries
 14365  	for {
 14366  		// create table entry
 14367  		here.Fbits = uint8(len - drop)
 14368  		if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))+1 < match {
 14369  			here.Fop = uint8(0)
 14370  			here.Fval = *(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))
 14371  		} else if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) >= match {
 14372  			here.Fop = uint8(*(*uint16)(unsafe.Pointer(extra + uintptr(uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match)*2)))
 14373  			here.Fval = *(*uint16)(unsafe.Pointer(base + uintptr(uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match)*2))
 14374  		} else {
 14375  			here.Fop = uint8(32 + 64) // end of block
 14376  			here.Fval = uint16(0)
 14377  		}
 14378  
 14379  		// replicate for those indices with low len bits equal to huff
 14380  		incr = uint32(1) << (len - drop)
 14381  		fill = uint32(1) << curr
 14382  		min = fill // save offset to next table
 14383  		for ok := true; ok; ok = fill != uint32(0) {
 14384  			fill = fill - incr
 14385  			*(*Code)(unsafe.Pointer(next + uintptr(huff>>drop+fill)*4)) = here
 14386  		}
 14387  
 14388  		// backwards increment the len-bit code huff
 14389  		incr = uint32(1) << (len - uint32(1))
 14390  		for huff&incr != 0 {
 14391  			incr >>= 1
 14392  		}
 14393  		if incr != uint32(0) {
 14394  			huff = huff & (incr - uint32(1))
 14395  			huff = huff + incr
 14396  		} else {
 14397  			huff = uint32(0)
 14398  		}
 14399  
 14400  		// go to next symbol, update count, len
 14401  		sym++
 14402  		if int32(libc.PreDecUint16(&*(*uint16)(unsafe.Pointer(bp + uintptr(len)*2)), 1)) == 0 {
 14403  			if len == max {
 14404  				break
 14405  			}
 14406  			len = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2)))
 14407  		}
 14408  
 14409  		// create new sub-table if needed
 14410  		if len > root && huff&mask != low {
 14411  			// if first time, transition to sub-tables
 14412  			if drop == uint32(0) {
 14413  				drop = root
 14414  			}
 14415  
 14416  			// increment past last table
 14417  			next += 4 * uintptr(min) // here min is 1 << curr
 14418  
 14419  			// determine length of next table
 14420  			curr = len - drop
 14421  			left = int32(1) << curr
 14422  			for curr+drop < max {
 14423  				left = left - int32(*(*uint16)(unsafe.Pointer(bp + uintptr(curr+drop)*2)))
 14424  				if left <= 0 {
 14425  					break
 14426  				}
 14427  				curr++
 14428  				left <<= 1
 14429  			}
 14430  
 14431  			// check for enough space
 14432  			used = used + uint32(1)<<curr
 14433  			if type1 == LENS && used > uint32(ENOUGH_LENS) || type1 == DISTS && used > uint32(ENOUGH_DISTS) {
 14434  				return 1
 14435  			}
 14436  
 14437  			// point entry in root table to sub-table
 14438  			low = huff & mask
 14439  			(*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fop = uint8(curr)
 14440  			(*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fbits = uint8(root)
 14441  			(*Code)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4)).Fval = uint16((int32(next) - int32(*(*uintptr)(unsafe.Pointer(table)))) / 4)
 14442  		}
 14443  	}
 14444  
 14445  	// fill in remaining table entry if code is incomplete (guaranteed to have
 14446  	//        at most one remaining entry, since if the code is incomplete, the
 14447  	//        maximum code length that was allowed to get this far is one bit)
 14448  	if huff != uint32(0) {
 14449  		here.Fop = uint8(64) // invalid code marker
 14450  		here.Fbits = uint8(len - drop)
 14451  		here.Fval = uint16(0)
 14452  		*(*Code)(unsafe.Pointer(next + uintptr(huff)*4)) = here
 14453  	}
 14454  
 14455  	// set return parameters
 14456  	*(*uintptr)(unsafe.Pointer(table)) += uintptr(used) * 4
 14457  	*(*uint32)(unsafe.Pointer(bits)) = root
 14458  	return 0
 14459  }
 14460  
 14461  var lbase = [31]uint16{ // Length codes 257..285 base
 14462  	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),
 14463  			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 */
 14464  var lext = [31]uint16{ // Length codes 257..285 extra
 14465  	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),
 14466  			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 */
 14467  var dbase = [32]uint16{ // Distance codes 0..29 base
 14468  	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),
 14469  	uint16(257), uint16(385), uint16(513), uint16(769), uint16(1025), uint16(1537), uint16(2049), uint16(3073), uint16(4097), uint16(6145),
 14470  			uint16(8193), uint16(12289), uint16(16385), uint16(24577), uint16(0), uint16(0)} /* inftrees.c:66:33 */
 14471  var dext = [32]uint16{ // Distance codes 0..29 extra
 14472  	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),
 14473  	uint16(23), uint16(23), uint16(24), uint16(24), uint16(25), uint16(25), uint16(26), uint16(26), uint16(27), uint16(27),
 14474  	uint16(28), uint16(28), uint16(29), uint16(29), uint16(64), uint16(64)} /* inftrees.c:70:33 */
 14475  
 14476  type Static_tree_desc = Static_tree_desc_s /* deflate.h:84:36 */
 14477  
 14478  // ===========================================================================
 14479  // Constants
 14480  
 14481  // Bit length codes must not exceed MAX_BL_BITS bits
 14482  
 14483  // end of block literal code
 14484  
 14485  // repeat previous bit length 3-6 times (2 bits of repeat count)
 14486  
 14487  // repeat a zero length 3-10 times  (3 bits of repeat count)
 14488  
 14489  // repeat a zero length 11-138 times  (7 bits of repeat count)
 14490  
 14491  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 */
 14492  
 14493  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 */
 14494  
 14495  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 */
 14496  
 14497  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 */
 14498  // The lengths of the bit length codes are sent in order of decreasing
 14499  // probability, to avoid transmitting the lengths for unused bit length codes.
 14500  
 14501  // ===========================================================================
 14502  // Local data. These are initialized only once.
 14503  
 14504  // header created automatically with -DGEN_TREES_H
 14505  
 14506  var static_ltree = [288]Ct_data{{Ffc: func() (r struct{ Ffreq Ush }) {
 14507  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12)
 14508  	return r
 14509  }(), Fdl: func() (r struct{ Fdad Ush }) {
 14510  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14511  	return r
 14512  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14513  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(140)
 14514  	return r
 14515  }(), Fdl: func() (r struct{ Fdad Ush }) {
 14516  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14517  	return r
 14518  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14519  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(76)
 14520  	return r
 14521  }(), Fdl: func() (r struct{ Fdad Ush }) {
 14522  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14523  	return r
 14524  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14525  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(204)
 14526  	return r
 14527  }(), Fdl: func() (r struct{ Fdad Ush }) {
 14528  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14529  	return r
 14530  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14531  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(44)
 14532  	return r
 14533  }(), Fdl: func() (r struct{ Fdad Ush }) {
 14534  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14535  	return r
 14536  }()},
 14537  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14538  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(172)
 14539  		return r
 14540  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14541  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14542  		return r
 14543  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14544  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(108)
 14545  		return r
 14546  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14547  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14548  		return r
 14549  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14550  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(236)
 14551  		return r
 14552  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14553  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14554  		return r
 14555  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14556  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28)
 14557  		return r
 14558  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14559  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14560  		return r
 14561  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14562  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(156)
 14563  		return r
 14564  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14565  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14566  		return r
 14567  	}()},
 14568  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14569  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(92)
 14570  		return r
 14571  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14572  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14573  		return r
 14574  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14575  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(220)
 14576  		return r
 14577  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14578  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14579  		return r
 14580  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14581  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(60)
 14582  		return r
 14583  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14584  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14585  		return r
 14586  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14587  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(188)
 14588  		return r
 14589  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14590  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14591  		return r
 14592  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14593  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(124)
 14594  		return r
 14595  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14596  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14597  		return r
 14598  	}()},
 14599  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14600  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(252)
 14601  		return r
 14602  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14603  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14604  		return r
 14605  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14606  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2)
 14607  		return r
 14608  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14609  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14610  		return r
 14611  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14612  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(130)
 14613  		return r
 14614  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14615  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14616  		return r
 14617  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14618  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(66)
 14619  		return r
 14620  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14621  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14622  		return r
 14623  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14624  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(194)
 14625  		return r
 14626  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14627  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14628  		return r
 14629  	}()},
 14630  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14631  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(34)
 14632  		return r
 14633  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14634  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14635  		return r
 14636  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14637  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(162)
 14638  		return r
 14639  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14640  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14641  		return r
 14642  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14643  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(98)
 14644  		return r
 14645  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14646  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14647  		return r
 14648  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14649  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(226)
 14650  		return r
 14651  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14652  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14653  		return r
 14654  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14655  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18)
 14656  		return r
 14657  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14658  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14659  		return r
 14660  	}()},
 14661  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14662  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(146)
 14663  		return r
 14664  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14665  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14666  		return r
 14667  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14668  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(82)
 14669  		return r
 14670  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14671  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14672  		return r
 14673  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14674  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(210)
 14675  		return r
 14676  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14677  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14678  		return r
 14679  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14680  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(50)
 14681  		return r
 14682  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14683  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14684  		return r
 14685  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14686  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(178)
 14687  		return r
 14688  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14689  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14690  		return r
 14691  	}()},
 14692  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14693  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(114)
 14694  		return r
 14695  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14696  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14697  		return r
 14698  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14699  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(242)
 14700  		return r
 14701  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14702  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14703  		return r
 14704  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14705  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10)
 14706  		return r
 14707  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14708  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14709  		return r
 14710  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14711  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(138)
 14712  		return r
 14713  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14714  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14715  		return r
 14716  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14717  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(74)
 14718  		return r
 14719  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14720  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14721  		return r
 14722  	}()},
 14723  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14724  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(202)
 14725  		return r
 14726  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14727  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14728  		return r
 14729  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14730  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(42)
 14731  		return r
 14732  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14733  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14734  		return r
 14735  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14736  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(170)
 14737  		return r
 14738  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14739  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14740  		return r
 14741  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14742  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(106)
 14743  		return r
 14744  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14745  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14746  		return r
 14747  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14748  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(234)
 14749  		return r
 14750  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14751  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14752  		return r
 14753  	}()},
 14754  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14755  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26)
 14756  		return r
 14757  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14758  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14759  		return r
 14760  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14761  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(154)
 14762  		return r
 14763  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14764  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14765  		return r
 14766  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14767  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(90)
 14768  		return r
 14769  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14770  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14771  		return r
 14772  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14773  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(218)
 14774  		return r
 14775  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14776  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14777  		return r
 14778  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14779  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(58)
 14780  		return r
 14781  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14782  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14783  		return r
 14784  	}()},
 14785  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14786  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(186)
 14787  		return r
 14788  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14789  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14790  		return r
 14791  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14792  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(122)
 14793  		return r
 14794  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14795  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14796  		return r
 14797  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14798  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(250)
 14799  		return r
 14800  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14801  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14802  		return r
 14803  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14804  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6)
 14805  		return r
 14806  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14807  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14808  		return r
 14809  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14810  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(134)
 14811  		return r
 14812  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14813  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14814  		return r
 14815  	}()},
 14816  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14817  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(70)
 14818  		return r
 14819  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14820  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14821  		return r
 14822  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14823  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(198)
 14824  		return r
 14825  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14826  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14827  		return r
 14828  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14829  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(38)
 14830  		return r
 14831  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14832  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14833  		return r
 14834  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14835  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(166)
 14836  		return r
 14837  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14838  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14839  		return r
 14840  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14841  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(102)
 14842  		return r
 14843  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14844  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14845  		return r
 14846  	}()},
 14847  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14848  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(230)
 14849  		return r
 14850  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14851  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14852  		return r
 14853  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14854  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22)
 14855  		return r
 14856  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14857  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14858  		return r
 14859  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14860  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(150)
 14861  		return r
 14862  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14863  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14864  		return r
 14865  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14866  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(86)
 14867  		return r
 14868  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14869  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14870  		return r
 14871  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14872  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(214)
 14873  		return r
 14874  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14875  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14876  		return r
 14877  	}()},
 14878  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14879  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(54)
 14880  		return r
 14881  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14882  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14883  		return r
 14884  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14885  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(182)
 14886  		return r
 14887  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14888  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14889  		return r
 14890  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14891  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(118)
 14892  		return r
 14893  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14894  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14895  		return r
 14896  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14897  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(246)
 14898  		return r
 14899  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14900  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14901  		return r
 14902  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14903  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14)
 14904  		return r
 14905  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14906  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14907  		return r
 14908  	}()},
 14909  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14910  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(142)
 14911  		return r
 14912  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14913  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14914  		return r
 14915  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14916  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(78)
 14917  		return r
 14918  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14919  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14920  		return r
 14921  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14922  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(206)
 14923  		return r
 14924  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14925  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14926  		return r
 14927  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14928  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(46)
 14929  		return r
 14930  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14931  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14932  		return r
 14933  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14934  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(174)
 14935  		return r
 14936  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14937  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14938  		return r
 14939  	}()},
 14940  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14941  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(110)
 14942  		return r
 14943  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14944  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14945  		return r
 14946  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14947  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(238)
 14948  		return r
 14949  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14950  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14951  		return r
 14952  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14953  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30)
 14954  		return r
 14955  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14956  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14957  		return r
 14958  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14959  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(158)
 14960  		return r
 14961  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14962  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14963  		return r
 14964  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14965  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(94)
 14966  		return r
 14967  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14968  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14969  		return r
 14970  	}()},
 14971  	{Ffc: func() (r struct{ Ffreq Ush }) {
 14972  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(222)
 14973  		return r
 14974  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14975  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14976  		return r
 14977  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14978  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(62)
 14979  		return r
 14980  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14981  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14982  		return r
 14983  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14984  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(190)
 14985  		return r
 14986  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14987  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14988  		return r
 14989  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14990  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(126)
 14991  		return r
 14992  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14993  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 14994  		return r
 14995  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 14996  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(254)
 14997  		return r
 14998  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 14999  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15000  		return r
 15001  	}()},
 15002  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15003  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1)
 15004  		return r
 15005  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15006  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15007  		return r
 15008  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15009  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(129)
 15010  		return r
 15011  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15012  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15013  		return r
 15014  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15015  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(65)
 15016  		return r
 15017  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15018  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15019  		return r
 15020  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15021  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(193)
 15022  		return r
 15023  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15024  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15025  		return r
 15026  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15027  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(33)
 15028  		return r
 15029  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15030  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15031  		return r
 15032  	}()},
 15033  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15034  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(161)
 15035  		return r
 15036  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15037  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15038  		return r
 15039  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15040  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(97)
 15041  		return r
 15042  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15043  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15044  		return r
 15045  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15046  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(225)
 15047  		return r
 15048  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15049  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15050  		return r
 15051  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15052  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17)
 15053  		return r
 15054  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15055  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15056  		return r
 15057  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15058  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(145)
 15059  		return r
 15060  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15061  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15062  		return r
 15063  	}()},
 15064  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15065  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(81)
 15066  		return r
 15067  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15068  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15069  		return r
 15070  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15071  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(209)
 15072  		return r
 15073  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15074  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15075  		return r
 15076  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15077  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(49)
 15078  		return r
 15079  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15080  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15081  		return r
 15082  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15083  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(177)
 15084  		return r
 15085  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15086  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15087  		return r
 15088  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15089  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(113)
 15090  		return r
 15091  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15092  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15093  		return r
 15094  	}()},
 15095  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15096  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(241)
 15097  		return r
 15098  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15099  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15100  		return r
 15101  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15102  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15103  		return r
 15104  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15105  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15106  		return r
 15107  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15108  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(137)
 15109  		return r
 15110  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15111  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15112  		return r
 15113  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15114  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(73)
 15115  		return r
 15116  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15117  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15118  		return r
 15119  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15120  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(201)
 15121  		return r
 15122  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15123  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15124  		return r
 15125  	}()},
 15126  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15127  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(41)
 15128  		return r
 15129  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15130  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15131  		return r
 15132  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15133  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(169)
 15134  		return r
 15135  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15136  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15137  		return r
 15138  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15139  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(105)
 15140  		return r
 15141  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15142  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15143  		return r
 15144  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15145  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(233)
 15146  		return r
 15147  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15148  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15149  		return r
 15150  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15151  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25)
 15152  		return r
 15153  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15154  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15155  		return r
 15156  	}()},
 15157  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15158  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(153)
 15159  		return r
 15160  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15161  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15162  		return r
 15163  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15164  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(89)
 15165  		return r
 15166  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15167  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15168  		return r
 15169  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15170  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(217)
 15171  		return r
 15172  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15173  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15174  		return r
 15175  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15176  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(57)
 15177  		return r
 15178  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15179  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15180  		return r
 15181  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15182  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(185)
 15183  		return r
 15184  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15185  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15186  		return r
 15187  	}()},
 15188  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15189  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(121)
 15190  		return r
 15191  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15192  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15193  		return r
 15194  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15195  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(249)
 15196  		return r
 15197  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15198  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15199  		return r
 15200  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15201  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 15202  		return r
 15203  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15204  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15205  		return r
 15206  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15207  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(133)
 15208  		return r
 15209  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15210  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15211  		return r
 15212  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15213  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(69)
 15214  		return r
 15215  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15216  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15217  		return r
 15218  	}()},
 15219  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15220  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(197)
 15221  		return r
 15222  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15223  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15224  		return r
 15225  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15226  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(37)
 15227  		return r
 15228  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15229  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15230  		return r
 15231  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15232  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(165)
 15233  		return r
 15234  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15235  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15236  		return r
 15237  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15238  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(101)
 15239  		return r
 15240  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15241  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15242  		return r
 15243  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15244  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(229)
 15245  		return r
 15246  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15247  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15248  		return r
 15249  	}()},
 15250  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15251  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21)
 15252  		return r
 15253  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15254  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15255  		return r
 15256  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15257  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(149)
 15258  		return r
 15259  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15260  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15261  		return r
 15262  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15263  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(85)
 15264  		return r
 15265  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15266  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15267  		return r
 15268  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15269  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(213)
 15270  		return r
 15271  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15272  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15273  		return r
 15274  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15275  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(53)
 15276  		return r
 15277  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15278  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15279  		return r
 15280  	}()},
 15281  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15282  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(181)
 15283  		return r
 15284  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15285  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15286  		return r
 15287  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15288  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(117)
 15289  		return r
 15290  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15291  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15292  		return r
 15293  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15294  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(245)
 15295  		return r
 15296  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15297  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15298  		return r
 15299  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15300  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13)
 15301  		return r
 15302  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15303  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15304  		return r
 15305  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15306  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(141)
 15307  		return r
 15308  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15309  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15310  		return r
 15311  	}()},
 15312  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15313  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(77)
 15314  		return r
 15315  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15316  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15317  		return r
 15318  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15319  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(205)
 15320  		return r
 15321  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15322  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15323  		return r
 15324  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15325  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(45)
 15326  		return r
 15327  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15328  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15329  		return r
 15330  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15331  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(173)
 15332  		return r
 15333  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15334  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15335  		return r
 15336  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15337  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(109)
 15338  		return r
 15339  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15340  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15341  		return r
 15342  	}()},
 15343  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15344  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(237)
 15345  		return r
 15346  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15347  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15348  		return r
 15349  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15350  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29)
 15351  		return r
 15352  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15353  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15354  		return r
 15355  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15356  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(157)
 15357  		return r
 15358  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15359  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15360  		return r
 15361  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15362  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(93)
 15363  		return r
 15364  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15365  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15366  		return r
 15367  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15368  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(221)
 15369  		return r
 15370  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15371  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15372  		return r
 15373  	}()},
 15374  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15375  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(61)
 15376  		return r
 15377  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15378  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15379  		return r
 15380  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15381  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(189)
 15382  		return r
 15383  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15384  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15385  		return r
 15386  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15387  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(125)
 15388  		return r
 15389  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15390  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15391  		return r
 15392  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15393  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(253)
 15394  		return r
 15395  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15396  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 15397  		return r
 15398  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15399  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19)
 15400  		return r
 15401  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15402  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15403  		return r
 15404  	}()},
 15405  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15406  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(275)
 15407  		return r
 15408  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15409  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15410  		return r
 15411  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15412  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(147)
 15413  		return r
 15414  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15415  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15416  		return r
 15417  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15418  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(403)
 15419  		return r
 15420  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15421  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15422  		return r
 15423  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15424  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(83)
 15425  		return r
 15426  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15427  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15428  		return r
 15429  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15430  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(339)
 15431  		return r
 15432  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15433  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15434  		return r
 15435  	}()},
 15436  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15437  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(211)
 15438  		return r
 15439  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15440  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15441  		return r
 15442  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15443  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(467)
 15444  		return r
 15445  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15446  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15447  		return r
 15448  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15449  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(51)
 15450  		return r
 15451  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15452  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15453  		return r
 15454  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15455  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(307)
 15456  		return r
 15457  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15458  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15459  		return r
 15460  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15461  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(179)
 15462  		return r
 15463  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15464  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15465  		return r
 15466  	}()},
 15467  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15468  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(435)
 15469  		return r
 15470  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15471  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15472  		return r
 15473  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15474  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(115)
 15475  		return r
 15476  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15477  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15478  		return r
 15479  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15480  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(371)
 15481  		return r
 15482  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15483  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15484  		return r
 15485  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15486  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(243)
 15487  		return r
 15488  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15489  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15490  		return r
 15491  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15492  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(499)
 15493  		return r
 15494  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15495  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15496  		return r
 15497  	}()},
 15498  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15499  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11)
 15500  		return r
 15501  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15502  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15503  		return r
 15504  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15505  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(267)
 15506  		return r
 15507  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15508  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15509  		return r
 15510  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15511  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(139)
 15512  		return r
 15513  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15514  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15515  		return r
 15516  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15517  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(395)
 15518  		return r
 15519  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15520  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15521  		return r
 15522  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15523  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(75)
 15524  		return r
 15525  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15526  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15527  		return r
 15528  	}()},
 15529  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15530  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(331)
 15531  		return r
 15532  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15533  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15534  		return r
 15535  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15536  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(203)
 15537  		return r
 15538  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15539  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15540  		return r
 15541  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15542  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(459)
 15543  		return r
 15544  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15545  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15546  		return r
 15547  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15548  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(43)
 15549  		return r
 15550  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15551  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15552  		return r
 15553  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15554  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(299)
 15555  		return r
 15556  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15557  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15558  		return r
 15559  	}()},
 15560  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15561  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(171)
 15562  		return r
 15563  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15564  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15565  		return r
 15566  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15567  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(427)
 15568  		return r
 15569  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15570  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15571  		return r
 15572  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15573  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(107)
 15574  		return r
 15575  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15576  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15577  		return r
 15578  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15579  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(363)
 15580  		return r
 15581  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15582  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15583  		return r
 15584  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15585  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(235)
 15586  		return r
 15587  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15588  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15589  		return r
 15590  	}()},
 15591  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15592  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(491)
 15593  		return r
 15594  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15595  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15596  		return r
 15597  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15598  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27)
 15599  		return r
 15600  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15601  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15602  		return r
 15603  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15604  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(283)
 15605  		return r
 15606  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15607  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15608  		return r
 15609  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15610  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(155)
 15611  		return r
 15612  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15613  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15614  		return r
 15615  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15616  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(411)
 15617  		return r
 15618  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15619  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15620  		return r
 15621  	}()},
 15622  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15623  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(91)
 15624  		return r
 15625  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15626  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15627  		return r
 15628  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15629  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(347)
 15630  		return r
 15631  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15632  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15633  		return r
 15634  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15635  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(219)
 15636  		return r
 15637  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15638  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15639  		return r
 15640  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15641  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(475)
 15642  		return r
 15643  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15644  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15645  		return r
 15646  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15647  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(59)
 15648  		return r
 15649  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15650  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15651  		return r
 15652  	}()},
 15653  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15654  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(315)
 15655  		return r
 15656  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15657  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15658  		return r
 15659  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15660  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(187)
 15661  		return r
 15662  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15663  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15664  		return r
 15665  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15666  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(443)
 15667  		return r
 15668  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15669  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15670  		return r
 15671  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15672  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(123)
 15673  		return r
 15674  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15675  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15676  		return r
 15677  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15678  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(379)
 15679  		return r
 15680  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15681  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15682  		return r
 15683  	}()},
 15684  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15685  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(251)
 15686  		return r
 15687  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15688  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15689  		return r
 15690  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15691  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(507)
 15692  		return r
 15693  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15694  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15695  		return r
 15696  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15697  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 15698  		return r
 15699  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15700  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15701  		return r
 15702  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15703  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(263)
 15704  		return r
 15705  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15706  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15707  		return r
 15708  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15709  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(135)
 15710  		return r
 15711  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15712  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15713  		return r
 15714  	}()},
 15715  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15716  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(391)
 15717  		return r
 15718  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15719  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15720  		return r
 15721  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15722  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(71)
 15723  		return r
 15724  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15725  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15726  		return r
 15727  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15728  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(327)
 15729  		return r
 15730  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15731  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15732  		return r
 15733  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15734  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(199)
 15735  		return r
 15736  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15737  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15738  		return r
 15739  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15740  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(455)
 15741  		return r
 15742  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15743  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15744  		return r
 15745  	}()},
 15746  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15747  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(39)
 15748  		return r
 15749  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15750  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15751  		return r
 15752  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15753  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(295)
 15754  		return r
 15755  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15756  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15757  		return r
 15758  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15759  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(167)
 15760  		return r
 15761  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15762  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15763  		return r
 15764  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15765  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(423)
 15766  		return r
 15767  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15768  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15769  		return r
 15770  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15771  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(103)
 15772  		return r
 15773  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15774  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15775  		return r
 15776  	}()},
 15777  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15778  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(359)
 15779  		return r
 15780  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15781  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15782  		return r
 15783  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15784  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(231)
 15785  		return r
 15786  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15787  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15788  		return r
 15789  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15790  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(487)
 15791  		return r
 15792  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15793  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15794  		return r
 15795  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15796  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23)
 15797  		return r
 15798  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15799  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15800  		return r
 15801  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15802  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(279)
 15803  		return r
 15804  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15805  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15806  		return r
 15807  	}()},
 15808  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15809  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(151)
 15810  		return r
 15811  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15812  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15813  		return r
 15814  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15815  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(407)
 15816  		return r
 15817  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15818  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15819  		return r
 15820  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15821  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(87)
 15822  		return r
 15823  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15824  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15825  		return r
 15826  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15827  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(343)
 15828  		return r
 15829  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15830  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15831  		return r
 15832  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15833  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(215)
 15834  		return r
 15835  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15836  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15837  		return r
 15838  	}()},
 15839  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15840  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(471)
 15841  		return r
 15842  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15843  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15844  		return r
 15845  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15846  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(55)
 15847  		return r
 15848  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15849  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15850  		return r
 15851  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15852  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(311)
 15853  		return r
 15854  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15855  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15856  		return r
 15857  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15858  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(183)
 15859  		return r
 15860  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15861  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15862  		return r
 15863  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15864  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(439)
 15865  		return r
 15866  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15867  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15868  		return r
 15869  	}()},
 15870  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15871  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(119)
 15872  		return r
 15873  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15874  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15875  		return r
 15876  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15877  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(375)
 15878  		return r
 15879  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15880  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15881  		return r
 15882  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15883  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(247)
 15884  		return r
 15885  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15886  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15887  		return r
 15888  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15889  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(503)
 15890  		return r
 15891  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15892  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15893  		return r
 15894  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15895  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(15)
 15896  		return r
 15897  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15898  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15899  		return r
 15900  	}()},
 15901  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15902  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(271)
 15903  		return r
 15904  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15905  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15906  		return r
 15907  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15908  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(143)
 15909  		return r
 15910  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15911  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15912  		return r
 15913  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15914  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(399)
 15915  		return r
 15916  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15917  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15918  		return r
 15919  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15920  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(79)
 15921  		return r
 15922  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15923  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15924  		return r
 15925  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15926  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(335)
 15927  		return r
 15928  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15929  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15930  		return r
 15931  	}()},
 15932  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15933  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(207)
 15934  		return r
 15935  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15936  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15937  		return r
 15938  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15939  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(463)
 15940  		return r
 15941  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15942  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15943  		return r
 15944  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15945  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(47)
 15946  		return r
 15947  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15948  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15949  		return r
 15950  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15951  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(303)
 15952  		return r
 15953  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15954  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15955  		return r
 15956  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15957  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(175)
 15958  		return r
 15959  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15960  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15961  		return r
 15962  	}()},
 15963  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15964  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(431)
 15965  		return r
 15966  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15967  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15968  		return r
 15969  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15970  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(111)
 15971  		return r
 15972  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15973  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15974  		return r
 15975  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15976  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(367)
 15977  		return r
 15978  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15979  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15980  		return r
 15981  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15982  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(239)
 15983  		return r
 15984  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15985  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15986  		return r
 15987  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 15988  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(495)
 15989  		return r
 15990  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15991  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15992  		return r
 15993  	}()},
 15994  	{Ffc: func() (r struct{ Ffreq Ush }) {
 15995  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(31)
 15996  		return r
 15997  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 15998  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 15999  		return r
 16000  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16001  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(287)
 16002  		return r
 16003  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16004  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16005  		return r
 16006  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16007  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(159)
 16008  		return r
 16009  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16010  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16011  		return r
 16012  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16013  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(415)
 16014  		return r
 16015  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16016  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16017  		return r
 16018  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16019  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(95)
 16020  		return r
 16021  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16022  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16023  		return r
 16024  	}()},
 16025  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16026  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(351)
 16027  		return r
 16028  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16029  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16030  		return r
 16031  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16032  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(223)
 16033  		return r
 16034  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16035  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16036  		return r
 16037  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16038  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(479)
 16039  		return r
 16040  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16041  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16042  		return r
 16043  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16044  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(63)
 16045  		return r
 16046  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16047  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16048  		return r
 16049  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16050  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(319)
 16051  		return r
 16052  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16053  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16054  		return r
 16055  	}()},
 16056  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16057  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(191)
 16058  		return r
 16059  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16060  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16061  		return r
 16062  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16063  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(447)
 16064  		return r
 16065  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16066  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16067  		return r
 16068  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16069  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(127)
 16070  		return r
 16071  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16072  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16073  		return r
 16074  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16075  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(383)
 16076  		return r
 16077  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16078  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16079  		return r
 16080  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16081  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(255)
 16082  		return r
 16083  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16084  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16085  		return r
 16086  	}()},
 16087  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16088  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(511)
 16089  		return r
 16090  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16091  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16092  		return r
 16093  	}()}, {Fdl: func() (r struct{ Fdad Ush }) {
 16094  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16095  		return r
 16096  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16097  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(64)
 16098  		return r
 16099  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16100  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16101  		return r
 16102  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16103  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(32)
 16104  		return r
 16105  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16106  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16107  		return r
 16108  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16109  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(96)
 16110  		return r
 16111  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16112  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16113  		return r
 16114  	}()},
 16115  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16116  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16)
 16117  		return r
 16118  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16119  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16120  		return r
 16121  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16122  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(80)
 16123  		return r
 16124  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16125  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16126  		return r
 16127  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16128  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(48)
 16129  		return r
 16130  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16131  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16132  		return r
 16133  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16134  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(112)
 16135  		return r
 16136  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16137  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16138  		return r
 16139  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16140  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16141  		return r
 16142  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16143  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16144  		return r
 16145  	}()},
 16146  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16147  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(72)
 16148  		return r
 16149  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16150  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16151  		return r
 16152  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16153  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(40)
 16154  		return r
 16155  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16156  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16157  		return r
 16158  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16159  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(104)
 16160  		return r
 16161  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16162  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16163  		return r
 16164  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16165  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24)
 16166  		return r
 16167  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16168  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16169  		return r
 16170  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16171  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(88)
 16172  		return r
 16173  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16174  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16175  		return r
 16176  	}()},
 16177  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16178  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(56)
 16179  		return r
 16180  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16181  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16182  		return r
 16183  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16184  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(120)
 16185  		return r
 16186  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16187  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16188  		return r
 16189  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16190  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4)
 16191  		return r
 16192  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16193  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16194  		return r
 16195  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16196  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(68)
 16197  		return r
 16198  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16199  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16200  		return r
 16201  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16202  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(36)
 16203  		return r
 16204  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16205  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16206  		return r
 16207  	}()},
 16208  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16209  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(100)
 16210  		return r
 16211  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16212  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16213  		return r
 16214  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16215  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20)
 16216  		return r
 16217  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16218  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16219  		return r
 16220  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16221  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(84)
 16222  		return r
 16223  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16224  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16225  		return r
 16226  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16227  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(52)
 16228  		return r
 16229  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16230  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16231  		return r
 16232  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16233  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(116)
 16234  		return r
 16235  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16236  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16237  		return r
 16238  	}()},
 16239  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16240  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3)
 16241  		return r
 16242  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16243  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16244  		return r
 16245  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16246  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(131)
 16247  		return r
 16248  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16249  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16250  		return r
 16251  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16252  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(67)
 16253  		return r
 16254  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16255  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16256  		return r
 16257  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16258  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(195)
 16259  		return r
 16260  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16261  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16262  		return r
 16263  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16264  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(35)
 16265  		return r
 16266  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16267  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16268  		return r
 16269  	}()},
 16270  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16271  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(163)
 16272  		return r
 16273  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16274  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16275  		return r
 16276  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16277  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(99)
 16278  		return r
 16279  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16280  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16281  		return r
 16282  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16283  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(227)
 16284  		return r
 16285  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16286  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16287  		return r
 16288  	}()}} /* trees.h:3:21 */
 16289  
 16290  var static_dtree = [30]Ct_data{{Fdl: func() (r struct{ Fdad Ush }) {
 16291  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16292  	return r
 16293  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16294  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(16)
 16295  	return r
 16296  }(), Fdl: func() (r struct{ Fdad Ush }) {
 16297  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16298  	return r
 16299  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16300  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(8)
 16301  	return r
 16302  }(), Fdl: func() (r struct{ Fdad Ush }) {
 16303  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16304  	return r
 16305  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16306  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(24)
 16307  	return r
 16308  }(), Fdl: func() (r struct{ Fdad Ush }) {
 16309  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16310  	return r
 16311  }()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16312  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(4)
 16313  	return r
 16314  }(), Fdl: func() (r struct{ Fdad Ush }) {
 16315  	*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16316  	return r
 16317  }()},
 16318  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16319  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(20)
 16320  		return r
 16321  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16322  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16323  		return r
 16324  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16325  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(12)
 16326  		return r
 16327  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16328  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16329  		return r
 16330  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16331  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(28)
 16332  		return r
 16333  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16334  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16335  		return r
 16336  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16337  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(2)
 16338  		return r
 16339  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16340  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16341  		return r
 16342  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16343  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(18)
 16344  		return r
 16345  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16346  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16347  		return r
 16348  	}()},
 16349  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16350  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(10)
 16351  		return r
 16352  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16353  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16354  		return r
 16355  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16356  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(26)
 16357  		return r
 16358  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16359  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16360  		return r
 16361  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16362  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(6)
 16363  		return r
 16364  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16365  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16366  		return r
 16367  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16368  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(22)
 16369  		return r
 16370  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16371  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16372  		return r
 16373  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16374  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(14)
 16375  		return r
 16376  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16377  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16378  		return r
 16379  	}()},
 16380  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16381  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(30)
 16382  		return r
 16383  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16384  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16385  		return r
 16386  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16387  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(1)
 16388  		return r
 16389  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16390  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16391  		return r
 16392  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16393  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(17)
 16394  		return r
 16395  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16396  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16397  		return r
 16398  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16399  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(9)
 16400  		return r
 16401  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16402  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16403  		return r
 16404  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16405  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(25)
 16406  		return r
 16407  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16408  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16409  		return r
 16410  	}()},
 16411  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16412  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16413  		return r
 16414  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16415  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16416  		return r
 16417  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16418  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(21)
 16419  		return r
 16420  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16421  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16422  		return r
 16423  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16424  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(13)
 16425  		return r
 16426  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16427  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16428  		return r
 16429  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16430  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(29)
 16431  		return r
 16432  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16433  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16434  		return r
 16435  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16436  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(3)
 16437  		return r
 16438  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16439  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16440  		return r
 16441  	}()},
 16442  	{Ffc: func() (r struct{ Ffreq Ush }) {
 16443  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(19)
 16444  		return r
 16445  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16446  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16447  		return r
 16448  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16449  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(11)
 16450  		return r
 16451  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16452  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16453  		return r
 16454  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16455  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(27)
 16456  		return r
 16457  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16458  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16459  		return r
 16460  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16461  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(7)
 16462  		return r
 16463  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16464  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16465  		return r
 16466  	}()}, {Ffc: func() (r struct{ Ffreq Ush }) {
 16467  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(23)
 16468  		return r
 16469  	}(), Fdl: func() (r struct{ Fdad Ush }) {
 16470  		*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&r)) + 0)) = Ush(5)
 16471  		return r
 16472  	}()}} /* trees.h:64:21 */
 16473  
 16474  var X_dist_code = [512]Uch{
 16475  	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),
 16476  	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),
 16477  	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),
 16478  	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),
 16479  	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),
 16480  	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),
 16481  	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),
 16482  	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),
 16483  	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),
 16484  	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),
 16485  	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),
 16486  	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),
 16487  	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),
 16488  	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),
 16489  	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),
 16490  	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),
 16491  	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),
 16492  	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),
 16493  	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),
 16494  	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),
 16495  	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),
 16496  	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),
 16497  	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),
 16498  	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),
 16499  	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),
 16500  	Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29),
 16501  } /* trees.h:73:25 */
 16502  
 16503  var X_length_code = [256]Uch{
 16504  	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),
 16505  	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),
 16506  	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),
 16507  	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),
 16508  	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),
 16509  	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),
 16510  	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),
 16511  	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),
 16512  	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),
 16513  	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),
 16514  	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),
 16515  	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),
 16516  	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),
 16517  } /* trees.h:102:25 */
 16518  
 16519  var base_length = [29]int32{
 16520  	0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
 16521  	64, 80, 96, 112, 128, 160, 192, 224, 0,
 16522  } /* trees.h:118:17 */
 16523  
 16524  var base_dist = [30]int32{
 16525  	0, 1, 2, 3, 4, 6, 8, 12, 16, 24,
 16526  	32, 48, 64, 96, 128, 192, 256, 384, 512, 768,
 16527  	1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576,
 16528  } /* trees.h:123:17 */
 16529  
 16530  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 */
 16531  
 16532  var static_d_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Felems: D_CODES, Fmax_length: MAX_BITS} /* trees.c:128:31 */
 16533  
 16534  var static_bl_desc = Static_tree_desc{Fextra_bits: 0, Felems: BL_CODES, Fmax_length: MAX_BL_BITS} /* trees.c:131:31 */
 16535  
 16536  // Send a code of the given tree. c and tree must not have side effects
 16537  
 16538  // ===========================================================================
 16539  // Output a short LSB first on the stream.
 16540  // IN assertion: there is enough room in pendingBuf.
 16541  
 16542  // ===========================================================================
 16543  // Send a value on a given number of bits.
 16544  // IN assertion: length <= 16 and value fits in length bits.
 16545  
 16546  // the arguments must not have side effects
 16547  
 16548  // ===========================================================================
 16549  // Initialize the various 'constant' tables.
 16550  func tr_static_init(tls *libc.TLS) { /* trees.c:232:12: */
 16551  }
 16552  
 16553  // ===========================================================================
 16554  // Genererate the file trees.h describing the static trees.
 16555  
 16556  // ===========================================================================
 16557  // Initialize the tree data structures for a new zlib stream.
 16558  func X_tr_init(tls *libc.TLS, s uintptr) { /* trees.c:379:20: */
 16559  	tr_static_init(tls)
 16560  
 16561  	(*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 148 /* &.dyn_ltree */
 16562  	(*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_l_desc))
 16563  
 16564  	(*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2440 /* &.dyn_dtree */
 16565  	(*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_d_desc))
 16566  
 16567  	(*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2684 /* &.bl_tree */
 16568  	(*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_bl_desc))
 16569  
 16570  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
 16571  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
 16572  
 16573  	// Initialize the first block of the first file:
 16574  	init_block(tls, s)
 16575  }
 16576  
 16577  // ===========================================================================
 16578  // Initialize a new block.
 16579  func init_block(tls *libc.TLS, s uintptr) { /* trees.c:407:12: */
 16580  	var n int32 // iterates over tree elements
 16581  
 16582  	// Initialize the trees.
 16583  	for n = 0; n < LITERALS+1+LENGTH_CODES; n++ {
 16584  		*(*Ush)(unsafe.Pointer(s + 148 + uintptr(n)*4)) = Ush(0)
 16585  	}
 16586  	for n = 0; n < D_CODES; n++ {
 16587  		*(*Ush)(unsafe.Pointer(s + 2440 + uintptr(n)*4)) = Ush(0)
 16588  	}
 16589  	for n = 0; n < BL_CODES; n++ {
 16590  		*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(n)*4)) = Ush(0)
 16591  	}
 16592  
 16593  	*(*Ush)(unsafe.Pointer(s + 148 + 256*4)) = Ush(1)
 16594  	(*Deflate_state)(unsafe.Pointer(s)).Fopt_len = libc.AssignPtrUint32(s+5804, Ulg(0))
 16595  	(*Deflate_state)(unsafe.Pointer(s)).Flast_lit = libc.AssignPtrUint32(s+5808, UInt(0))
 16596  }
 16597  
 16598  // Index within the heap array of least frequent node in the Huffman tree
 16599  
 16600  // ===========================================================================
 16601  // Remove the smallest element from the heap and recreate the heap with
 16602  // one less element. Updates heap and heap_len.
 16603  
 16604  // ===========================================================================
 16605  // Compares to subtrees, using the tree depth as tie breaker when
 16606  // the subtrees have equal frequency. This minimizes the worst case length.
 16607  
 16608  // ===========================================================================
 16609  // Restore the heap property by moving down the tree starting at node k,
 16610  // exchanging a node with the smallest of its two sons if necessary, stopping
 16611  // when the heap property is re-established (each father smaller than its
 16612  // two sons).
 16613  func pqdownheap(tls *libc.TLS, s uintptr, tree uintptr, k int32) { /* trees.c:451:12: */
 16614  	var v int32 = *(*int32)(unsafe.Pointer(s + 2908 + uintptr(k)*4))
 16615  	var j int32 = k << 1 // left son of k
 16616  	for j <= (*Deflate_state)(unsafe.Pointer(s)).Fheap_len {
 16617  		// Set j to the smallest of the two sons:
 16618  		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))))))) {
 16619  			j++
 16620  		}
 16621  		// Exit if v is smaller than both sons
 16622  		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)))))) {
 16623  			break
 16624  		}
 16625  
 16626  		// Exchange v with the smallest son
 16627  		*(*int32)(unsafe.Pointer(s + 2908 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(s + 2908 + uintptr(j)*4))
 16628  		k = j
 16629  
 16630  		// And continue down the tree, setting j to the left son of k
 16631  		j <<= 1
 16632  	}
 16633  	*(*int32)(unsafe.Pointer(s + 2908 + uintptr(k)*4)) = v
 16634  }
 16635  
 16636  // ===========================================================================
 16637  // Compute the optimal bit lengths for a tree and update the total bit length
 16638  // for the current block.
 16639  // IN assertion: the fields freq and dad are set, heap[heap_max] and
 16640  //    above are the tree nodes sorted by increasing frequency.
 16641  // OUT assertions: the field len is set to the optimal bit length, the
 16642  //     array bl_count contains the frequencies for each bit length.
 16643  //     The length opt_len is updated; static_len is also updated if stree is
 16644  //     not null.
 16645  func gen_bitlen(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:486:12: */
 16646  	var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree
 16647  	var max_code int32 = (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code
 16648  	var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree
 16649  	var extra uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits
 16650  	var base int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base
 16651  	var max_length int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length
 16652  	var h int32 // heap index
 16653  	var n int32
 16654  	var m int32            // iterate over the tree elements
 16655  	var bits int32         // bit length
 16656  	var xbits int32        // extra bits
 16657  	var f Ush              // frequency
 16658  	var overflow int32 = 0 // number of elements with bit length too large
 16659  
 16660  	for bits = 0; bits <= MAX_BITS; bits++ {
 16661  		*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits)*2)) = Ush(0)
 16662  	}
 16663  
 16664  	// In a first pass, compute the optimal bit lengths (which may
 16665  	// overflow in the case of the bit length tree).
 16666  	*(*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
 16667  
 16668  	for h = (*Deflate_state)(unsafe.Pointer(s)).Fheap_max + 1; h < 2*(LITERALS+1+LENGTH_CODES)+1; h++ {
 16669  		n = *(*int32)(unsafe.Pointer(s + 2908 + uintptr(h)*4))
 16670  		bits = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)))*4 + 2))) + 1
 16671  		if bits > max_length {
 16672  			bits = max_length
 16673  			overflow++
 16674  		}
 16675  		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = Ush(bits)
 16676  		// We overwrite tree[n].Dad which is no longer needed
 16677  
 16678  		if n > max_code {
 16679  			continue
 16680  		} // not a leaf node
 16681  
 16682  		*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits)*2))++
 16683  		xbits = 0
 16684  		if n >= base {
 16685  			xbits = *(*Intf)(unsafe.Pointer(extra + uintptr(n-base)*4))
 16686  		}
 16687  		f = *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))
 16688  		*(*Ulg)(unsafe.Pointer(s + 5800)) += Ulg(f) * Ulg(uint32(bits+xbits))
 16689  		if stree != 0 {
 16690  			*(*Ulg)(unsafe.Pointer(s + 5804)) += Ulg(f) * Ulg(uint32(int32(*(*Ush)(unsafe.Pointer(stree + uintptr(n)*4 + 2)))+xbits))
 16691  		}
 16692  	}
 16693  	if overflow == 0 {
 16694  		return
 16695  	}
 16696  
 16697  	// This happens for example on obj2 and pic of the Calgary corpus
 16698  
 16699  	// Find the first bit length which could increase:
 16700  	for ok := true; ok; ok = overflow > 0 {
 16701  		bits = max_length - 1
 16702  		for int32(*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits)*2))) == 0 {
 16703  			bits--
 16704  		}
 16705  		*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits)*2))--           // move one leaf down the tree
 16706  		*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits+1)*2)) += Ush(2) // move one overflow item as its brother
 16707  		*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(max_length)*2))--
 16708  		// The brother of the overflow item also moves one step up,
 16709  		// but this does not affect bl_count[max_length]
 16710  		overflow = overflow - 2
 16711  	}
 16712  
 16713  	// Now recompute all bit lengths, scanning in increasing frequency.
 16714  	// h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
 16715  	// lengths instead of fixing only the wrong ones. This idea is taken
 16716  	// from 'ar' written by Haruhiko Okumura.)
 16717  	for bits = max_length; bits != 0; bits-- {
 16718  		n = int32(*(*Ush)(unsafe.Pointer(s + 2876 + uintptr(bits)*2)))
 16719  		for n != 0 {
 16720  			m = *(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PreDecInt32(&h, 1))*4))
 16721  			if m > max_code {
 16722  				continue
 16723  			}
 16724  			if uint32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2))) != uint32(bits) {
 16725  
 16726  				*(*Ulg)(unsafe.Pointer(s + 5800)) += (Ulg(bits) - Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)))) * Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4)))
 16727  				*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)) = Ush(bits)
 16728  			}
 16729  			n--
 16730  		}
 16731  	}
 16732  }
 16733  
 16734  // ===========================================================================
 16735  // Generate the codes for a given tree and bit counts (which need not be
 16736  // optimal).
 16737  // IN assertion: the array bl_count contains the bit length statistics for
 16738  // the given tree and the field len is set for all tree elements.
 16739  // OUT assertion: the field code is set for all tree elements of non
 16740  //     zero code length.
 16741  func gen_codes(tls *libc.TLS, tree uintptr, max_code int32, bl_count uintptr) { /* trees.c:572:12: */
 16742  	bp := tls.Alloc(32)
 16743  	defer tls.Free(32)
 16744  
 16745  	// var next_code [16]Ush at bp, 32
 16746  	// next code value for each bit length
 16747  	var code uint32 = uint32(0) // running code value
 16748  	var bits int32              // bit index
 16749  	var n int32                 // code index
 16750  
 16751  	// The distribution counts are first used to generate the code values
 16752  	// without bit reversal.
 16753  	for bits = 1; bits <= MAX_BITS; bits++ {
 16754  		code = (code + uint32(*(*Ushf)(unsafe.Pointer(bl_count + uintptr(bits-1)*2)))) << 1
 16755  		*(*Ush)(unsafe.Pointer(bp + uintptr(bits)*2)) = Ush(code)
 16756  	}
 16757  	// Check that the bit counts in bl_count are consistent. The last code
 16758  	// must be all ones.
 16759  
 16760  	for n = 0; n <= max_code; n++ {
 16761  		var len int32 = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)))
 16762  		if len == 0 {
 16763  			continue
 16764  		}
 16765  		// Now reverse the bits
 16766  		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4)) = Ush(bi_reverse(tls, uint32(libc.PostIncUint16(&*(*Ush)(unsafe.Pointer(bp + uintptr(len)*2)), 1)), len))
 16767  
 16768  	}
 16769  }
 16770  
 16771  // ===========================================================================
 16772  // Construct one Huffman tree and assigns the code bit strings and lengths.
 16773  // Update the total bit length for the current block.
 16774  // IN assertion: the field freq is set for all tree elements.
 16775  // OUT assertions: the fields len and code are set to the optimal bit length
 16776  //     and corresponding code. The length opt_len is updated; static_len is
 16777  //     also updated if stree is not null. The field max_code is set.
 16778  func build_tree(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:615:12: */
 16779  	var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree
 16780  	var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree
 16781  	var elems int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems
 16782  	var n int32
 16783  	var m int32             // iterate over heap elements
 16784  	var max_code int32 = -1 // largest code with non zero frequency
 16785  	var node int32          // new node being created
 16786  
 16787  	// Construct the initial heap, with least frequent element in
 16788  	// heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
 16789  	// heap[0] is not used.
 16790  	(*Deflate_state)(unsafe.Pointer(s)).Fheap_len = 0
 16791  	(*Deflate_state)(unsafe.Pointer(s)).Fheap_max = 2*(LITERALS+1+LENGTH_CODES) + 1
 16792  
 16793  	for n = 0; n < elems; n++ {
 16794  		if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))) != 0 {
 16795  			*(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PreIncInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4)) = libc.AssignInt32(&max_code, n)
 16796  			*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(n))) = Uch(0)
 16797  		} else {
 16798  			*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = Ush(0)
 16799  		}
 16800  	}
 16801  
 16802  	// The pkzip format requires that at least one distance code exists,
 16803  	// and that at least one bit should be sent even if there is only one
 16804  	// possible code. So to avoid special checks later on we force at least
 16805  	// two codes of non zero frequency.
 16806  	for (*Deflate_state)(unsafe.Pointer(s)).Fheap_len < 2 {
 16807  		node = libc.AssignPtrInt32(s+2908+uintptr(libc.PreIncInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4, func() int32 {
 16808  			if max_code < 2 {
 16809  				return libc.PreIncInt32(&max_code, 1)
 16810  			}
 16811  			return 0
 16812  		}())
 16813  		*(*Ush)(unsafe.Pointer(tree + uintptr(node)*4)) = Ush(1)
 16814  		*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(node))) = Uch(0)
 16815  		(*Deflate_state)(unsafe.Pointer(s)).Fopt_len--
 16816  		if stree != 0 {
 16817  			*(*Ulg)(unsafe.Pointer(s + 5804)) -= Ulg(*(*Ush)(unsafe.Pointer(stree + uintptr(node)*4 + 2)))
 16818  		}
 16819  		// node is 0 or 1 so it does not have extra bits
 16820  	}
 16821  	(*Tree_desc)(unsafe.Pointer(desc)).Fmax_code = max_code
 16822  
 16823  	// The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
 16824  	// establish sub-heaps of increasing lengths:
 16825  	for n = (*Deflate_state)(unsafe.Pointer(s)).Fheap_len / 2; n >= 1; n-- {
 16826  		pqdownheap(tls, s, tree, n)
 16827  	}
 16828  
 16829  	// Construct the Huffman tree by repeatedly combining the least two
 16830  	// frequent nodes.
 16831  	node = elems // next internal node of the tree
 16832  	for ok := true; ok; ok = (*Deflate_state)(unsafe.Pointer(s)).Fheap_len >= 2 {
 16833  		{
 16834  			n = *(*int32)(unsafe.Pointer(s + 2908 + 1*4))
 16835  			*(*int32)(unsafe.Pointer(s + 2908 + 1*4)) = *(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PostDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4))
 16836  			pqdownheap(tls, s, tree, SMALLEST)
 16837  		}
 16838  		// n = node of least frequency
 16839  		m = *(*int32)(unsafe.Pointer(s + 2908 + 1*4)) // m = node of next least frequency
 16840  
 16841  		*(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = n // keep the nodes sorted by frequency
 16842  		*(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = m
 16843  
 16844  		// Create a new node father of n and m
 16845  		*(*Ush)(unsafe.Pointer(tree + uintptr(node)*4)) = Ush(int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4))) + int32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4))))
 16846  		*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(node))) = Uch(func() int32 {
 16847  			if int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(n)))) >= int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(m)))) {
 16848  				return int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(n))))
 16849  			}
 16850  			return int32(*(*Uch)(unsafe.Pointer(s + 5208 + uintptr(m))))
 16851  		}() + 1)
 16852  		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = libc.AssignPtrUint16(tree+uintptr(m)*4+2, Ush(node))
 16853  		// and insert the new node in the heap
 16854  		*(*int32)(unsafe.Pointer(s + 2908 + 1*4)) = libc.PostIncInt32(&node, 1)
 16855  		pqdownheap(tls, s, tree, SMALLEST)
 16856  
 16857  	}
 16858  
 16859  	*(*int32)(unsafe.Pointer(s + 2908 + uintptr(libc.PreDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_max, 1))*4)) = *(*int32)(unsafe.Pointer(s + 2908 + 1*4))
 16860  
 16861  	// At this point, the fields freq and dad are set. We can now
 16862  	// generate the bit lengths.
 16863  	gen_bitlen(tls, s, desc)
 16864  
 16865  	// The field len is now set, we can generate the bit codes
 16866  	gen_codes(tls, tree, max_code, s+2876)
 16867  }
 16868  
 16869  // ===========================================================================
 16870  // Scan a literal or distance tree to determine the frequencies of the codes
 16871  // in the bit length tree.
 16872  func scan_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:703:12: */
 16873  	var n int32                                                  // iterates over all tree elements
 16874  	var prevlen int32 = -1                                       // last emitted length
 16875  	var curlen int32                                             // length of current code
 16876  	var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2))) // length of next code
 16877  	var count int32 = 0                                          // repeat count of the current code
 16878  	var max_count int32 = 7                                      // max repeat count
 16879  	var min_count int32 = 4                                      // min repeat count
 16880  
 16881  	if nextlen == 0 {
 16882  		max_count = 138
 16883  		min_count = 3
 16884  	}
 16885  	*(*Ush)(unsafe.Pointer(tree + uintptr(max_code+1)*4 + 2)) = Ush(0xffff) // guard
 16886  
 16887  	for n = 0; n <= max_code; n++ {
 16888  		curlen = nextlen
 16889  		nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n+1)*4 + 2)))
 16890  		if libc.PreIncInt32(&count, 1) < max_count && curlen == nextlen {
 16891  			continue
 16892  		} else if count < min_count {
 16893  			*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4)) += Ush(count)
 16894  		} else if curlen != 0 {
 16895  			if curlen != prevlen {
 16896  				*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4))++
 16897  			}
 16898  			*(*Ush)(unsafe.Pointer(s + 2684 + 16*4))++
 16899  		} else if count <= 10 {
 16900  			*(*Ush)(unsafe.Pointer(s + 2684 + 17*4))++
 16901  		} else {
 16902  			*(*Ush)(unsafe.Pointer(s + 2684 + 18*4))++
 16903  		}
 16904  		count = 0
 16905  		prevlen = curlen
 16906  		if nextlen == 0 {
 16907  			max_count = 138
 16908  			min_count = 3
 16909  		} else if curlen == nextlen {
 16910  			max_count = 6
 16911  			min_count = 3
 16912  		} else {
 16913  			max_count = 7
 16914  			min_count = 4
 16915  		}
 16916  	}
 16917  }
 16918  
 16919  // ===========================================================================
 16920  // Send a literal or distance tree in compressed form, using the codes in
 16921  // bl_tree.
 16922  func send_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:748:12: */
 16923  	var n int32                                                  // iterates over all tree elements
 16924  	var prevlen int32 = -1                                       // last emitted length
 16925  	var curlen int32                                             // length of current code
 16926  	var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2))) // length of next code
 16927  	var count int32 = 0                                          // repeat count of the current code
 16928  	var max_count int32 = 7                                      // max repeat count
 16929  	var min_count int32 = 4                                      // min repeat count
 16930  
 16931  	/* tree[max_code+1].Len = -1; */ // guard already set
 16932  	if nextlen == 0 {
 16933  		max_count = 138
 16934  		min_count = 3
 16935  	}
 16936  
 16937  	for n = 0; n <= max_code; n++ {
 16938  		curlen = nextlen
 16939  		nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n+1)*4 + 2)))
 16940  		if libc.PreIncInt32(&count, 1) < max_count && curlen == nextlen {
 16941  			continue
 16942  		} else if count < min_count {
 16943  			for ok := true; ok; ok = libc.PreDecInt32(&count, 1) != 0 {
 16944  				{
 16945  					var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4 + 2)))
 16946  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 16947  						var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4)))
 16948  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16949  						{
 16950  							{
 16951  								*(*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)
 16952  							}
 16953  							{
 16954  								*(*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)
 16955  							}
 16956  
 16957  						}
 16958  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16959  						*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 16960  					} else {
 16961  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16962  						*(*int32)(unsafe.Pointer(s + 5820)) += len
 16963  					}
 16964  				}
 16965  			}
 16966  
 16967  		} else if curlen != 0 {
 16968  			if curlen != prevlen {
 16969  				{
 16970  					var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4 + 2)))
 16971  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 16972  						var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4)))
 16973  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16974  						{
 16975  							{
 16976  								*(*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)
 16977  							}
 16978  							{
 16979  								*(*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)
 16980  							}
 16981  
 16982  						}
 16983  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16984  						*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 16985  					} else {
 16986  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(curlen)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16987  						*(*int32)(unsafe.Pointer(s + 5820)) += len
 16988  					}
 16989  				}
 16990  				count--
 16991  			}
 16992  
 16993  			{
 16994  				var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 16*4 + 2)))
 16995  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 16996  					var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 16*4)))
 16997  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 16998  					{
 16999  						{
 17000  							*(*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)
 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) >> 8)
 17004  						}
 17005  
 17006  					}
 17007  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17008  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17009  				} else {
 17010  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + 16*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17011  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 17012  				}
 17013  			}
 17014  			{
 17015  				var len int32 = 2
 17016  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17017  					var val int32 = count - 3
 17018  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17019  					{
 17020  						{
 17021  							*(*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)
 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) >> 8)
 17025  						}
 17026  
 17027  					}
 17028  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17029  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17030  				} else {
 17031  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(count-3)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17032  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 17033  				}
 17034  			}
 17035  
 17036  		} else if count <= 10 {
 17037  			{
 17038  				var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 17*4 + 2)))
 17039  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17040  					var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 17*4)))
 17041  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17042  					{
 17043  						{
 17044  							*(*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)
 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) >> 8)
 17048  						}
 17049  
 17050  					}
 17051  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17052  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17053  				} else {
 17054  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + 17*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17055  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 17056  				}
 17057  			}
 17058  			{
 17059  				var len int32 = 3
 17060  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17061  					var val int32 = count - 3
 17062  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17063  					{
 17064  						{
 17065  							*(*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)
 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) >> 8)
 17069  						}
 17070  
 17071  					}
 17072  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17073  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17074  				} else {
 17075  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(count-3)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17076  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 17077  				}
 17078  			}
 17079  
 17080  		} else {
 17081  			{
 17082  				var len int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 18*4 + 2)))
 17083  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17084  					var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + 18*4)))
 17085  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17086  					{
 17087  						{
 17088  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) & 0xff)
 17089  						}
 17090  						{
 17091  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Uch(int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf) >> 8)
 17092  						}
 17093  
 17094  					}
 17095  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17096  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17097  				} else {
 17098  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(s + 2684 + 18*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17099  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 17100  				}
 17101  			}
 17102  			{
 17103  				var len int32 = 7
 17104  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17105  					var val int32 = count - 11
 17106  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17107  					{
 17108  						{
 17109  							*(*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)
 17110  						}
 17111  						{
 17112  							*(*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)
 17113  						}
 17114  
 17115  					}
 17116  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17117  					*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17118  				} else {
 17119  					*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(count-11)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17120  					*(*int32)(unsafe.Pointer(s + 5820)) += len
 17121  				}
 17122  			}
 17123  
 17124  		}
 17125  		count = 0
 17126  		prevlen = curlen
 17127  		if nextlen == 0 {
 17128  			max_count = 138
 17129  			min_count = 3
 17130  		} else if curlen == nextlen {
 17131  			max_count = 6
 17132  			min_count = 3
 17133  		} else {
 17134  			max_count = 7
 17135  			min_count = 4
 17136  		}
 17137  	}
 17138  }
 17139  
 17140  // ===========================================================================
 17141  // Construct the Huffman tree for the bit lengths and return the index in
 17142  // bl_order of the last bit length code to send.
 17143  func build_bl_tree(tls *libc.TLS, s uintptr) int32 { /* trees.c:799:11: */
 17144  	var max_blindex int32 // index of last bit length code of non zero freq
 17145  
 17146  	// Determine the bit length frequencies for literal and distance trees
 17147  	scan_tree(tls, s, s+148 /* &.dyn_ltree */, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code)
 17148  	scan_tree(tls, s, s+2440 /* &.dyn_dtree */, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code)
 17149  
 17150  	// Build the bit length tree:
 17151  	build_tree(tls, s, s+2864)
 17152  	// opt_len now includes the length of the tree representations, except
 17153  	// the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
 17154  
 17155  	// Determine the number of bit length codes to send. The pkzip format
 17156  	// requires that at least 4 bit length codes be sent. (appnote.txt says
 17157  	// 3 but the actual value used is 4.)
 17158  	for max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex-- {
 17159  		if int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(bl_order[max_blindex])*4 + 2))) != 0 {
 17160  			break
 17161  		}
 17162  	}
 17163  	// Update opt_len to include the bit length tree and counts
 17164  	*(*Ulg)(unsafe.Pointer(s + 5800)) += Ulg(3)*(Ulg(max_blindex)+Ulg(1)) + Ulg(5) + Ulg(5) + Ulg(4)
 17165  
 17166  	return max_blindex
 17167  }
 17168  
 17169  // ===========================================================================
 17170  // Send the header for a block using dynamic Huffman trees: the counts, the
 17171  // lengths of the bit length codes, the literal tree and the distance tree.
 17172  // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
 17173  func send_all_trees(tls *libc.TLS, s uintptr, lcodes int32, dcodes int32, blcodes int32) { /* trees.c:834:12: */
 17174  	var rank int32 // index in bl_order
 17175  
 17176  	{
 17177  		var len int32 = 5
 17178  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17179  			var val int32 = lcodes - 257
 17180  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17181  			{
 17182  				{
 17183  					*(*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)
 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) >> 8)
 17187  				}
 17188  
 17189  			}
 17190  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17191  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17192  		} else {
 17193  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(lcodes-257)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17194  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17195  		}
 17196  	}
 17197  	/* not +255 as stated in appnote.txt */
 17198  	{
 17199  		var len int32 = 5
 17200  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17201  			var val int32 = dcodes - 1
 17202  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17203  			{
 17204  				{
 17205  					*(*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)
 17206  				}
 17207  				{
 17208  					*(*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)
 17209  				}
 17210  
 17211  			}
 17212  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17213  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17214  		} else {
 17215  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(dcodes-1)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17216  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17217  		}
 17218  	}
 17219  
 17220  	{
 17221  		var len int32 = 4
 17222  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17223  			var val int32 = blcodes - 4
 17224  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17225  			{
 17226  				{
 17227  					*(*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)
 17228  				}
 17229  				{
 17230  					*(*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)
 17231  				}
 17232  
 17233  			}
 17234  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17235  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17236  		} else {
 17237  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(blcodes-4)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17238  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17239  		}
 17240  	}
 17241  	// not -3 as stated in appnote.txt
 17242  	for rank = 0; rank < blcodes; rank++ {
 17243  
 17244  		{
 17245  			var len int32 = 3
 17246  			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17247  				var val int32 = int32(*(*Ush)(unsafe.Pointer(s + 2684 + uintptr(bl_order[rank])*4 + 2)))
 17248  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17249  				{
 17250  					{
 17251  						*(*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)
 17252  					}
 17253  					{
 17254  						*(*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)
 17255  					}
 17256  
 17257  				}
 17258  				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17259  				*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17260  			} else {
 17261  				*(*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)
 17262  				*(*int32)(unsafe.Pointer(s + 5820)) += len
 17263  			}
 17264  		}
 17265  
 17266  	}
 17267  
 17268  	send_tree(tls, s, s+148 /* &.dyn_ltree */, lcodes-1) // literal tree
 17269  
 17270  	send_tree(tls, s, s+2440 /* &.dyn_dtree */, dcodes-1) // distance tree
 17271  
 17272  }
 17273  
 17274  // ===========================================================================
 17275  // Send a stored block
 17276  func X_tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:863:20: */
 17277  	{
 17278  		var len int32 = 3
 17279  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17280  			var val int32 = int32(STORED_BLOCK)<<1 + last
 17281  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17282  			{
 17283  				{
 17284  					*(*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)
 17285  				}
 17286  				{
 17287  					*(*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)
 17288  				}
 17289  
 17290  			}
 17291  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17292  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17293  		} else {
 17294  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(int32(STORED_BLOCK)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17295  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17296  		}
 17297  	}
 17298  	// send block type
 17299  	bi_windup(tls, s) /* align on byte boundary */
 17300  	{
 17301  		{
 17302  			*(*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)
 17303  		}
 17304  		{
 17305  			*(*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)
 17306  		}
 17307  
 17308  	}
 17309  
 17310  	{
 17311  		{
 17312  			*(*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)
 17313  		}
 17314  		{
 17315  			*(*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)
 17316  		}
 17317  
 17318  	}
 17319  
 17320  	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending), buf, uint32(stored_len))
 17321  	*(*Ulg)(unsafe.Pointer(s + 20)) += stored_len
 17322  }
 17323  
 17324  // ===========================================================================
 17325  // Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
 17326  func X_tr_flush_bits(tls *libc.TLS, s uintptr) { /* trees.c:886:20: */
 17327  	bi_flush(tls, s)
 17328  }
 17329  
 17330  // ===========================================================================
 17331  // Send one empty static block to give enough lookahead for inflate.
 17332  // This takes 10 bits, of which 7 may remain in the bit buffer.
 17333  func X_tr_align(tls *libc.TLS, s uintptr) { /* trees.c:896:20: */
 17334  	{
 17335  		var len int32 = 3
 17336  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17337  			var val int32 = int32(STATIC_TREES) << 1
 17338  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17339  			{
 17340  				{
 17341  					*(*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)
 17342  				}
 17343  				{
 17344  					*(*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)
 17345  				}
 17346  
 17347  			}
 17348  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17349  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17350  		} else {
 17351  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(int32(Ush(int32(STATIC_TREES)<<1))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17352  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17353  		}
 17354  	}
 17355  
 17356  	{
 17357  		var len int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 + 2)))
 17358  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17359  			var val int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4)))
 17360  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17361  			{
 17362  				{
 17363  					*(*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)
 17364  				}
 17365  				{
 17366  					*(*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)
 17367  				}
 17368  
 17369  			}
 17370  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17371  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17372  		} else {
 17373  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17374  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17375  		}
 17376  	}
 17377  
 17378  	bi_flush(tls, s)
 17379  }
 17380  
 17381  // ===========================================================================
 17382  // Determine the best encoding for the current block: dynamic trees, static
 17383  // trees or store, and write out the encoded block.
 17384  func X_tr_flush_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:911:20: */
 17385  	var opt_lenb Ulg
 17386  	var static_lenb Ulg       // opt_len and static_len in bytes
 17387  	var max_blindex int32 = 0 // index of last bit length code of non zero freq
 17388  
 17389  	// Build the Huffman trees unless a stored block is forced
 17390  	if (*Deflate_state)(unsafe.Pointer(s)).Flevel > 0 {
 17391  
 17392  		// Check if the file is binary or text
 17393  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == Z_UNKNOWN {
 17394  			(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = detect_data_type(tls, s)
 17395  		}
 17396  
 17397  		// Construct the literal and distance trees
 17398  		build_tree(tls, s, s+2840)
 17399  
 17400  		build_tree(tls, s, s+2852)
 17401  
 17402  		// At this point, opt_len and static_len are the total bit lengths of
 17403  		// the compressed block data, excluding the tree representations.
 17404  
 17405  		// Build the bit length tree for the above two trees, and get the index
 17406  		// in bl_order of the last bit length code to send.
 17407  		max_blindex = build_bl_tree(tls, s)
 17408  
 17409  		// Determine the best encoding. Compute the block lengths in bytes.
 17410  		opt_lenb = ((*Deflate_state)(unsafe.Pointer(s)).Fopt_len + Ulg(3) + Ulg(7)) >> 3
 17411  		static_lenb = ((*Deflate_state)(unsafe.Pointer(s)).Fstatic_len + Ulg(3) + Ulg(7)) >> 3
 17412  
 17413  		if static_lenb <= opt_lenb {
 17414  			opt_lenb = static_lenb
 17415  		}
 17416  
 17417  	} else {
 17418  
 17419  		opt_lenb = libc.AssignUint32(&static_lenb, stored_len+Ulg(5)) // force a stored block
 17420  	}
 17421  
 17422  	if stored_len+Ulg(4) <= opt_lenb && buf != uintptr(0) {
 17423  		// 4: two words for the lengths
 17424  		// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
 17425  		// Otherwise we can't have processed more than WSIZE input bytes since
 17426  		// the last block flush, because compression would have been
 17427  		// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
 17428  		// transform a block into a stored block.
 17429  		X_tr_stored_block(tls, s, buf, stored_len, last)
 17430  
 17431  	} else if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FIXED || static_lenb == opt_lenb {
 17432  		{
 17433  			var len int32 = 3
 17434  			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17435  				var val int32 = int32(STATIC_TREES)<<1 + last
 17436  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17437  				{
 17438  					{
 17439  						*(*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)
 17440  					}
 17441  					{
 17442  						*(*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)
 17443  					}
 17444  
 17445  				}
 17446  				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17447  				*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17448  			} else {
 17449  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(int32(STATIC_TREES)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17450  				*(*int32)(unsafe.Pointer(s + 5820)) += len
 17451  			}
 17452  		}
 17453  
 17454  		compress_block(tls, s, uintptr(uintptr(unsafe.Pointer(&static_ltree))),
 17455  			uintptr(uintptr(unsafe.Pointer(&static_dtree))))
 17456  	} else {
 17457  		{
 17458  			var len int32 = 3
 17459  			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17460  				var val int32 = int32(DYN_TREES)<<1 + last
 17461  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17462  				{
 17463  					{
 17464  						*(*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)
 17465  					}
 17466  					{
 17467  						*(*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)
 17468  					}
 17469  
 17470  				}
 17471  				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17472  				*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17473  			} else {
 17474  				*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(int32(DYN_TREES)<<1+last)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17475  				*(*int32)(unsafe.Pointer(s + 5820)) += len
 17476  			}
 17477  		}
 17478  
 17479  		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,
 17480  			max_blindex+1)
 17481  		compress_block(tls, s, s+148, /* &.dyn_ltree */
 17482  			s+2440 /* &.dyn_dtree */)
 17483  	}
 17484  
 17485  	// The above check is made mod 2^32, for files larger than 512 MB
 17486  	// and uLong implemented on 32 bits.
 17487  	init_block(tls, s)
 17488  
 17489  	if last != 0 {
 17490  		bi_windup(tls, s)
 17491  	}
 17492  
 17493  }
 17494  
 17495  // ===========================================================================
 17496  // Save the match info and tally the frequency counts. Return true if
 17497  // the current block must be flushed.
 17498  func X_tr_tally(tls *libc.TLS, s uintptr, dist uint32, lc uint32) int32 { /* trees.c:1014:19: */
 17499  	*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ush(dist)
 17500  	*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = Uch(lc)
 17501  	if dist == uint32(0) {
 17502  		// lc is the unmatched char
 17503  		*(*Ush)(unsafe.Pointer(s + 148 + uintptr(lc)*4))++
 17504  	} else {
 17505  		(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
 17506  		// Here, lc is the match length - MIN_MATCH
 17507  		dist-- // dist = match distance - 1
 17508  
 17509  		*(*Ush)(unsafe.Pointer(s + 148 + uintptr(int32(X_length_code[lc])+LITERALS+1)*4))++
 17510  		*(*Ush)(unsafe.Pointer(s + 2440 + uintptr(func() int32 {
 17511  			if dist < uint32(256) {
 17512  				return int32(X_dist_code[dist])
 17513  			}
 17514  			return int32(X_dist_code[uint32(256)+dist>>7])
 17515  		}())*4))++
 17516  	}
 17517  
 17518  	return libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize-UInt(1))
 17519  	// We avoid equality with lit_bufsize because of wraparound at 64K
 17520  	// on 16 bit machines and because stored blocks are restricted to
 17521  	// 64K-1 bytes.
 17522  }
 17523  
 17524  // ===========================================================================
 17525  // Send the block data compressed using the given Huffman trees
 17526  func compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { /* trees.c:1064:12: */
 17527  	var dist uint32           // distance of matched string
 17528  	var lc int32              // match length or unmatched char (if dist == 0)
 17529  	var lx uint32 = uint32(0) // running index in l_buf
 17530  	var code uint32           // the code to send
 17531  	var extra int32           // number of extra bits to send
 17532  
 17533  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != UInt(0) {
 17534  		for ok := true; ok; ok = lx < (*Deflate_state)(unsafe.Pointer(s)).Flast_lit {
 17535  			dist = uint32(*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr(lx)*2)))
 17536  			lc = int32(*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&lx, 1)))))
 17537  			if dist == uint32(0) {
 17538  				{
 17539  					var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2)))
 17540  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17541  						var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4)))
 17542  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17543  						{
 17544  							{
 17545  								*(*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)
 17546  							}
 17547  							{
 17548  								*(*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)
 17549  							}
 17550  
 17551  						}
 17552  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17553  						*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17554  					} else {
 17555  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17556  						*(*int32)(unsafe.Pointer(s + 5820)) += len
 17557  					}
 17558  				}
 17559  				// send a literal byte
 17560  
 17561  			} else {
 17562  				// Here, lc is the match length - MIN_MATCH
 17563  				code = uint32(X_length_code[lc])
 17564  				{
 17565  					var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4 + 2)))
 17566  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17567  						var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(code+uint32(LITERALS)+uint32(1))*4)))
 17568  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17569  						{
 17570  							{
 17571  								*(*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)
 17572  							}
 17573  							{
 17574  								*(*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)
 17575  							}
 17576  
 17577  						}
 17578  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17579  						*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17580  					} else {
 17581  						*(*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)
 17582  						*(*int32)(unsafe.Pointer(s + 5820)) += len
 17583  					}
 17584  				}
 17585  				// send the length code
 17586  				extra = extra_lbits[code]
 17587  				if extra != 0 {
 17588  					lc = lc - base_length[code]
 17589  					{
 17590  						var len int32 = extra
 17591  						if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17592  							var val int32 = lc
 17593  							*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17594  							{
 17595  								{
 17596  									*(*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)
 17597  								}
 17598  								{
 17599  									*(*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)
 17600  								}
 17601  
 17602  							}
 17603  							(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17604  							*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17605  						} else {
 17606  							*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(lc)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17607  							*(*int32)(unsafe.Pointer(s + 5820)) += len
 17608  						}
 17609  					}
 17610  					// send the extra length bits
 17611  				}
 17612  				dist-- // dist is now the match distance - 1
 17613  				code = func() uint32 {
 17614  					if dist < uint32(256) {
 17615  						return uint32(X_dist_code[dist])
 17616  					}
 17617  					return uint32(X_dist_code[uint32(256)+dist>>7])
 17618  				}()
 17619  
 17620  				{
 17621  					var len int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2)))
 17622  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17623  						var val int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4)))
 17624  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17625  						{
 17626  							{
 17627  								*(*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)
 17628  							}
 17629  							{
 17630  								*(*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)
 17631  							}
 17632  
 17633  						}
 17634  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17635  						*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17636  					} else {
 17637  						*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17638  						*(*int32)(unsafe.Pointer(s + 5820)) += len
 17639  					}
 17640  				}
 17641  				// send the distance code
 17642  				extra = extra_dbits[code]
 17643  				if extra != 0 {
 17644  					dist = dist - uint32(base_dist[code])
 17645  					{
 17646  						var len int32 = extra
 17647  						if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17648  							var val int32 = int32(dist)
 17649  							*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17650  							{
 17651  								{
 17652  									*(*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)
 17653  								}
 17654  								{
 17655  									*(*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)
 17656  								}
 17657  
 17658  							}
 17659  							(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17660  							*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17661  						} else {
 17662  							*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(dist)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17663  							*(*int32)(unsafe.Pointer(s + 5820)) += len
 17664  						}
 17665  					}
 17666  					// send the extra distance bits
 17667  				}
 17668  			} // literal or match pair ?
 17669  
 17670  			// Check that the overlay between pending_buf and d_buf+l_buf is ok:
 17671  
 17672  		}
 17673  	}
 17674  
 17675  	{
 17676  		var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 + 2)))
 17677  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > Buf_size-len {
 17678  			var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4)))
 17679  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17680  			{
 17681  				{
 17682  					*(*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)
 17683  				}
 17684  				{
 17685  					*(*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)
 17686  				}
 17687  
 17688  			}
 17689  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17690  			*(*int32)(unsafe.Pointer(s + 5820)) += len - Buf_size
 17691  		} else {
 17692  			*(*Ush)(unsafe.Pointer(s + 5816)) |= Ush(int32(*(*Ush)(unsafe.Pointer(ltree + 256*4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
 17693  			*(*int32)(unsafe.Pointer(s + 5820)) += len
 17694  		}
 17695  	}
 17696  
 17697  }
 17698  
 17699  // ===========================================================================
 17700  // Check if the data type is TEXT or BINARY, using the following algorithm:
 17701  // - TEXT if the two conditions below are satisfied:
 17702  //    a) There are no non-portable control characters belonging to the
 17703  //       "black list" (0..6, 14..25, 28..31).
 17704  //    b) There is at least one printable character belonging to the
 17705  //       "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
 17706  // - BINARY otherwise.
 17707  // - The following partially-portable control characters form a
 17708  //   "gray list" that is ignored in this detection algorithm:
 17709  //   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
 17710  // IN assertion: the fields Freq of dyn_ltree are set.
 17711  func detect_data_type(tls *libc.TLS, s uintptr) int32 { /* trees.c:1124:11: */
 17712  	// black_mask is the bit mask of black-listed bytes
 17713  	// set bits 0..6, 14..25, and 28..31
 17714  	// 0xf3ffc07f = binary 11110011111111111100000001111111
 17715  	var black_mask uint32 = 0xf3ffc07f
 17716  	var n int32
 17717  
 17718  	// Check for non-textual ("black-listed") bytes.
 17719  	n = 0
 17720  __1:
 17721  	if !(n <= 31) {
 17722  		goto __3
 17723  	}
 17724  	if black_mask&uint32(1) != 0 && int32(*(*Ush)(unsafe.Pointer(s + 148 + uintptr(n)*4))) != 0 {
 17725  		return Z_BINARY
 17726  	}
 17727  	goto __2
 17728  __2:
 17729  	n++
 17730  	black_mask >>= 1
 17731  	goto __1
 17732  	goto __3
 17733  __3:
 17734  	;
 17735  
 17736  	// Check for textual ("white-listed") bytes.
 17737  	if int32(*(*Ush)(unsafe.Pointer(s + 148 + 9*4))) != 0 || int32(*(*Ush)(unsafe.Pointer(s + 148 + 10*4))) != 0 ||
 17738  		int32(*(*Ush)(unsafe.Pointer(s + 148 + 13*4))) != 0 {
 17739  		return Z_TEXT
 17740  	}
 17741  	for n = 32; n < LITERALS; n++ {
 17742  		if int32(*(*Ush)(unsafe.Pointer(s + 148 + uintptr(n)*4))) != 0 {
 17743  			return Z_TEXT
 17744  		}
 17745  	}
 17746  
 17747  	// There are no "black-listed" or "white-listed" bytes:
 17748  	// this stream either is empty or has tolerated ("gray-listed") bytes only.
 17749  	return Z_BINARY
 17750  }
 17751  
 17752  // ===========================================================================
 17753  // Reverse the first len bits of a code, using straightforward code (a faster
 17754  // method would use a table)
 17755  // IN assertion: 1 <= len <= 15
 17756  func bi_reverse(tls *libc.TLS, code uint32, len int32) uint32 { /* trees.c:1158:16: */
 17757  	var res uint32 = uint32(0)
 17758  	for ok := true; ok; ok = libc.PreDecInt32(&len, 1) > 0 {
 17759  		res = res | code&uint32(1)
 17760  		code >>= 1
 17761  		res <<= 1
 17762  	}
 17763  	return res >> 1
 17764  }
 17765  
 17766  // ===========================================================================
 17767  // Flush the bit buffer, keeping at most 7 bits in it.
 17768  func bi_flush(tls *libc.TLS, s uintptr) { /* trees.c:1173:12: */
 17769  	if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid == 16 {
 17770  		{
 17771  			{
 17772  				*(*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)
 17773  			}
 17774  			{
 17775  				*(*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)
 17776  			}
 17777  
 17778  		}
 17779  
 17780  		(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
 17781  		(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
 17782  	} else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid >= 8 {
 17783  		{
 17784  			*(*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)
 17785  		}
 17786  
 17787  		libc.AssignShrPtrUint16(s+5816, int(8))
 17788  		*(*int32)(unsafe.Pointer(s + 5820)) -= 8
 17789  	}
 17790  }
 17791  
 17792  // ===========================================================================
 17793  // Flush the bit buffer and align the output on a byte boundary
 17794  func bi_windup(tls *libc.TLS, s uintptr) { /* trees.c:1190:12: */
 17795  	if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 8 {
 17796  		{
 17797  			{
 17798  				*(*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)
 17799  			}
 17800  			{
 17801  				*(*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)
 17802  			}
 17803  
 17804  		}
 17805  
 17806  	} else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 {
 17807  		{
 17808  			*(*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)
 17809  		}
 17810  
 17811  	}
 17812  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
 17813  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
 17814  }
 17815  
 17816  // ===========================================================================
 17817  //      Decompresses the source buffer into the destination buffer.  *sourceLen is
 17818  //    the byte length of the source buffer. Upon entry, *destLen is the total size
 17819  //    of the destination buffer, which must be large enough to hold the entire
 17820  //    uncompressed data. (The size of the uncompressed data must have been saved
 17821  //    previously by the compressor and transmitted to the decompressor by some
 17822  //    mechanism outside the scope of this compression library.) Upon exit,
 17823  //    *destLen is the size of the decompressed data and *sourceLen is the number
 17824  //    of source bytes consumed. Upon return, source + *sourceLen points to the
 17825  //    first unused input byte.
 17826  //
 17827  //      uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough
 17828  //    memory, Z_BUF_ERROR if there was not enough room in the output buffer, or
 17829  //    Z_DATA_ERROR if the input data was corrupted, including if the input data is
 17830  //    an incomplete zlib stream.
 17831  func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) int32 { /* uncompr.c:27:13: */
 17832  	bp := tls.Alloc(60)
 17833  	defer tls.Free(60)
 17834  
 17835  	// var stream Z_stream at bp+4, 56
 17836  
 17837  	var err int32
 17838  	var max UInt = libc.Uint32(libc.Uint32FromInt32(-1))
 17839  	var len ULong
 17840  	var left ULong
 17841  	// var buf [1]Byte at bp, 1
 17842  	// for detection of incomplete stream when *destLen == 0
 17843  
 17844  	len = *(*ULong)(unsafe.Pointer(sourceLen))
 17845  	if *(*ULongf)(unsafe.Pointer(destLen)) != 0 {
 17846  		left = *(*ULongf)(unsafe.Pointer(destLen))
 17847  		*(*ULongf)(unsafe.Pointer(destLen)) = ULongf(0)
 17848  	} else {
 17849  		left = ULong(1)
 17850  		dest = bp /* &buf[0] */
 17851  	}
 17852  
 17853  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fnext_in = source
 17854  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_in = UInt(0)
 17855  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fzalloc = uintptr(0)
 17856  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fzfree = uintptr(0)
 17857  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fopaque = uintptr(0)
 17858  
 17859  	err = XinflateInit_(tls, bp+4, ts, int32(unsafe.Sizeof(Z_stream{})))
 17860  	if err != Z_OK {
 17861  		return err
 17862  	}
 17863  
 17864  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Fnext_out = dest
 17865  	(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_out = UInt(0)
 17866  
 17867  	for ok := true; ok; ok = err == Z_OK {
 17868  		if (*Z_stream)(unsafe.Pointer(bp+4)).Favail_out == UInt(0) {
 17869  			(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_out = func() uint32 {
 17870  				if left > ULong(max) {
 17871  					return max
 17872  				}
 17873  				return UInt(left)
 17874  			}()
 17875  			left = left - ULong((*Z_stream)(unsafe.Pointer(bp+4)).Favail_out)
 17876  		}
 17877  		if (*Z_stream)(unsafe.Pointer(bp+4)).Favail_in == UInt(0) {
 17878  			(*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Favail_in = func() uint32 {
 17879  				if len > ULong(max) {
 17880  					return max
 17881  				}
 17882  				return UInt(len)
 17883  			}()
 17884  			len = len - ULong((*Z_stream)(unsafe.Pointer(bp+4)).Favail_in)
 17885  		}
 17886  		err = Xinflate(tls, bp+4, Z_NO_FLUSH)
 17887  	}
 17888  
 17889  	*(*ULong)(unsafe.Pointer(sourceLen)) -= len + ULong((*Z_stream)(unsafe.Pointer(bp+4)).Favail_in)
 17890  	if dest != bp {
 17891  		*(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp + 4 /* &stream */)).Ftotal_out
 17892  	} else if (*Z_stream)(unsafe.Pointer(bp+4)).Ftotal_out != 0 && err == -5 {
 17893  		left = ULong(1)
 17894  	}
 17895  
 17896  	XinflateEnd(tls, bp+4)
 17897  	if err == Z_STREAM_END {
 17898  		return Z_OK
 17899  	}
 17900  	if err == Z_NEED_DICT {
 17901  		return -3
 17902  	}
 17903  	if err == -5 && left+ULong((*Z_stream)(unsafe.Pointer(bp+4)).Favail_out) != 0 {
 17904  		return -3
 17905  	}
 17906  	return err
 17907  }
 17908  
 17909  func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* uncompr.c:86:13: */
 17910  	bp := tls.Alloc(4)
 17911  	defer tls.Free(4)
 17912  	*(*ULong)(unsafe.Pointer(bp)) = sourceLen
 17913  
 17914  	return Xuncompress2(tls, dest, destLen, source, bp)
 17915  }
 17916  
 17917  // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
 17918  //    value -- needed when comparing unsigned to z_off64_t, which is signed
 17919  //    (possible z_off64_t types off_t, off64_t, and long are all signed)
 17920  
 17921  var Xz_errmsg = [10]uintptr{
 17922  	uintptr(ts + 876),
 17923  	uintptr(ts + 892),
 17924  	uintptr(ts + 101),
 17925  	uintptr(ts + 903),
 17926  	uintptr(ts + 914),
 17927  	uintptr(ts + 927),
 17928  	uintptr(ts + 938),
 17929  	uintptr(ts + 958),
 17930  	uintptr(ts + 971),
 17931  	uintptr(ts + 101),
 17932  } /* zutil.c:13:14 */
 17933  
 17934  func XzlibVersion(tls *libc.TLS) uintptr { /* zutil.c:27:12: */
 17935  	return ts /* "1.2.11" */
 17936  }
 17937  
 17938  func XzlibCompileFlags(tls *libc.TLS) ULong { /* zutil.c:32:15: */
 17939  	var flags ULong
 17940  
 17941  	flags = ULong(0)
 17942  	switch int32(unsafe.Sizeof(UInt(0))) {
 17943  	case 2:
 17944  		break
 17945  	case 4:
 17946  		flags = flags + ULong(1)
 17947  		break
 17948  	case 8:
 17949  		flags = flags + ULong(2)
 17950  		break
 17951  	default:
 17952  		flags = flags + ULong(3)
 17953  	}
 17954  	switch int32(unsafe.Sizeof(ULong(0))) {
 17955  	case 2:
 17956  		break
 17957  	case 4:
 17958  		flags = flags + ULong(int32(1)<<2)
 17959  		break
 17960  	case 8:
 17961  		flags = flags + ULong(int32(2)<<2)
 17962  		break
 17963  	default:
 17964  		flags = flags + ULong(int32(3)<<2)
 17965  	}
 17966  	switch int32(unsafe.Sizeof(Voidpf(0))) {
 17967  	case 2:
 17968  		break
 17969  	case 4:
 17970  		flags = flags + ULong(int32(1)<<4)
 17971  		break
 17972  	case 8:
 17973  		flags = flags + ULong(int32(2)<<4)
 17974  		break
 17975  	default:
 17976  		flags = flags + ULong(int32(3)<<4)
 17977  	}
 17978  	switch int32(unsafe.Sizeof(Off_t(0))) {
 17979  	case 2:
 17980  		break
 17981  	case 4:
 17982  		flags = flags + ULong(int32(1)<<6)
 17983  		break
 17984  	case 8:
 17985  		flags = flags + ULong(int32(2)<<6)
 17986  		break
 17987  	default:
 17988  		flags = flags + ULong(int32(3)<<6)
 17989  	}
 17990  	return flags
 17991  }
 17992  
 17993  // exported to allow conversion of error code to string for compress() and
 17994  // uncompress()
 17995  func XzError(tls *libc.TLS, err int32) uintptr { /* zutil.c:133:12: */
 17996  	return Xz_errmsg[Z_NEED_DICT-err]
 17997  }
 17998  
 17999  func Xzcalloc(tls *libc.TLS, opaque Voidpf, items uint32, size uint32) Voidpf { /* zutil.c:305:22: */
 18000  	_ = opaque
 18001  	if uint32(unsafe.Sizeof(UInt(0))) > uint32(2) {
 18002  		return libc.Xmalloc(tls, items*size)
 18003  	}
 18004  	return libc.Xcalloc(tls, items, size)
 18005  }
 18006  
 18007  func Xzcfree(tls *libc.TLS, opaque Voidpf, ptr Voidpf) { /* zutil.c:315:20: */
 18008  	_ = opaque
 18009  	libc.Xfree(tls, ptr)
 18010  }
 18011  
 18012  func init() {
 18013  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 8)) = deflate_stored  // deflate.c:136:29:
 18014  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 20)) = deflate_fast   // deflate.c:137:29:
 18015  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 32)) = deflate_fast   // deflate.c:138:29:
 18016  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 44)) = deflate_fast   // deflate.c:139:29:
 18017  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 56)) = deflate_slow   // deflate.c:141:29:
 18018  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 68)) = deflate_slow   // deflate.c:142:29:
 18019  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 80)) = deflate_slow   // deflate.c:143:29:
 18020  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 92)) = deflate_slow   // deflate.c:144:29:
 18021  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 104)) = deflate_slow  // deflate.c:145:30:
 18022  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 116)) = deflate_slow  // deflate.c:146:30:
 18023  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_bl_desc)) + 4 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_blbits)) // trees.c:132:22:
 18024  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_dtree)) // trees.c:129:2:
 18025  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 4 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_dbits))   // trees.c:129:16:
 18026  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_ltree)) // trees.c:126:2:
 18027  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 4 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_lbits))   // trees.c:126:16:
 18028  }
 18029  
 18030  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"
 18031  var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data