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

     1  // Code generated by 'ccgo -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -o lib/z_linux_arm64.go -pkgname z -trace-translation-units /tmp/go-generate-207913609/cdb.json libz.a', DO NOT EDIT.
     2  
     3  package z
     4  
     5  import (
     6  	"math"
     7  	"reflect"
     8  	"sync/atomic"
     9  	"unsafe"
    10  
    11  	"modernc.org/libc"
    12  	"modernc.org/libc/sys/types"
    13  )
    14  
    15  var _ = math.Pi
    16  var _ reflect.Kind
    17  var _ atomic.Value
    18  var _ unsafe.Pointer
    19  var _ types.Size_t
    20  
    21  const (
    22  	AIO_PRIO_DELTA_MAX                   = 20
    23  	BASE                                 = 65521
    24  	BC_BASE_MAX                          = 99
    25  	BC_DIM_MAX                           = 2048
    26  	BC_SCALE_MAX                         = 99
    27  	BC_STRING_MAX                        = 1000
    28  	BIG_ENDIAN                           = 4321
    29  	BYTE_ORDER                           = 1234
    30  	CHARCLASS_NAME_MAX                   = 2048
    31  	CHAR_BIT                             = 8
    32  	CHAR_MAX                             = 255
    33  	CHAR_MIN                             = 0
    34  	COLL_WEIGHTS_MAX                     = 255
    35  	DEF_MEM_LEVEL                        = 8
    36  	DEF_WBITS                            = 15
    37  	DELAYTIMER_MAX                       = 2147483647
    38  	DYN_TREES                            = 2
    39  	EXIT_FAILURE                         = 1
    40  	EXIT_SUCCESS                         = 0
    41  	EXPR_NEST_MAX                        = 32
    42  	FAR                                  = 0
    43  	FD_SETSIZE                           = 1024
    44  	F_LOCK                               = 1
    45  	F_OK                                 = 0
    46  	F_TEST                               = 3
    47  	F_TLOCK                              = 2
    48  	F_ULOCK                              = 0
    49  	HAVE_HIDDEN                          = 1
    50  	HAVE_MEMCPY                          = 0
    51  	HOST_NAME_MAX                        = 64
    52  	INT_MAX                              = 2147483647
    53  	INT_MIN                              = -2147483648
    54  	LINE_MAX                             = 2048
    55  	LITTLE_ENDIAN                        = 1234
    56  	LLONG_MAX                            = 9223372036854775807
    57  	LLONG_MIN                            = -9223372036854775808
    58  	LOGIN_NAME_MAX                       = 256
    59  	LONG_MAX                             = 9223372036854775807
    60  	LONG_MIN                             = -9223372036854775808
    61  	L_INCR                               = 1
    62  	L_SET                                = 0
    63  	L_XTND                               = 2
    64  	MAX_CANON                            = 255
    65  	MAX_INPUT                            = 255
    66  	MAX_MATCH                            = 258
    67  	MAX_MEM_LEVEL                        = 9
    68  	MAX_WBITS                            = 15
    69  	MB_LEN_MAX                           = 16
    70  	MIN_MATCH                            = 3
    71  	MQ_PRIO_MAX                          = 32768
    72  	NAME_MAX                             = 255
    73  	NGROUPS_MAX                          = 65536
    74  	NMAX                                 = 5552
    75  	OS_CODE                              = 3
    76  	PATH_MAX                             = 4096
    77  	PDP_ENDIAN                           = 3412
    78  	PIPE_BUF                             = 4096
    79  	PRESET_DICT                          = 0x20
    80  	PTHREAD_DESTRUCTOR_ITERATIONS        = 4
    81  	PTHREAD_KEYS_MAX                     = 1024
    82  	PTHREAD_STACK_MIN                    = 131072
    83  	RAND_MAX                             = 2147483647
    84  	RE_DUP_MAX                           = 32767
    85  	RTSIG_MAX                            = 32
    86  	R_OK                                 = 4
    87  	SCHAR_MAX                            = 127
    88  	SCHAR_MIN                            = -128
    89  	SEEK_CUR                             = 1
    90  	SEEK_END                             = 2
    91  	SEEK_SET                             = 0
    92  	SEM_VALUE_MAX                        = 2147483647
    93  	SHRT_MAX                             = 32767
    94  	SHRT_MIN                             = -32768
    95  	SSIZE_MAX                            = 9223372036854775807
    96  	STATIC_TREES                         = 1
    97  	STDC                                 = 0
    98  	STDC99                               = 0
    99  	STDERR_FILENO                        = 2
   100  	STDIN_FILENO                         = 0
   101  	STDOUT_FILENO                        = 1
   102  	STORED_BLOCK                         = 0
   103  	TTY_NAME_MAX                         = 32
   104  	UCHAR_MAX                            = 255
   105  	UINT_MAX                             = 4294967295
   106  	ULLONG_MAX                           = 18446744073709551615
   107  	ULONG_MAX                            = 18446744073709551615
   108  	USHRT_MAX                            = 65535
   109  	WCONTINUED                           = 8
   110  	WEXITED                              = 4
   111  	WNOHANG                              = 1
   112  	WNOWAIT                              = 0x01000000
   113  	WSTOPPED                             = 2
   114  	WUNTRACED                            = 2
   115  	W_OK                                 = 2
   116  	XATTR_LIST_MAX                       = 65536
   117  	XATTR_NAME_MAX                       = 255
   118  	XATTR_SIZE_MAX                       = 65536
   119  	X_OK                                 = 1
   120  	ZCONF_H                              = 0
   121  	ZEXPORT                              = 0
   122  	ZEXPORTVA                            = 0
   123  	ZLIB_H                               = 0
   124  	ZLIB_VERNUM                          = 0x12b0
   125  	ZLIB_VERSION                         = "1.2.11"
   126  	ZLIB_VER_MAJOR                       = 1
   127  	ZLIB_VER_MINOR                       = 2
   128  	ZLIB_VER_REVISION                    = 11
   129  	ZLIB_VER_SUBREVISION                 = 0
   130  	ZUTIL_H                              = 0
   131  	Z_ASCII                              = 1
   132  	Z_BEST_COMPRESSION                   = 9
   133  	Z_BEST_SPEED                         = 1
   134  	Z_BINARY                             = 0
   135  	Z_BLOCK                              = 5
   136  	Z_BUF_ERROR                          = -5
   137  	Z_DATA_ERROR                         = -3
   138  	Z_DEFAULT_COMPRESSION                = -1
   139  	Z_DEFAULT_STRATEGY                   = 0
   140  	Z_DEFLATED                           = 8
   141  	Z_ERRNO                              = -1
   142  	Z_FILTERED                           = 1
   143  	Z_FINISH                             = 4
   144  	Z_FIXED                              = 4
   145  	Z_FULL_FLUSH                         = 3
   146  	Z_HAVE_STDARG_H                      = 0
   147  	Z_HAVE_UNISTD_H                      = 0
   148  	Z_HUFFMAN_ONLY                       = 2
   149  	Z_LARGE64                            = 0
   150  	Z_LFS64                              = 0
   151  	Z_MEM_ERROR                          = -4
   152  	Z_NEED_DICT                          = 2
   153  	Z_NO_COMPRESSION                     = 0
   154  	Z_NO_FLUSH                           = 0
   155  	Z_NULL                               = 0
   156  	Z_OK                                 = 0
   157  	Z_PARTIAL_FLUSH                      = 1
   158  	Z_RLE                                = 3
   159  	Z_STREAM_END                         = 1
   160  	Z_STREAM_ERROR                       = -2
   161  	Z_SYNC_FLUSH                         = 2
   162  	Z_TEXT                               = 1
   163  	Z_TREES                              = 6
   164  	Z_UNKNOWN                            = 2
   165  	Z_VERSION_ERROR                      = -6
   166  	Z_WANT64                             = 0
   167  	X_ALLOCA_H                           = 1
   168  	X_ANSI_STDARG_H_                     = 0
   169  	X_ANSI_STDDEF_H                      = 0
   170  	X_ATFILE_SOURCE                      = 1
   171  	X_BITS_BYTESWAP_H                    = 1
   172  	X_BITS_FLOATN_COMMON_H               = 0
   173  	X_BITS_FLOATN_H                      = 0
   174  	X_BITS_POSIX1_LIM_H                  = 1
   175  	X_BITS_POSIX2_LIM_H                  = 1
   176  	X_BITS_POSIX_OPT_H                   = 1
   177  	X_BITS_PTHREADTYPES_ARCH_H           = 1
   178  	X_BITS_PTHREADTYPES_COMMON_H         = 1
   179  	X_BITS_STDINT_INTN_H                 = 1
   180  	X_BITS_TYPESIZES_H                   = 1
   181  	X_BITS_TYPES_H                       = 1
   182  	X_BITS_TYPES_LOCALE_T_H              = 1
   183  	X_BITS_TYPES___LOCALE_T_H            = 1
   184  	X_BITS_UINTN_IDENTITY_H              = 1
   185  	X_BSD_PTRDIFF_T_                     = 0
   186  	X_BSD_SIZE_T_                        = 0
   187  	X_BSD_SIZE_T_DEFINED_                = 0
   188  	X_DEFAULT_SOURCE                     = 1
   189  	X_ENDIAN_H                           = 1
   190  	X_FEATURES_H                         = 1
   191  	X_FILE_OFFSET_BITS                   = 64
   192  	X_GCC_LIMITS_H_                      = 0
   193  	X_GCC_MAX_ALIGN_T                    = 0
   194  	X_GCC_PTRDIFF_T                      = 0
   195  	X_GCC_SIZE_T                         = 0
   196  	X_GCC_WCHAR_T                        = 0
   197  	X_GETOPT_CORE_H                      = 1
   198  	X_GETOPT_POSIX_H                     = 1
   199  	X_LARGEFILE64_SOURCE                 = 1
   200  	X_LFS64_ASYNCHRONOUS_IO              = 1
   201  	X_LFS64_LARGEFILE                    = 1
   202  	X_LFS64_STDIO                        = 1
   203  	X_LFS_ASYNCHRONOUS_IO                = 1
   204  	X_LFS_LARGEFILE                      = 1
   205  	X_LIBC_LIMITS_H_                     = 1
   206  	X_LIMITS_H___                        = 0
   207  	X_LINUX_LIMITS_H                     = 0
   208  	X_LP64                               = 1
   209  	X_POSIX2_BC_BASE_MAX                 = 99
   210  	X_POSIX2_BC_DIM_MAX                  = 2048
   211  	X_POSIX2_BC_SCALE_MAX                = 99
   212  	X_POSIX2_BC_STRING_MAX               = 1000
   213  	X_POSIX2_CHARCLASS_NAME_MAX          = 14
   214  	X_POSIX2_CHAR_TERM                   = 200809
   215  	X_POSIX2_COLL_WEIGHTS_MAX            = 2
   216  	X_POSIX2_C_BIND                      = 200809
   217  	X_POSIX2_C_DEV                       = 200809
   218  	X_POSIX2_C_VERSION                   = 200809
   219  	X_POSIX2_EXPR_NEST_MAX               = 32
   220  	X_POSIX2_LINE_MAX                    = 2048
   221  	X_POSIX2_LOCALEDEF                   = 200809
   222  	X_POSIX2_RE_DUP_MAX                  = 255
   223  	X_POSIX2_SW_DEV                      = 200809
   224  	X_POSIX2_VERSION                     = 200809
   225  	X_POSIX_ADVISORY_INFO                = 200809
   226  	X_POSIX_AIO_LISTIO_MAX               = 2
   227  	X_POSIX_AIO_MAX                      = 1
   228  	X_POSIX_ARG_MAX                      = 4096
   229  	X_POSIX_ASYNCHRONOUS_IO              = 200809
   230  	X_POSIX_ASYNC_IO                     = 1
   231  	X_POSIX_BARRIERS                     = 200809
   232  	X_POSIX_CHILD_MAX                    = 25
   233  	X_POSIX_CHOWN_RESTRICTED             = 0
   234  	X_POSIX_CLOCKRES_MIN                 = 20000000
   235  	X_POSIX_CLOCK_SELECTION              = 200809
   236  	X_POSIX_CPUTIME                      = 0
   237  	X_POSIX_C_SOURCE                     = 200809
   238  	X_POSIX_DELAYTIMER_MAX               = 32
   239  	X_POSIX_FSYNC                        = 200809
   240  	X_POSIX_HOST_NAME_MAX                = 255
   241  	X_POSIX_IPV6                         = 200809
   242  	X_POSIX_JOB_CONTROL                  = 1
   243  	X_POSIX_LINK_MAX                     = 8
   244  	X_POSIX_LOGIN_NAME_MAX               = 9
   245  	X_POSIX_MAPPED_FILES                 = 200809
   246  	X_POSIX_MAX_CANON                    = 255
   247  	X_POSIX_MAX_INPUT                    = 255
   248  	X_POSIX_MEMLOCK                      = 200809
   249  	X_POSIX_MEMLOCK_RANGE                = 200809
   250  	X_POSIX_MEMORY_PROTECTION            = 200809
   251  	X_POSIX_MESSAGE_PASSING              = 200809
   252  	X_POSIX_MONOTONIC_CLOCK              = 0
   253  	X_POSIX_MQ_OPEN_MAX                  = 8
   254  	X_POSIX_MQ_PRIO_MAX                  = 32
   255  	X_POSIX_NAME_MAX                     = 14
   256  	X_POSIX_NGROUPS_MAX                  = 8
   257  	X_POSIX_NO_TRUNC                     = 1
   258  	X_POSIX_OPEN_MAX                     = 20
   259  	X_POSIX_PATH_MAX                     = 256
   260  	X_POSIX_PIPE_BUF                     = 512
   261  	X_POSIX_PRIORITIZED_IO               = 200809
   262  	X_POSIX_PRIORITY_SCHEDULING          = 200809
   263  	X_POSIX_RAW_SOCKETS                  = 200809
   264  	X_POSIX_READER_WRITER_LOCKS          = 200809
   265  	X_POSIX_REALTIME_SIGNALS             = 200809
   266  	X_POSIX_REENTRANT_FUNCTIONS          = 1
   267  	X_POSIX_REGEXP                       = 1
   268  	X_POSIX_RE_DUP_MAX                   = 255
   269  	X_POSIX_RTSIG_MAX                    = 8
   270  	X_POSIX_SAVED_IDS                    = 1
   271  	X_POSIX_SEMAPHORES                   = 200809
   272  	X_POSIX_SEM_NSEMS_MAX                = 256
   273  	X_POSIX_SEM_VALUE_MAX                = 32767
   274  	X_POSIX_SHARED_MEMORY_OBJECTS        = 200809
   275  	X_POSIX_SHELL                        = 1
   276  	X_POSIX_SIGQUEUE_MAX                 = 32
   277  	X_POSIX_SOURCE                       = 1
   278  	X_POSIX_SPAWN                        = 200809
   279  	X_POSIX_SPIN_LOCKS                   = 200809
   280  	X_POSIX_SPORADIC_SERVER              = -1
   281  	X_POSIX_SSIZE_MAX                    = 32767
   282  	X_POSIX_STREAM_MAX                   = 8
   283  	X_POSIX_SYMLINK_MAX                  = 255
   284  	X_POSIX_SYMLOOP_MAX                  = 8
   285  	X_POSIX_SYNCHRONIZED_IO              = 200809
   286  	X_POSIX_THREADS                      = 200809
   287  	X_POSIX_THREAD_ATTR_STACKADDR        = 200809
   288  	X_POSIX_THREAD_ATTR_STACKSIZE        = 200809
   289  	X_POSIX_THREAD_CPUTIME               = 0
   290  	X_POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
   291  	X_POSIX_THREAD_KEYS_MAX              = 128
   292  	X_POSIX_THREAD_PRIORITY_SCHEDULING   = 200809
   293  	X_POSIX_THREAD_PRIO_INHERIT          = 200809
   294  	X_POSIX_THREAD_PRIO_PROTECT          = 200809
   295  	X_POSIX_THREAD_PROCESS_SHARED        = 200809
   296  	X_POSIX_THREAD_ROBUST_PRIO_INHERIT   = 200809
   297  	X_POSIX_THREAD_ROBUST_PRIO_PROTECT   = -1
   298  	X_POSIX_THREAD_SAFE_FUNCTIONS        = 200809
   299  	X_POSIX_THREAD_SPORADIC_SERVER       = -1
   300  	X_POSIX_THREAD_THREADS_MAX           = 64
   301  	X_POSIX_TIMEOUTS                     = 200809
   302  	X_POSIX_TIMERS                       = 200809
   303  	X_POSIX_TIMER_MAX                    = 32
   304  	X_POSIX_TRACE                        = -1
   305  	X_POSIX_TRACE_EVENT_FILTER           = -1
   306  	X_POSIX_TRACE_INHERIT                = -1
   307  	X_POSIX_TRACE_LOG                    = -1
   308  	X_POSIX_TTY_NAME_MAX                 = 9
   309  	X_POSIX_TYPED_MEMORY_OBJECTS         = -1
   310  	X_POSIX_TZNAME_MAX                   = 6
   311  	X_POSIX_V6_ILP32_OFF32               = -1
   312  	X_POSIX_V6_ILP32_OFFBIG              = -1
   313  	X_POSIX_V6_LP64_OFF64                = 1
   314  	X_POSIX_V6_LPBIG_OFFBIG              = -1
   315  	X_POSIX_V7_ILP32_OFF32               = -1
   316  	X_POSIX_V7_ILP32_OFFBIG              = -1
   317  	X_POSIX_V7_LP64_OFF64                = 1
   318  	X_POSIX_V7_LPBIG_OFFBIG              = -1
   319  	X_POSIX_VDISABLE                     = 0
   320  	X_POSIX_VERSION                      = 200809
   321  	X_PTRDIFF_T                          = 0
   322  	X_PTRDIFF_T_                         = 0
   323  	X_PTRDIFF_T_DECLARED                 = 0
   324  	X_SIZET_                             = 0
   325  	X_SIZE_T                             = 0
   326  	X_SIZE_T_                            = 0
   327  	X_SIZE_T_DECLARED                    = 0
   328  	X_SIZE_T_DEFINED                     = 0
   329  	X_SIZE_T_DEFINED_                    = 0
   330  	X_STDARG_H                           = 0
   331  	X_STDC_PREDEF_H                      = 1
   332  	X_STDDEF_H                           = 0
   333  	X_STDDEF_H_                          = 0
   334  	X_STDLIB_H                           = 1
   335  	X_STRINGS_H                          = 1
   336  	X_STRING_H                           = 1
   337  	X_STRUCT_TIMESPEC                    = 1
   338  	X_SYS_CDEFS_H                        = 1
   339  	X_SYS_SELECT_H                       = 1
   340  	X_SYS_SIZE_T_H                       = 0
   341  	X_SYS_TYPES_H                        = 1
   342  	X_THREAD_SHARED_TYPES_H              = 1
   343  	X_T_PTRDIFF                          = 0
   344  	X_T_PTRDIFF_                         = 0
   345  	X_T_SIZE                             = 0
   346  	X_T_SIZE_                            = 0
   347  	X_T_WCHAR                            = 0
   348  	X_T_WCHAR_                           = 0
   349  	X_UNISTD_H                           = 1
   350  	X_VA_LIST                            = 0
   351  	X_VA_LIST_                           = 0
   352  	X_VA_LIST_DEFINED                    = 0
   353  	X_VA_LIST_T_H                        = 0
   354  	X_WCHAR_T                            = 0
   355  	X_WCHAR_T_                           = 0
   356  	X_WCHAR_T_DECLARED                   = 0
   357  	X_WCHAR_T_DEFINED                    = 0
   358  	X_WCHAR_T_DEFINED_                   = 0
   359  	X_WCHAR_T_H                          = 0
   360  	X_XBS5_ILP32_OFF32                   = -1
   361  	X_XBS5_ILP32_OFFBIG                  = -1
   362  	X_XBS5_LP64_OFF64                    = 1
   363  	X_XBS5_LPBIG_OFFBIG                  = -1
   364  	X_XOPEN_ENH_I18N                     = 1
   365  	X_XOPEN_LEGACY                       = 1
   366  	X_XOPEN_REALTIME                     = 1
   367  	X_XOPEN_REALTIME_THREADS             = 1
   368  	X_XOPEN_SHM                          = 1
   369  	X_XOPEN_UNIX                         = 1
   370  	X_XOPEN_VERSION                      = 700
   371  	X_XOPEN_XCU_VERSION                  = 4
   372  	X_XOPEN_XPG2                         = 1
   373  	X_XOPEN_XPG3                         = 1
   374  	X_XOPEN_XPG4                         = 1
   375  	Linux                                = 1
   376  	Unix                                 = 1
   377  	Z_const                              = 0
   378  	BYFOUR                               = 0
   379  	GF2_DIM                              = 32
   380  	TBLS                                 = 8
   381  	BL_CODES                             = 19
   382  	BUSY_STATE                           = 113
   383  	Buf_size                             = 16
   384  	COMMENT_STATE                        = 91
   385  	DEFLATE_H                            = 0
   386  	D_CODES                              = 30
   387  	EXTRA_STATE                          = 69
   388  	FINISH_STATE                         = 666
   389  	GZIP                                 = 0
   390  	GZIP_STATE                           = 57
   391  	HCRC_STATE                           = 103
   392  	HEAP_SIZE                            = 573
   393  	INIT_STATE                           = 42
   394  	LENGTH_CODES                         = 29
   395  	LITERALS                             = 256
   396  	L_CODES                              = 286
   397  	MAX_BITS                             = 15
   398  	MAX_STORED                           = 65535
   399  	MIN_LOOKAHEAD                        = 262
   400  	NAME_STATE                           = 73
   401  	NIL                                  = 0
   402  	TOO_FAR                              = 4096
   403  	WIN_INIT                             = 258
   404  	AT_EACCESS                           = 0x200
   405  	AT_FDCWD                             = -100
   406  	AT_REMOVEDIR                         = 0x200
   407  	AT_SYMLINK_FOLLOW                    = 0x400
   408  	AT_SYMLINK_NOFOLLOW                  = 0x100
   409  	BUFSIZ                               = 8192
   410  	COPY1                                = 1
   411  	E2BIG                                = 7
   412  	EACCES                               = 13
   413  	EADDRINUSE                           = 98
   414  	EADDRNOTAVAIL                        = 99
   415  	EADV                                 = 68
   416  	EAFNOSUPPORT                         = 97
   417  	EAGAIN                               = 11
   418  	EALREADY                             = 114
   419  	EBADE                                = 52
   420  	EBADF                                = 9
   421  	EBADFD                               = 77
   422  	EBADMSG                              = 74
   423  	EBADR                                = 53
   424  	EBADRQC                              = 56
   425  	EBADSLT                              = 57
   426  	EBFONT                               = 59
   427  	EBUSY                                = 16
   428  	ECANCELED                            = 125
   429  	ECHILD                               = 10
   430  	ECHRNG                               = 44
   431  	ECOMM                                = 70
   432  	ECONNABORTED                         = 103
   433  	ECONNREFUSED                         = 111
   434  	ECONNRESET                           = 104
   435  	EDEADLK                              = 35
   436  	EDEADLOCK                            = 35
   437  	EDESTADDRREQ                         = 89
   438  	EDOM                                 = 33
   439  	EDOTDOT                              = 73
   440  	EDQUOT                               = 122
   441  	EEXIST                               = 17
   442  	EFAULT                               = 14
   443  	EFBIG                                = 27
   444  	EHOSTDOWN                            = 112
   445  	EHOSTUNREACH                         = 113
   446  	EHWPOISON                            = 133
   447  	EIDRM                                = 43
   448  	EILSEQ                               = 84
   449  	EINPROGRESS                          = 115
   450  	EINTR                                = 4
   451  	EINVAL                               = 22
   452  	EIO                                  = 5
   453  	EISCONN                              = 106
   454  	EISDIR                               = 21
   455  	EISNAM                               = 120
   456  	EKEYEXPIRED                          = 127
   457  	EKEYREJECTED                         = 129
   458  	EKEYREVOKED                          = 128
   459  	EL2HLT                               = 51
   460  	EL2NSYNC                             = 45
   461  	EL3HLT                               = 46
   462  	EL3RST                               = 47
   463  	ELIBACC                              = 79
   464  	ELIBBAD                              = 80
   465  	ELIBEXEC                             = 83
   466  	ELIBMAX                              = 82
   467  	ELIBSCN                              = 81
   468  	ELNRNG                               = 48
   469  	ELOOP                                = 40
   470  	EMEDIUMTYPE                          = 124
   471  	EMFILE                               = 24
   472  	EMLINK                               = 31
   473  	EMSGSIZE                             = 90
   474  	EMULTIHOP                            = 72
   475  	ENAMETOOLONG                         = 36
   476  	ENAVAIL                              = 119
   477  	ENETDOWN                             = 100
   478  	ENETRESET                            = 102
   479  	ENETUNREACH                          = 101
   480  	ENFILE                               = 23
   481  	ENOANO                               = 55
   482  	ENOBUFS                              = 105
   483  	ENOCSI                               = 50
   484  	ENODATA                              = 61
   485  	ENODEV                               = 19
   486  	ENOENT                               = 2
   487  	ENOEXEC                              = 8
   488  	ENOKEY                               = 126
   489  	ENOLCK                               = 37
   490  	ENOLINK                              = 67
   491  	ENOMEDIUM                            = 123
   492  	ENOMEM                               = 12
   493  	ENOMSG                               = 42
   494  	ENONET                               = 64
   495  	ENOPKG                               = 65
   496  	ENOPROTOOPT                          = 92
   497  	ENOSPC                               = 28
   498  	ENOSR                                = 63
   499  	ENOSTR                               = 60
   500  	ENOSYS                               = 38
   501  	ENOTBLK                              = 15
   502  	ENOTCONN                             = 107
   503  	ENOTDIR                              = 20
   504  	ENOTEMPTY                            = 39
   505  	ENOTNAM                              = 118
   506  	ENOTRECOVERABLE                      = 131
   507  	ENOTSOCK                             = 88
   508  	ENOTSUP                              = 95
   509  	ENOTTY                               = 25
   510  	ENOTUNIQ                             = 76
   511  	ENXIO                                = 6
   512  	EOF                                  = -1
   513  	EOPNOTSUPP                           = 95
   514  	EOVERFLOW                            = 75
   515  	EOWNERDEAD                           = 130
   516  	EPERM                                = 1
   517  	EPFNOSUPPORT                         = 96
   518  	EPIPE                                = 32
   519  	EPROTO                               = 71
   520  	EPROTONOSUPPORT                      = 93
   521  	EPROTOTYPE                           = 91
   522  	ERANGE                               = 34
   523  	EREMCHG                              = 78
   524  	EREMOTE                              = 66
   525  	EREMOTEIO                            = 121
   526  	ERESTART                             = 85
   527  	ERFKILL                              = 132
   528  	EROFS                                = 30
   529  	ESHUTDOWN                            = 108
   530  	ESOCKTNOSUPPORT                      = 94
   531  	ESPIPE                               = 29
   532  	ESRCH                                = 3
   533  	ESRMNT                               = 69
   534  	ESTALE                               = 116
   535  	ESTRPIPE                             = 86
   536  	ETIME                                = 62
   537  	ETIMEDOUT                            = 110
   538  	ETOOMANYREFS                         = 109
   539  	ETXTBSY                              = 26
   540  	EUCLEAN                              = 117
   541  	EUNATCH                              = 49
   542  	EUSERS                               = 87
   543  	EWOULDBLOCK                          = 11
   544  	EXDEV                                = 18
   545  	EXFULL                               = 54
   546  	FAPPEND                              = 1024
   547  	FASYNC                               = 8192
   548  	FD_CLOEXEC                           = 1
   549  	FFSYNC                               = 1052672
   550  	FILENAME_MAX                         = 4096
   551  	FNDELAY                              = 2048
   552  	FNONBLOCK                            = 2048
   553  	FOPEN_MAX                            = 16
   554  	F_DUPFD                              = 0
   555  	F_DUPFD_CLOEXEC                      = 1030
   556  	F_EXLCK                              = 4
   557  	F_GETFD                              = 1
   558  	F_GETFL                              = 3
   559  	F_GETLK                              = 5
   560  	F_GETLK64                            = 5
   561  	F_GETOWN                             = 9
   562  	F_RDLCK                              = 0
   563  	F_SETFD                              = 2
   564  	F_SETFL                              = 4
   565  	F_SETLK                              = 6
   566  	F_SETLK64                            = 6
   567  	F_SETLKW                             = 7
   568  	F_SETLKW64                           = 7
   569  	F_SETOWN                             = 8
   570  	F_SHLCK                              = 8
   571  	F_UNLCK                              = 2
   572  	F_WRLCK                              = 1
   573  	GZBUFSIZE                            = 8192
   574  	GZ_APPEND                            = 1
   575  	GZ_NONE                              = 0
   576  	GZ_READ                              = 7247
   577  	GZ_WRITE                             = 31153
   578  	HAVE_VSNPRINTF                       = 0
   579  	LOCK_EX                              = 2
   580  	LOCK_NB                              = 4
   581  	LOCK_SH                              = 1
   582  	LOCK_UN                              = 8
   583  	LOOK                                 = 0
   584  	L_ctermid                            = 9
   585  	L_tmpnam                             = 20
   586  	O_ACCMODE                            = 0003
   587  	O_APPEND                             = 02000
   588  	O_ASYNC                              = 020000
   589  	O_CLOEXEC                            = 524288
   590  	O_CREAT                              = 0100
   591  	O_DIRECTORY                          = 16384
   592  	O_DSYNC                              = 4096
   593  	O_EXCL                               = 0200
   594  	O_FSYNC                              = 1052672
   595  	O_LARGEFILE                          = 0
   596  	O_NDELAY                             = 2048
   597  	O_NOCTTY                             = 0400
   598  	O_NOFOLLOW                           = 32768
   599  	O_NONBLOCK                           = 04000
   600  	O_RDONLY                             = 00
   601  	O_RDWR                               = 02
   602  	O_RSYNC                              = 1052672
   603  	O_SYNC                               = 04010000
   604  	O_TRUNC                              = 01000
   605  	O_WRONLY                             = 01
   606  	POSIX_FADV_DONTNEED                  = 4
   607  	POSIX_FADV_NOREUSE                   = 5
   608  	POSIX_FADV_NORMAL                    = 0
   609  	POSIX_FADV_RANDOM                    = 1
   610  	POSIX_FADV_SEQUENTIAL                = 2
   611  	POSIX_FADV_WILLNEED                  = 3
   612  	P_tmpdir                             = "/tmp"
   613  	S_IFBLK                              = 24576
   614  	S_IFCHR                              = 8192
   615  	S_IFDIR                              = 16384
   616  	S_IFIFO                              = 4096
   617  	S_IFLNK                              = 40960
   618  	S_IFMT                               = 61440
   619  	S_IFREG                              = 32768
   620  	S_IFSOCK                             = 49152
   621  	S_IRGRP                              = 32
   622  	S_IROTH                              = 4
   623  	S_IRUSR                              = 256
   624  	S_IRWXG                              = 56
   625  	S_IRWXO                              = 7
   626  	S_IRWXU                              = 448
   627  	S_ISGID                              = 1024
   628  	S_ISUID                              = 2048
   629  	S_ISVTX                              = 512
   630  	S_IWGRP                              = 16
   631  	S_IWOTH                              = 2
   632  	S_IWUSR                              = 128
   633  	S_IXGRP                              = 8
   634  	S_IXOTH                              = 1
   635  	S_IXUSR                              = 64
   636  	TMP_MAX                              = 238328
   637  	UTIME_NOW                            = 1073741823
   638  	UTIME_OMIT                           = 1073741822
   639  	X_ASM_GENERIC_ERRNO_BASE_H           = 0
   640  	X_ASM_GENERIC_ERRNO_H                = 0
   641  	X_BITS_ERRNO_H                       = 1
   642  	X_BITS_STAT_H                        = 1
   643  	X_BITS_STDIO_LIM_H                   = 1
   644  	X_ERRNO_H                            = 1
   645  	X_FCNTL_H                            = 1
   646  	X_IOFBF                              = 0
   647  	X_IOLBF                              = 1
   648  	X_IONBF                              = 2
   649  	X_IO_EOF_SEEN                        = 0x0010
   650  	X_IO_ERR_SEEN                        = 0x0020
   651  	X_IO_USER_LOCK                       = 0x8000
   652  	X_LARGEFILE_SOURCE                   = 1
   653  	X_MKNOD_VER_LINUX                    = 0
   654  	X_STATBUF_ST_BLKSIZE                 = 0
   655  	X_STATBUF_ST_NSEC                    = 0
   656  	X_STATBUF_ST_RDEV                    = 0
   657  	X_STAT_VER                           = 0
   658  	X_STAT_VER_KERNEL                    = 0
   659  	X_STAT_VER_LINUX                     = 0
   660  	X_STDIO_H                            = 1
   661  	ENOUGH                               = 1444
   662  	ENOUGH_DISTS                         = 592
   663  	ENOUGH_LENS                          = 852
   664  	GUNZIP                               = 0
   665  	MAXBITS                              = 15
   666  	DIST_CODE_LEN                        = 512
   667  	END_BLOCK                            = 256
   668  	MAX_BL_BITS                          = 7
   669  	REPZ_11_138                          = 18
   670  	REPZ_3_10                            = 17
   671  	REP_3_6                              = 16
   672  	SMALLEST                             = 1
   673  )
   674  
   675  // Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf';
   676  //    the `_SC_*' symbols for the NAME argument to `sysconf';
   677  //    and the `_CS_*' symbols for the NAME argument to `confstr'.
   678  // `sysconf', `pathconf', and `confstr' NAME values.  Generic version.
   679  //    Copyright (C) 1993-2018 Free Software Foundation, Inc.
   680  //    This file is part of the GNU C Library.
   681  //
   682  //    The GNU C Library is free software; you can redistribute it and/or
   683  //    modify it under the terms of the GNU Lesser General Public
   684  //    License as published by the Free Software Foundation; either
   685  //    version 2.1 of the License, or (at your option) any later version.
   686  //
   687  //    The GNU C Library is distributed in the hope that it will be useful,
   688  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
   689  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   690  //    Lesser General Public License for more details.
   691  //
   692  //    You should have received a copy of the GNU Lesser General Public
   693  //    License along with the GNU C Library; if not, see
   694  //    <http://www.gnu.org/licenses/>.
   695  
   696  // Values for the NAME argument to `pathconf' and `fpathconf'.
   697  const ( /* confname.h:24:1: */
   698  	X_PC_LINK_MAX           = 0
   699  	X_PC_MAX_CANON          = 1
   700  	X_PC_MAX_INPUT          = 2
   701  	X_PC_NAME_MAX           = 3
   702  	X_PC_PATH_MAX           = 4
   703  	X_PC_PIPE_BUF           = 5
   704  	X_PC_CHOWN_RESTRICTED   = 6
   705  	X_PC_NO_TRUNC           = 7
   706  	X_PC_VDISABLE           = 8
   707  	X_PC_SYNC_IO            = 9
   708  	X_PC_ASYNC_IO           = 10
   709  	X_PC_PRIO_IO            = 11
   710  	X_PC_SOCK_MAXBUF        = 12
   711  	X_PC_FILESIZEBITS       = 13
   712  	X_PC_REC_INCR_XFER_SIZE = 14
   713  	X_PC_REC_MAX_XFER_SIZE  = 15
   714  	X_PC_REC_MIN_XFER_SIZE  = 16
   715  	X_PC_REC_XFER_ALIGN     = 17
   716  	X_PC_ALLOC_SIZE_MIN     = 18
   717  	X_PC_SYMLINK_MAX        = 19
   718  	X_PC_2_SYMLINKS         = 20
   719  )
   720  
   721  // Values for the NAME argument to `confstr'.
   722  const ( /* confname.h:533:1: */
   723  	X_CS_PATH = 0 // The default search path.
   724  
   725  	X_CS_V6_WIDTH_RESTRICTED_ENVS = 1
   726  
   727  	X_CS_GNU_LIBC_VERSION       = 2
   728  	X_CS_GNU_LIBPTHREAD_VERSION = 3
   729  
   730  	X_CS_V5_WIDTH_RESTRICTED_ENVS = 4
   731  
   732  	X_CS_V7_WIDTH_RESTRICTED_ENVS = 5
   733  
   734  	X_CS_LFS_CFLAGS      = 1000
   735  	X_CS_LFS_LDFLAGS     = 1001
   736  	X_CS_LFS_LIBS        = 1002
   737  	X_CS_LFS_LINTFLAGS   = 1003
   738  	X_CS_LFS64_CFLAGS    = 1004
   739  	X_CS_LFS64_LDFLAGS   = 1005
   740  	X_CS_LFS64_LIBS      = 1006
   741  	X_CS_LFS64_LINTFLAGS = 1007
   742  
   743  	X_CS_XBS5_ILP32_OFF32_CFLAGS     = 1100
   744  	X_CS_XBS5_ILP32_OFF32_LDFLAGS    = 1101
   745  	X_CS_XBS5_ILP32_OFF32_LIBS       = 1102
   746  	X_CS_XBS5_ILP32_OFF32_LINTFLAGS  = 1103
   747  	X_CS_XBS5_ILP32_OFFBIG_CFLAGS    = 1104
   748  	X_CS_XBS5_ILP32_OFFBIG_LDFLAGS   = 1105
   749  	X_CS_XBS5_ILP32_OFFBIG_LIBS      = 1106
   750  	X_CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 1107
   751  	X_CS_XBS5_LP64_OFF64_CFLAGS      = 1108
   752  	X_CS_XBS5_LP64_OFF64_LDFLAGS     = 1109
   753  	X_CS_XBS5_LP64_OFF64_LIBS        = 1110
   754  	X_CS_XBS5_LP64_OFF64_LINTFLAGS   = 1111
   755  	X_CS_XBS5_LPBIG_OFFBIG_CFLAGS    = 1112
   756  	X_CS_XBS5_LPBIG_OFFBIG_LDFLAGS   = 1113
   757  	X_CS_XBS5_LPBIG_OFFBIG_LIBS      = 1114
   758  	X_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 1115
   759  
   760  	X_CS_POSIX_V6_ILP32_OFF32_CFLAGS     = 1116
   761  	X_CS_POSIX_V6_ILP32_OFF32_LDFLAGS    = 1117
   762  	X_CS_POSIX_V6_ILP32_OFF32_LIBS       = 1118
   763  	X_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS  = 1119
   764  	X_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS    = 1120
   765  	X_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS   = 1121
   766  	X_CS_POSIX_V6_ILP32_OFFBIG_LIBS      = 1122
   767  	X_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 1123
   768  	X_CS_POSIX_V6_LP64_OFF64_CFLAGS      = 1124
   769  	X_CS_POSIX_V6_LP64_OFF64_LDFLAGS     = 1125
   770  	X_CS_POSIX_V6_LP64_OFF64_LIBS        = 1126
   771  	X_CS_POSIX_V6_LP64_OFF64_LINTFLAGS   = 1127
   772  	X_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS    = 1128
   773  	X_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS   = 1129
   774  	X_CS_POSIX_V6_LPBIG_OFFBIG_LIBS      = 1130
   775  	X_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 1131
   776  
   777  	X_CS_POSIX_V7_ILP32_OFF32_CFLAGS     = 1132
   778  	X_CS_POSIX_V7_ILP32_OFF32_LDFLAGS    = 1133
   779  	X_CS_POSIX_V7_ILP32_OFF32_LIBS       = 1134
   780  	X_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS  = 1135
   781  	X_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS    = 1136
   782  	X_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS   = 1137
   783  	X_CS_POSIX_V7_ILP32_OFFBIG_LIBS      = 1138
   784  	X_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS = 1139
   785  	X_CS_POSIX_V7_LP64_OFF64_CFLAGS      = 1140
   786  	X_CS_POSIX_V7_LP64_OFF64_LDFLAGS     = 1141
   787  	X_CS_POSIX_V7_LP64_OFF64_LIBS        = 1142
   788  	X_CS_POSIX_V7_LP64_OFF64_LINTFLAGS   = 1143
   789  	X_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS    = 1144
   790  	X_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS   = 1145
   791  	X_CS_POSIX_V7_LPBIG_OFFBIG_LIBS      = 1146
   792  	X_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS = 1147
   793  
   794  	X_CS_V6_ENV = 1148
   795  	X_CS_V7_ENV = 1149
   796  )
   797  
   798  // Values for the argument to `sysconf'.
   799  const ( /* confname.h:71:1: */
   800  	X_SC_ARG_MAX               = 0
   801  	X_SC_CHILD_MAX             = 1
   802  	X_SC_CLK_TCK               = 2
   803  	X_SC_NGROUPS_MAX           = 3
   804  	X_SC_OPEN_MAX              = 4
   805  	X_SC_STREAM_MAX            = 5
   806  	X_SC_TZNAME_MAX            = 6
   807  	X_SC_JOB_CONTROL           = 7
   808  	X_SC_SAVED_IDS             = 8
   809  	X_SC_REALTIME_SIGNALS      = 9
   810  	X_SC_PRIORITY_SCHEDULING   = 10
   811  	X_SC_TIMERS                = 11
   812  	X_SC_ASYNCHRONOUS_IO       = 12
   813  	X_SC_PRIORITIZED_IO        = 13
   814  	X_SC_SYNCHRONIZED_IO       = 14
   815  	X_SC_FSYNC                 = 15
   816  	X_SC_MAPPED_FILES          = 16
   817  	X_SC_MEMLOCK               = 17
   818  	X_SC_MEMLOCK_RANGE         = 18
   819  	X_SC_MEMORY_PROTECTION     = 19
   820  	X_SC_MESSAGE_PASSING       = 20
   821  	X_SC_SEMAPHORES            = 21
   822  	X_SC_SHARED_MEMORY_OBJECTS = 22
   823  	X_SC_AIO_LISTIO_MAX        = 23
   824  	X_SC_AIO_MAX               = 24
   825  	X_SC_AIO_PRIO_DELTA_MAX    = 25
   826  	X_SC_DELAYTIMER_MAX        = 26
   827  	X_SC_MQ_OPEN_MAX           = 27
   828  	X_SC_MQ_PRIO_MAX           = 28
   829  	X_SC_VERSION               = 29
   830  	X_SC_PAGESIZE              = 30
   831  	X_SC_RTSIG_MAX             = 31
   832  	X_SC_SEM_NSEMS_MAX         = 32
   833  	X_SC_SEM_VALUE_MAX         = 33
   834  	X_SC_SIGQUEUE_MAX          = 34
   835  	X_SC_TIMER_MAX             = 35
   836  
   837  	// Values for the argument to `sysconf'
   838  	//        corresponding to _POSIX2_* symbols.
   839  	X_SC_BC_BASE_MAX        = 36
   840  	X_SC_BC_DIM_MAX         = 37
   841  	X_SC_BC_SCALE_MAX       = 38
   842  	X_SC_BC_STRING_MAX      = 39
   843  	X_SC_COLL_WEIGHTS_MAX   = 40
   844  	X_SC_EQUIV_CLASS_MAX    = 41
   845  	X_SC_EXPR_NEST_MAX      = 42
   846  	X_SC_LINE_MAX           = 43
   847  	X_SC_RE_DUP_MAX         = 44
   848  	X_SC_CHARCLASS_NAME_MAX = 45
   849  
   850  	X_SC_2_VERSION   = 46
   851  	X_SC_2_C_BIND    = 47
   852  	X_SC_2_C_DEV     = 48
   853  	X_SC_2_FORT_DEV  = 49
   854  	X_SC_2_FORT_RUN  = 50
   855  	X_SC_2_SW_DEV    = 51
   856  	X_SC_2_LOCALEDEF = 52
   857  
   858  	X_SC_PII                 = 53
   859  	X_SC_PII_XTI             = 54
   860  	X_SC_PII_SOCKET          = 55
   861  	X_SC_PII_INTERNET        = 56
   862  	X_SC_PII_OSI             = 57
   863  	X_SC_POLL                = 58
   864  	X_SC_SELECT              = 59
   865  	X_SC_UIO_MAXIOV          = 60
   866  	X_SC_IOV_MAX             = 60
   867  	X_SC_PII_INTERNET_STREAM = 61
   868  	X_SC_PII_INTERNET_DGRAM  = 62
   869  	X_SC_PII_OSI_COTS        = 63
   870  	X_SC_PII_OSI_CLTS        = 64
   871  	X_SC_PII_OSI_M           = 65
   872  	X_SC_T_IOV_MAX           = 66
   873  
   874  	// Values according to POSIX 1003.1c (POSIX threads).
   875  	X_SC_THREADS                      = 67
   876  	X_SC_THREAD_SAFE_FUNCTIONS        = 68
   877  	X_SC_GETGR_R_SIZE_MAX             = 69
   878  	X_SC_GETPW_R_SIZE_MAX             = 70
   879  	X_SC_LOGIN_NAME_MAX               = 71
   880  	X_SC_TTY_NAME_MAX                 = 72
   881  	X_SC_THREAD_DESTRUCTOR_ITERATIONS = 73
   882  	X_SC_THREAD_KEYS_MAX              = 74
   883  	X_SC_THREAD_STACK_MIN             = 75
   884  	X_SC_THREAD_THREADS_MAX           = 76
   885  	X_SC_THREAD_ATTR_STACKADDR        = 77
   886  	X_SC_THREAD_ATTR_STACKSIZE        = 78
   887  	X_SC_THREAD_PRIORITY_SCHEDULING   = 79
   888  	X_SC_THREAD_PRIO_INHERIT          = 80
   889  	X_SC_THREAD_PRIO_PROTECT          = 81
   890  	X_SC_THREAD_PROCESS_SHARED        = 82
   891  
   892  	X_SC_NPROCESSORS_CONF = 83
   893  	X_SC_NPROCESSORS_ONLN = 84
   894  	X_SC_PHYS_PAGES       = 85
   895  	X_SC_AVPHYS_PAGES     = 86
   896  	X_SC_ATEXIT_MAX       = 87
   897  	X_SC_PASS_MAX         = 88
   898  
   899  	X_SC_XOPEN_VERSION     = 89
   900  	X_SC_XOPEN_XCU_VERSION = 90
   901  	X_SC_XOPEN_UNIX        = 91
   902  	X_SC_XOPEN_CRYPT       = 92
   903  	X_SC_XOPEN_ENH_I18N    = 93
   904  	X_SC_XOPEN_SHM         = 94
   905  
   906  	X_SC_2_CHAR_TERM = 95
   907  	X_SC_2_C_VERSION = 96
   908  	X_SC_2_UPE       = 97
   909  
   910  	X_SC_XOPEN_XPG2 = 98
   911  	X_SC_XOPEN_XPG3 = 99
   912  	X_SC_XOPEN_XPG4 = 100
   913  
   914  	X_SC_CHAR_BIT   = 101
   915  	X_SC_CHAR_MAX   = 102
   916  	X_SC_CHAR_MIN   = 103
   917  	X_SC_INT_MAX    = 104
   918  	X_SC_INT_MIN    = 105
   919  	X_SC_LONG_BIT   = 106
   920  	X_SC_WORD_BIT   = 107
   921  	X_SC_MB_LEN_MAX = 108
   922  	X_SC_NZERO      = 109
   923  	X_SC_SSIZE_MAX  = 110
   924  	X_SC_SCHAR_MAX  = 111
   925  	X_SC_SCHAR_MIN  = 112
   926  	X_SC_SHRT_MAX   = 113
   927  	X_SC_SHRT_MIN   = 114
   928  	X_SC_UCHAR_MAX  = 115
   929  	X_SC_UINT_MAX   = 116
   930  	X_SC_ULONG_MAX  = 117
   931  	X_SC_USHRT_MAX  = 118
   932  
   933  	X_SC_NL_ARGMAX  = 119
   934  	X_SC_NL_LANGMAX = 120
   935  	X_SC_NL_MSGMAX  = 121
   936  	X_SC_NL_NMAX    = 122
   937  	X_SC_NL_SETMAX  = 123
   938  	X_SC_NL_TEXTMAX = 124
   939  
   940  	X_SC_XBS5_ILP32_OFF32  = 125
   941  	X_SC_XBS5_ILP32_OFFBIG = 126
   942  	X_SC_XBS5_LP64_OFF64   = 127
   943  	X_SC_XBS5_LPBIG_OFFBIG = 128
   944  
   945  	X_SC_XOPEN_LEGACY           = 129
   946  	X_SC_XOPEN_REALTIME         = 130
   947  	X_SC_XOPEN_REALTIME_THREADS = 131
   948  
   949  	X_SC_ADVISORY_INFO          = 132
   950  	X_SC_BARRIERS               = 133
   951  	X_SC_BASE                   = 134
   952  	X_SC_C_LANG_SUPPORT         = 135
   953  	X_SC_C_LANG_SUPPORT_R       = 136
   954  	X_SC_CLOCK_SELECTION        = 137
   955  	X_SC_CPUTIME                = 138
   956  	X_SC_THREAD_CPUTIME         = 139
   957  	X_SC_DEVICE_IO              = 140
   958  	X_SC_DEVICE_SPECIFIC        = 141
   959  	X_SC_DEVICE_SPECIFIC_R      = 142
   960  	X_SC_FD_MGMT                = 143
   961  	X_SC_FIFO                   = 144
   962  	X_SC_PIPE                   = 145
   963  	X_SC_FILE_ATTRIBUTES        = 146
   964  	X_SC_FILE_LOCKING           = 147
   965  	X_SC_FILE_SYSTEM            = 148
   966  	X_SC_MONOTONIC_CLOCK        = 149
   967  	X_SC_MULTI_PROCESS          = 150
   968  	X_SC_SINGLE_PROCESS         = 151
   969  	X_SC_NETWORKING             = 152
   970  	X_SC_READER_WRITER_LOCKS    = 153
   971  	X_SC_SPIN_LOCKS             = 154
   972  	X_SC_REGEXP                 = 155
   973  	X_SC_REGEX_VERSION          = 156
   974  	X_SC_SHELL                  = 157
   975  	X_SC_SIGNALS                = 158
   976  	X_SC_SPAWN                  = 159
   977  	X_SC_SPORADIC_SERVER        = 160
   978  	X_SC_THREAD_SPORADIC_SERVER = 161
   979  	X_SC_SYSTEM_DATABASE        = 162
   980  	X_SC_SYSTEM_DATABASE_R      = 163
   981  	X_SC_TIMEOUTS               = 164
   982  	X_SC_TYPED_MEMORY_OBJECTS   = 165
   983  	X_SC_USER_GROUPS            = 166
   984  	X_SC_USER_GROUPS_R          = 167
   985  	X_SC_2_PBS                  = 168
   986  	X_SC_2_PBS_ACCOUNTING       = 169
   987  	X_SC_2_PBS_LOCATE           = 170
   988  	X_SC_2_PBS_MESSAGE          = 171
   989  	X_SC_2_PBS_TRACK            = 172
   990  	X_SC_SYMLOOP_MAX            = 173
   991  	X_SC_STREAMS                = 174
   992  	X_SC_2_PBS_CHECKPOINT       = 175
   993  
   994  	X_SC_V6_ILP32_OFF32  = 176
   995  	X_SC_V6_ILP32_OFFBIG = 177
   996  	X_SC_V6_LP64_OFF64   = 178
   997  	X_SC_V6_LPBIG_OFFBIG = 179
   998  
   999  	X_SC_HOST_NAME_MAX      = 180
  1000  	X_SC_TRACE              = 181
  1001  	X_SC_TRACE_EVENT_FILTER = 182
  1002  	X_SC_TRACE_INHERIT      = 183
  1003  	X_SC_TRACE_LOG          = 184
  1004  
  1005  	X_SC_LEVEL1_ICACHE_SIZE     = 185
  1006  	X_SC_LEVEL1_ICACHE_ASSOC    = 186
  1007  	X_SC_LEVEL1_ICACHE_LINESIZE = 187
  1008  	X_SC_LEVEL1_DCACHE_SIZE     = 188
  1009  	X_SC_LEVEL1_DCACHE_ASSOC    = 189
  1010  	X_SC_LEVEL1_DCACHE_LINESIZE = 190
  1011  	X_SC_LEVEL2_CACHE_SIZE      = 191
  1012  	X_SC_LEVEL2_CACHE_ASSOC     = 192
  1013  	X_SC_LEVEL2_CACHE_LINESIZE  = 193
  1014  	X_SC_LEVEL3_CACHE_SIZE      = 194
  1015  	X_SC_LEVEL3_CACHE_ASSOC     = 195
  1016  	X_SC_LEVEL3_CACHE_LINESIZE  = 196
  1017  	X_SC_LEVEL4_CACHE_SIZE      = 197
  1018  	X_SC_LEVEL4_CACHE_ASSOC     = 198
  1019  	X_SC_LEVEL4_CACHE_LINESIZE  = 199
  1020  	// Leave room here, maybe we need a few more cache levels some day.
  1021  
  1022  	X_SC_IPV6        = 235
  1023  	X_SC_RAW_SOCKETS = 236
  1024  
  1025  	X_SC_V7_ILP32_OFF32  = 237
  1026  	X_SC_V7_ILP32_OFFBIG = 238
  1027  	X_SC_V7_LP64_OFF64   = 239
  1028  	X_SC_V7_LPBIG_OFFBIG = 240
  1029  
  1030  	X_SC_SS_REPL_MAX = 241
  1031  
  1032  	X_SC_TRACE_EVENT_NAME_MAX = 242
  1033  	X_SC_TRACE_NAME_MAX       = 243
  1034  	X_SC_TRACE_SYS_MAX        = 244
  1035  	X_SC_TRACE_USER_EVENT_MAX = 245
  1036  
  1037  	X_SC_XOPEN_STREAMS = 246
  1038  
  1039  	X_SC_THREAD_ROBUST_PRIO_INHERIT = 247
  1040  	X_SC_THREAD_ROBUST_PRIO_PROTECT = 248
  1041  )
  1042  
  1043  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  1044  //    This file is part of the GNU C Library.
  1045  //
  1046  //    The GNU C Library is free software; you can redistribute it and/or
  1047  //    modify it under the terms of the GNU Lesser General Public
  1048  //    License as published by the Free Software Foundation; either
  1049  //    version 2.1 of the License, or (at your option) any later version.
  1050  //
  1051  //    The GNU C Library is distributed in the hope that it will be useful,
  1052  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1053  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1054  //    Lesser General Public License for more details.
  1055  //
  1056  //    You should have received a copy of the GNU Lesser General Public
  1057  //    License along with the GNU C Library; if not, see
  1058  //    <http://www.gnu.org/licenses/>.
  1059  
  1060  //	ISO C99 Standard: 7.20 General utilities	<stdlib.h>
  1061  
  1062  // Handle feature test macros at the start of a header.
  1063  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  1064  //    This file is part of the GNU C Library.
  1065  //
  1066  //    The GNU C Library is free software; you can redistribute it and/or
  1067  //    modify it under the terms of the GNU Lesser General Public
  1068  //    License as published by the Free Software Foundation; either
  1069  //    version 2.1 of the License, or (at your option) any later version.
  1070  //
  1071  //    The GNU C Library is distributed in the hope that it will be useful,
  1072  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1073  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1074  //    Lesser General Public License for more details.
  1075  //
  1076  //    You should have received a copy of the GNU Lesser General Public
  1077  //    License along with the GNU C Library; if not, see
  1078  //    <http://www.gnu.org/licenses/>.
  1079  
  1080  // This header is internal to glibc and should not be included outside
  1081  //    of glibc headers.  Headers including it must define
  1082  //    __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first.  This header
  1083  //    cannot have multiple include guards because ISO C feature test
  1084  //    macros depend on the definition of the macro when an affected
  1085  //    header is included, not when the first system header is
  1086  //    included.
  1087  
  1088  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  1089  //    This file is part of the GNU C Library.
  1090  //
  1091  //    The GNU C Library is free software; you can redistribute it and/or
  1092  //    modify it under the terms of the GNU Lesser General Public
  1093  //    License as published by the Free Software Foundation; either
  1094  //    version 2.1 of the License, or (at your option) any later version.
  1095  //
  1096  //    The GNU C Library is distributed in the hope that it will be useful,
  1097  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1098  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1099  //    Lesser General Public License for more details.
  1100  //
  1101  //    You should have received a copy of the GNU Lesser General Public
  1102  //    License along with the GNU C Library; if not, see
  1103  //    <http://www.gnu.org/licenses/>.
  1104  
  1105  // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
  1106  //    macro.
  1107  
  1108  // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
  1109  //    macro.
  1110  
  1111  // ISO/IEC TS 18661-4:2015 defines the
  1112  //    __STDC_WANT_IEC_60559_FUNCS_EXT__ macro.
  1113  
  1114  // ISO/IEC TS 18661-3:2015 defines the
  1115  //    __STDC_WANT_IEC_60559_TYPES_EXT__ macro.
  1116  
  1117  // Get size_t, wchar_t and NULL from <stddef.h>.
  1118  // Copyright (C) 1989-2018 Free Software Foundation, Inc.
  1119  //
  1120  // This file is part of GCC.
  1121  //
  1122  // GCC is free software; you can redistribute it and/or modify
  1123  // it under the terms of the GNU General Public License as published by
  1124  // the Free Software Foundation; either version 3, or (at your option)
  1125  // any later version.
  1126  //
  1127  // GCC is distributed in the hope that it will be useful,
  1128  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  1129  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1130  // GNU General Public License for more details.
  1131  //
  1132  // Under Section 7 of GPL version 3, you are granted additional
  1133  // permissions described in the GCC Runtime Library Exception, version
  1134  // 3.1, as published by the Free Software Foundation.
  1135  //
  1136  // You should have received a copy of the GNU General Public License and
  1137  // a copy of the GCC Runtime Library Exception along with this program;
  1138  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  1139  // <http://www.gnu.org/licenses/>.
  1140  
  1141  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  1142  
  1143  // Any one of these symbols __need_* means that GNU libc
  1144  //    wants us just to define one data type.  So don't define
  1145  //    the symbols that indicate this file's entire job has been done.
  1146  
  1147  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  1148  //    There's no way to win with the other order!  Sun lossage.
  1149  
  1150  // On 4.3bsd-net2, make sure ansi.h is included, so we have
  1151  //    one less case to deal with in the following.
  1152  // On FreeBSD 5, machine/ansi.h does not exist anymore...
  1153  
  1154  // In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
  1155  //    defined if the corresponding type is *not* defined.
  1156  //    FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
  1157  //    NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_
  1158  
  1159  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  1160  //    Just ignore it.
  1161  
  1162  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  1163  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  1164  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  1165  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  1166  //    If we find that the macros are still defined at this point, we must
  1167  //    invoke them so that the type is defined as expected.
  1168  
  1169  // In case nobody has defined these types, but we aren't running under
  1170  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  1171  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  1172  //    parts of GCC is compiled by an older compiler, that actually
  1173  //    include gstddef.h, such as collect2.
  1174  
  1175  // Signed type of difference of two pointers.
  1176  
  1177  // Define this type if we are doing the whole job,
  1178  //    or if we want this type in particular.
  1179  
  1180  // If this symbol has done its job, get rid of it.
  1181  
  1182  // Unsigned type of `sizeof' something.
  1183  
  1184  // Define this type if we are doing the whole job,
  1185  //    or if we want this type in particular.
  1186  
  1187  // Wide character type.
  1188  //    Locale-writers should change this as necessary to
  1189  //    be big enough to hold unique values not between 0 and 127,
  1190  //    and not (wchar_t) -1, for each defined multibyte character.
  1191  
  1192  // Define this type if we are doing the whole job,
  1193  //    or if we want this type in particular.
  1194  
  1195  //  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
  1196  //     are already defined.
  1197  //  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
  1198  //  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
  1199  
  1200  // A null pointer constant.
  1201  
  1202  // Offset of member MEMBER in a struct of type TYPE.
  1203  
  1204  // XPG requires a few symbols from <sys/wait.h> being defined.
  1205  // Definitions of flag bits for `waitpid' et al.
  1206  //    Copyright (C) 1992-2018 Free Software Foundation, Inc.
  1207  //    This file is part of the GNU C Library.
  1208  //
  1209  //    The GNU C Library is free software; you can redistribute it and/or
  1210  //    modify it under the terms of the GNU Lesser General Public
  1211  //    License as published by the Free Software Foundation; either
  1212  //    version 2.1 of the License, or (at your option) any later version.
  1213  //
  1214  //    The GNU C Library is distributed in the hope that it will be useful,
  1215  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1216  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1217  //    Lesser General Public License for more details.
  1218  //
  1219  //    You should have received a copy of the GNU Lesser General Public
  1220  //    License along with the GNU C Library; if not, see
  1221  //    <http://www.gnu.org/licenses/>.
  1222  
  1223  // Bits in the third argument to `waitpid'.
  1224  
  1225  // Bits in the fourth argument to `waitid'.
  1226  
  1227  // The following values are used by the `waitid' function.
  1228  
  1229  // The Linux kernel defines these bare, rather than an enum,
  1230  //    which causes a conflict if the include order is reversed.
  1231  
  1232  const ( /* waitflags.h:52:1: */
  1233  	P_ALL  = 0 // Wait for any child.
  1234  	P_PID  = 1 // Wait for specified process.
  1235  	P_PGID = 2
  1236  )
  1237  
  1238  //
  1239  //   If you use the zlib library in a product, an acknowledgment is welcome
  1240  //   in the documentation of your product. If for some reason you cannot
  1241  //   include such an acknowledgment, I would appreciate that you keep this
  1242  //   copyright string in the executable of your product.
  1243  //
  1244  
  1245  // ===========================================================================
  1246  //  Function prototypes.
  1247  const ( /* deflate.c:66:1: */
  1248  	Need_more      = 0 // block not completed, need more input or more output
  1249  	Block_done     = 1 // block flush performed
  1250  	Finish_started = 2 // finish started, need only more output at next deflate
  1251  	Finish_done    = 3
  1252  )
  1253  
  1254  // inflate.h -- internal inflate state definition
  1255  // Copyright (C) 1995-2016 Mark Adler
  1256  // For conditions of distribution and use, see copyright notice in zlib.h
  1257  
  1258  // WARNING: this file should *not* be used by applications. It is
  1259  //    part of the implementation of the compression library and is
  1260  //    subject to change. Applications should only use zlib.h.
  1261  //
  1262  
  1263  // define NO_GZIP when compiling if you want to disable gzip header and
  1264  //    trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
  1265  //    the crc code when it is not needed.  For shared libraries, gzip decoding
  1266  //    should be left enabled.
  1267  
  1268  // Possible inflate modes between inflate() calls
  1269  const ( /* inflate.h:20:1: */
  1270  	HEAD     = 16180 // i: waiting for magic header
  1271  	FLAGS    = 16181 // i: waiting for method and flags (gzip)
  1272  	TIME     = 16182 // i: waiting for modification time (gzip)
  1273  	OS       = 16183 // i: waiting for extra flags and operating system (gzip)
  1274  	EXLEN    = 16184 // i: waiting for extra length (gzip)
  1275  	EXTRA    = 16185 // i: waiting for extra bytes (gzip)
  1276  	NAME     = 16186 // i: waiting for end of file name (gzip)
  1277  	COMMENT  = 16187 // i: waiting for end of comment (gzip)
  1278  	HCRC     = 16188 // i: waiting for header crc (gzip)
  1279  	DICTID   = 16189 // i: waiting for dictionary check value
  1280  	DICT     = 16190 // waiting for inflateSetDictionary() call
  1281  	TYPE     = 16191 // i: waiting for type bits, including last-flag bit
  1282  	TYPEDO   = 16192 // i: same, but skip check to exit inflate on new block
  1283  	STORED   = 16193 // i: waiting for stored size (length and complement)
  1284  	COPY_    = 16194 // i/o: same as COPY below, but only first time in
  1285  	COPY     = 16195 // i/o: waiting for input or output to copy stored block
  1286  	TABLE    = 16196 // i: waiting for dynamic block table lengths
  1287  	LENLENS  = 16197 // i: waiting for code length code lengths
  1288  	CODELENS = 16198 // i: waiting for length/lit and distance code lengths
  1289  	LEN_     = 16199 // i: same as LEN below, but only first time in
  1290  	LEN      = 16200 // i: waiting for length/lit/eob code
  1291  	LENEXT   = 16201 // i: waiting for length extra bits
  1292  	DIST     = 16202 // i: waiting for distance code
  1293  	DISTEXT  = 16203 // i: waiting for distance extra bits
  1294  	MATCH    = 16204 // o: waiting for output space to copy string
  1295  	LIT      = 16205 // o: waiting for output space to write literal
  1296  	CHECK    = 16206 // i: waiting for 32-bit check value
  1297  	LENGTH   = 16207 // i: waiting for 32-bit length (gzip)
  1298  	DONE     = 16208 // finished check, done -- remain here until reset
  1299  	BAD      = 16209 // got a data error -- remain here until reset
  1300  	MEM      = 16210 // got an inflate() memory error -- remain here until reset
  1301  	SYNC     = 16211
  1302  )
  1303  
  1304  // op values as set by inflate_table():
  1305  //     00000000 - literal
  1306  //     0000tttt - table link, tttt != 0 is the number of table index bits
  1307  //     0001eeee - length or distance, eeee is the number of extra bits
  1308  //     01100000 - end of block
  1309  //     01000000 - invalid code
  1310  //
  1311  
  1312  // Maximum size of the dynamic table.  The maximum number of code structures is
  1313  //    1444, which is the sum of 852 for literal/length codes and 592 for distance
  1314  //    codes.  These values were found by exhaustive searches using the program
  1315  //    examples/enough.c found in the zlib distribtution.  The arguments to that
  1316  //    program are the number of symbols, the initial root table size, and the
  1317  //    maximum bit length of a code.  "enough 286 9 15" for literal/length codes
  1318  //    returns returns 852, and "enough 30 6 15" for distance codes returns 592.
  1319  //    The initial root table size (9 or 6) is found in the fifth argument of the
  1320  //    inflate_table() calls in inflate.c and infback.c.  If the root table size is
  1321  //    changed, then these maximum sizes would be need to be recalculated and
  1322  //    updated.
  1323  
  1324  // Type of code to build for inflate_table()
  1325  const ( /* inftrees.h:54:1: */
  1326  	CODES = 0
  1327  	LENS  = 1
  1328  	DISTS = 2
  1329  )
  1330  
  1331  type Ptrdiff_t = int64 /* <builtin>:3:26 */
  1332  
  1333  type Size_t = uint64 /* <builtin>:9:23 */
  1334  
  1335  type Wchar_t = uint32 /* <builtin>:15:24 */
  1336  
  1337  type X__int128_t = struct {
  1338  	Flo int64
  1339  	Fhi int64
  1340  } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128
  1341  type X__uint128_t = struct {
  1342  	Flo uint64
  1343  	Fhi uint64
  1344  } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128
  1345  
  1346  type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  1347  type X__float128 = float64        /* <builtin>:47:21 */
  1348  
  1349  //  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
  1350  //     are already defined.
  1351  //  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
  1352  //  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
  1353  
  1354  // A null pointer constant.
  1355  
  1356  // Offset of member MEMBER in a struct of type TYPE.
  1357  
  1358  // Type whose alignment is supported in every context and is at least
  1359  //    as great as that of any standard type not using alignment
  1360  //    specifiers.
  1361  type Max_align_t = struct {
  1362  	F__max_align_ll int64
  1363  	F__max_align_ld float64
  1364  } /* stddef.h:437:3 */
  1365  
  1366  type Z_size_t = Size_t /* zconf.h:248:21 */
  1367  
  1368  // Maximum value for memLevel in deflateInit2
  1369  
  1370  // Maximum value for windowBits in deflateInit2 and inflateInit2.
  1371  // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
  1372  // created by gzip. (Files created by minigzip can still be extracted by
  1373  // gzip.)
  1374  
  1375  // The memory requirements for deflate are (in bytes):
  1376  //             (1 << (windowBits+2)) +  (1 << (memLevel+9))
  1377  //  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
  1378  //  plus a few kilobytes for small objects. For example, if you want to reduce
  1379  //  the default memory requirements from 256K to 128K, compile with
  1380  //      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
  1381  //  Of course this will generally degrade compression (there's no free lunch).
  1382  //
  1383  //    The memory requirements for inflate are (in bytes) 1 << windowBits
  1384  //  that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
  1385  //  for small objects.
  1386  
  1387  // Type declarations
  1388  
  1389  // The following definitions for FAR are needed only for MSDOS mixed
  1390  // model programming (small or medium model with some far allocations).
  1391  // This was tested only with MSC; for other MSDOS compilers you may have
  1392  // to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
  1393  // just define FAR to be empty.
  1394  
  1395  type Byte = uint8   /* zconf.h:391:24 */ // 8 bits
  1396  type UInt = uint32  /* zconf.h:393:24 */ // 16 bits or more
  1397  type ULong = uint64 /* zconf.h:394:24 */ // 32 bits or more
  1398  
  1399  type Bytef = Byte   /* zconf.h:400:22 */
  1400  type Charf = int8   /* zconf.h:402:19 */
  1401  type Intf = int32   /* zconf.h:403:19 */
  1402  type UIntf = UInt   /* zconf.h:404:19 */
  1403  type ULongf = ULong /* zconf.h:405:19 */
  1404  
  1405  type Voidpc = uintptr /* zconf.h:408:23 */
  1406  type Voidpf = uintptr /* zconf.h:409:23 */
  1407  type Voidp = uintptr  /* zconf.h:410:23 */
  1408  
  1409  // Copyright (C) 1992-2018 Free Software Foundation, Inc.
  1410  //
  1411  // This file is part of GCC.
  1412  //
  1413  // GCC is free software; you can redistribute it and/or modify it under
  1414  // the terms of the GNU General Public License as published by the Free
  1415  // Software Foundation; either version 3, or (at your option) any later
  1416  // version.
  1417  //
  1418  // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  1419  // WARRANTY; without even the implied warranty of MERCHANTABILITY or
  1420  // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  1421  // for more details.
  1422  //
  1423  // Under Section 7 of GPL version 3, you are granted additional
  1424  // permissions described in the GCC Runtime Library Exception, version
  1425  // 3.1, as published by the Free Software Foundation.
  1426  //
  1427  // You should have received a copy of the GNU General Public License and
  1428  // a copy of the GCC Runtime Library Exception along with this program;
  1429  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  1430  // <http://www.gnu.org/licenses/>.
  1431  
  1432  // This administrivia gets added to the beginning of limits.h
  1433  //    if the system has its own version of limits.h.
  1434  
  1435  // We use _GCC_LIMITS_H_ because we want this not to match
  1436  //    any macros that the system's limits.h uses for its own purposes.
  1437  
  1438  // Use "..." so that we find syslimits.h only in this same directory.
  1439  // syslimits.h stands for the system's own limits.h file.
  1440  //    If we can use it ok unmodified, then we install this text.
  1441  //    If fixincludes fixes it, then the fixed version is installed
  1442  //    instead of this text.
  1443  
  1444  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  1445  //    This file is part of the GNU C Library.
  1446  //
  1447  //    The GNU C Library is free software; you can redistribute it and/or
  1448  //    modify it under the terms of the GNU Lesser General Public
  1449  //    License as published by the Free Software Foundation; either
  1450  //    version 2.1 of the License, or (at your option) any later version.
  1451  //
  1452  //    The GNU C Library is distributed in the hope that it will be useful,
  1453  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1454  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1455  //    Lesser General Public License for more details.
  1456  //
  1457  //    You should have received a copy of the GNU Lesser General Public
  1458  //    License along with the GNU C Library; if not, see
  1459  //    <http://www.gnu.org/licenses/>.
  1460  
  1461  //	ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types	<limits.h>
  1462  
  1463  // Handle feature test macros at the start of a header.
  1464  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  1465  //    This file is part of the GNU C Library.
  1466  //
  1467  //    The GNU C Library is free software; you can redistribute it and/or
  1468  //    modify it under the terms of the GNU Lesser General Public
  1469  //    License as published by the Free Software Foundation; either
  1470  //    version 2.1 of the License, or (at your option) any later version.
  1471  //
  1472  //    The GNU C Library is distributed in the hope that it will be useful,
  1473  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1474  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1475  //    Lesser General Public License for more details.
  1476  //
  1477  //    You should have received a copy of the GNU Lesser General Public
  1478  //    License along with the GNU C Library; if not, see
  1479  //    <http://www.gnu.org/licenses/>.
  1480  
  1481  // This header is internal to glibc and should not be included outside
  1482  //    of glibc headers.  Headers including it must define
  1483  //    __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first.  This header
  1484  //    cannot have multiple include guards because ISO C feature test
  1485  //    macros depend on the definition of the macro when an affected
  1486  //    header is included, not when the first system header is
  1487  //    included.
  1488  
  1489  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  1490  //    This file is part of the GNU C Library.
  1491  //
  1492  //    The GNU C Library is free software; you can redistribute it and/or
  1493  //    modify it under the terms of the GNU Lesser General Public
  1494  //    License as published by the Free Software Foundation; either
  1495  //    version 2.1 of the License, or (at your option) any later version.
  1496  //
  1497  //    The GNU C Library is distributed in the hope that it will be useful,
  1498  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1499  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1500  //    Lesser General Public License for more details.
  1501  //
  1502  //    You should have received a copy of the GNU Lesser General Public
  1503  //    License along with the GNU C Library; if not, see
  1504  //    <http://www.gnu.org/licenses/>.
  1505  
  1506  // These are defined by the user (or the compiler)
  1507  //    to specify the desired environment:
  1508  //
  1509  //    __STRICT_ANSI__	ISO Standard C.
  1510  //    _ISOC99_SOURCE	Extensions to ISO C89 from ISO C99.
  1511  //    _ISOC11_SOURCE	Extensions to ISO C99 from ISO C11.
  1512  //    __STDC_WANT_LIB_EXT2__
  1513  // 			Extensions to ISO C99 from TR 27431-2:2010.
  1514  //    __STDC_WANT_IEC_60559_BFP_EXT__
  1515  // 			Extensions to ISO C11 from TS 18661-1:2014.
  1516  //    __STDC_WANT_IEC_60559_FUNCS_EXT__
  1517  // 			Extensions to ISO C11 from TS 18661-4:2015.
  1518  //    __STDC_WANT_IEC_60559_TYPES_EXT__
  1519  // 			Extensions to ISO C11 from TS 18661-3:2015.
  1520  //
  1521  //    _POSIX_SOURCE	IEEE Std 1003.1.
  1522  //    _POSIX_C_SOURCE	If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
  1523  // 			if >=199309L, add IEEE Std 1003.1b-1993;
  1524  // 			if >=199506L, add IEEE Std 1003.1c-1995;
  1525  // 			if >=200112L, all of IEEE 1003.1-2004
  1526  // 			if >=200809L, all of IEEE 1003.1-2008
  1527  //    _XOPEN_SOURCE	Includes POSIX and XPG things.  Set to 500 if
  1528  // 			Single Unix conformance is wanted, to 600 for the
  1529  // 			sixth revision, to 700 for the seventh revision.
  1530  //    _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
  1531  //    _LARGEFILE_SOURCE	Some more functions for correct standard I/O.
  1532  //    _LARGEFILE64_SOURCE	Additional functionality from LFS for large files.
  1533  //    _FILE_OFFSET_BITS=N	Select default filesystem interface.
  1534  //    _ATFILE_SOURCE	Additional *at interfaces.
  1535  //    _GNU_SOURCE		All of the above, plus GNU extensions.
  1536  //    _DEFAULT_SOURCE	The default set of features (taking precedence over
  1537  // 			__STRICT_ANSI__).
  1538  //
  1539  //    _FORTIFY_SOURCE	Add security hardening to many library functions.
  1540  // 			Set to 1 or 2; 2 performs stricter checks than 1.
  1541  //
  1542  //    _REENTRANT, _THREAD_SAFE
  1543  // 			Obsolete; equivalent to _POSIX_C_SOURCE=199506L.
  1544  //
  1545  //    The `-ansi' switch to the GNU C compiler, and standards conformance
  1546  //    options such as `-std=c99', define __STRICT_ANSI__.  If none of
  1547  //    these are defined, or if _DEFAULT_SOURCE is defined, the default is
  1548  //    to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to
  1549  //    200809L, as well as enabling miscellaneous functions from BSD and
  1550  //    SVID.  If more than one of these are defined, they accumulate.  For
  1551  //    example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together
  1552  //    give you ISO C, 1003.1, and 1003.2, but nothing else.
  1553  //
  1554  //    These are defined by this file and are used by the
  1555  //    header files to decide what to declare or define:
  1556  //
  1557  //    __GLIBC_USE (F)	Define things from feature set F.  This is defined
  1558  // 			to 1 or 0; the subsequent macros are either defined
  1559  // 			or undefined, and those tests should be moved to
  1560  // 			__GLIBC_USE.
  1561  //    __USE_ISOC11		Define ISO C11 things.
  1562  //    __USE_ISOC99		Define ISO C99 things.
  1563  //    __USE_ISOC95		Define ISO C90 AMD1 (C95) things.
  1564  //    __USE_ISOCXX11	Define ISO C++11 things.
  1565  //    __USE_POSIX		Define IEEE Std 1003.1 things.
  1566  //    __USE_POSIX2		Define IEEE Std 1003.2 things.
  1567  //    __USE_POSIX199309	Define IEEE Std 1003.1, and .1b things.
  1568  //    __USE_POSIX199506	Define IEEE Std 1003.1, .1b, .1c and .1i things.
  1569  //    __USE_XOPEN		Define XPG things.
  1570  //    __USE_XOPEN_EXTENDED	Define X/Open Unix things.
  1571  //    __USE_UNIX98		Define Single Unix V2 things.
  1572  //    __USE_XOPEN2K        Define XPG6 things.
  1573  //    __USE_XOPEN2KXSI     Define XPG6 XSI things.
  1574  //    __USE_XOPEN2K8       Define XPG7 things.
  1575  //    __USE_XOPEN2K8XSI    Define XPG7 XSI things.
  1576  //    __USE_LARGEFILE	Define correct standard I/O things.
  1577  //    __USE_LARGEFILE64	Define LFS things with separate names.
  1578  //    __USE_FILE_OFFSET64	Define 64bit interface as default.
  1579  //    __USE_MISC		Define things from 4.3BSD or System V Unix.
  1580  //    __USE_ATFILE		Define *at interfaces and AT_* constants for them.
  1581  //    __USE_GNU		Define GNU extensions.
  1582  //    __USE_FORTIFY_LEVEL	Additional security measures used, according to level.
  1583  //
  1584  //    The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are
  1585  //    defined by this file unconditionally.  `__GNU_LIBRARY__' is provided
  1586  //    only for compatibility.  All new code should use the other symbols
  1587  //    to test for features.
  1588  //
  1589  //    All macros listed above as possibly being defined by this file are
  1590  //    explicitly undefined if they are not explicitly defined.
  1591  //    Feature-test macros that are not defined by the user or compiler
  1592  //    but are implied by the other feature-test macros defined (or by the
  1593  //    lack of any definitions) are defined by the file.
  1594  //
  1595  //    ISO C feature test macros depend on the definition of the macro
  1596  //    when an affected header is included, not when the first system
  1597  //    header is included, and so they are handled in
  1598  //    <bits/libc-header-start.h>, which does not have a multiple include
  1599  //    guard.  Feature test macros that can be handled from the first
  1600  //    system header included are handled here.
  1601  
  1602  // Undefine everything, so we get a clean slate.
  1603  
  1604  // Suppress kernel-name space pollution unless user expressedly asks
  1605  //    for it.
  1606  
  1607  // Convenience macro to test the version of gcc.
  1608  //    Use like this:
  1609  //    #if __GNUC_PREREQ (2,8)
  1610  //    ... code requiring gcc 2.8 or later ...
  1611  //    #endif
  1612  //    Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was
  1613  //    added in 2.0.
  1614  
  1615  // Similarly for clang.  Features added to GCC after version 4.2 may
  1616  //    or may not also be available in clang, and clang's definitions of
  1617  //    __GNUC(_MINOR)__ are fixed at 4 and 2 respectively.  Not all such
  1618  //    features can be queried via __has_extension/__has_feature.
  1619  
  1620  // Whether to use feature set F.
  1621  
  1622  // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for
  1623  //    _DEFAULT_SOURCE.  If _DEFAULT_SOURCE is present we do not
  1624  //    issue a warning; the expectation is that the source is being
  1625  //    transitioned to use the new macro.
  1626  
  1627  // If _GNU_SOURCE was defined by the user, turn on all the other features.
  1628  
  1629  // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
  1630  //    define _DEFAULT_SOURCE.
  1631  
  1632  // This is to enable the ISO C11 extension.
  1633  
  1634  // This is to enable the ISO C99 extension.
  1635  
  1636  // This is to enable the ISO C90 Amendment 1:1995 extension.
  1637  
  1638  // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE
  1639  //    is defined, use POSIX.1-2008 (or another version depending on
  1640  //    _XOPEN_SOURCE).
  1641  
  1642  // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be
  1643  //    defined in all multithreaded code.  GNU libc has not required this
  1644  //    for many years.  We now treat them as compatibility synonyms for
  1645  //    _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with
  1646  //    comprehensive support for multithreaded code.  Using them never
  1647  //    lowers the selected level of POSIX conformance, only raises it.
  1648  
  1649  // The function 'gets' existed in C89, but is impossible to use
  1650  //    safely.  It has been removed from ISO C11 and ISO C++14.  Note: for
  1651  //    compatibility with various implementations of <cstdio>, this test
  1652  //    must consider only the value of __cplusplus when compiling C++.
  1653  
  1654  // Get definitions of __STDC_* predefined macros, if the compiler has
  1655  //    not preincluded this header automatically.
  1656  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  1657  //    This file is part of the GNU C Library.
  1658  //
  1659  //    The GNU C Library is free software; you can redistribute it and/or
  1660  //    modify it under the terms of the GNU Lesser General Public
  1661  //    License as published by the Free Software Foundation; either
  1662  //    version 2.1 of the License, or (at your option) any later version.
  1663  //
  1664  //    The GNU C Library is distributed in the hope that it will be useful,
  1665  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1666  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1667  //    Lesser General Public License for more details.
  1668  //
  1669  //    You should have received a copy of the GNU Lesser General Public
  1670  //    License along with the GNU C Library; if not, see
  1671  //    <http://www.gnu.org/licenses/>.
  1672  
  1673  // This macro indicates that the installed library is the GNU C Library.
  1674  //    For historic reasons the value now is 6 and this will stay from now
  1675  //    on.  The use of this variable is deprecated.  Use __GLIBC__ and
  1676  //    __GLIBC_MINOR__ now (see below) when you want to test for a specific
  1677  //    GNU C library version and use the values in <gnu/lib-names.h> to get
  1678  //    the sonames of the shared libraries.
  1679  
  1680  // Major and minor version number of the GNU C library package.  Use
  1681  //    these macros to test for features in specific releases.
  1682  
  1683  // This is here only because every header file already includes this one.
  1684  // Copyright (C) 1992-2018 Free Software Foundation, Inc.
  1685  //    This file is part of the GNU C Library.
  1686  //
  1687  //    The GNU C Library is free software; you can redistribute it and/or
  1688  //    modify it under the terms of the GNU Lesser General Public
  1689  //    License as published by the Free Software Foundation; either
  1690  //    version 2.1 of the License, or (at your option) any later version.
  1691  //
  1692  //    The GNU C Library is distributed in the hope that it will be useful,
  1693  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1694  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1695  //    Lesser General Public License for more details.
  1696  //
  1697  //    You should have received a copy of the GNU Lesser General Public
  1698  //    License along with the GNU C Library; if not, see
  1699  //    <http://www.gnu.org/licenses/>.
  1700  
  1701  // We are almost always included from features.h.
  1702  
  1703  // The GNU libc does not support any K&R compilers or the traditional mode
  1704  //    of ISO C compilers anymore.  Check for some of the combinations not
  1705  //    anymore supported.
  1706  
  1707  // Some user header file might have defined this before.
  1708  
  1709  // All functions, except those with callbacks or those that
  1710  //    synchronize memory, are leaf functions.
  1711  
  1712  // GCC can always grok prototypes.  For C++ programs we add throw()
  1713  //    to help it optimize the function calls.  But this works only with
  1714  //    gcc 2.8.x and egcs.  For gcc 3.2 and up we even mark C functions
  1715  //    as non-throwing using a function attribute since programs can use
  1716  //    the -fexceptions options for C code as well.
  1717  
  1718  // Compilers that are not clang may object to
  1719  //        #if defined __clang__ && __has_extension(...)
  1720  //    even though they do not need to evaluate the right-hand side of the &&.
  1721  
  1722  // These two macros are not used in glibc anymore.  They are kept here
  1723  //    only because some other projects expect the macros to be defined.
  1724  
  1725  // For these things, GCC behaves the ANSI way normally,
  1726  //    and the non-ANSI way under -traditional.
  1727  
  1728  // This is not a typedef so `const __ptr_t' does the right thing.
  1729  
  1730  // C++ needs to know that types and declarations are C, not C++.
  1731  
  1732  // Fortify support.
  1733  
  1734  // Support for flexible arrays.
  1735  //    Headers that should use flexible arrays only if they're "real"
  1736  //    (e.g. only if they won't affect sizeof()) should test
  1737  //    #if __glibc_c99_flexarr_available.
  1738  
  1739  // __asm__ ("xyz") is used throughout the headers to rename functions
  1740  //    at the assembly language level.  This is wrapped by the __REDIRECT
  1741  //    macro, in order to support compilers that can do this some other
  1742  //    way.  When compilers don't support asm-names at all, we have to do
  1743  //    preprocessor tricks instead (which don't have exactly the right
  1744  //    semantics, but it's the best we can do).
  1745  //
  1746  //    Example:
  1747  //    int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid);
  1748  
  1749  //
  1750  // #elif __SOME_OTHER_COMPILER__
  1751  //
  1752  // # define __REDIRECT(name, proto, alias) name proto; 	_Pragma("let " #name " = " #alias)
  1753  
  1754  // GCC has various useful declarations that can be made with the
  1755  //    `__attribute__' syntax.  All of the ways we use this do fine if
  1756  //    they are omitted for compilers that don't understand it.
  1757  
  1758  // At some point during the gcc 2.96 development the `malloc' attribute
  1759  //    for functions was introduced.  We don't want to use it unconditionally
  1760  //    (although this would be possible) since it generates warnings.
  1761  
  1762  // Tell the compiler which arguments to an allocation function
  1763  //    indicate the size of the allocation.
  1764  
  1765  // At some point during the gcc 2.96 development the `pure' attribute
  1766  //    for functions was introduced.  We don't want to use it unconditionally
  1767  //    (although this would be possible) since it generates warnings.
  1768  
  1769  // This declaration tells the compiler that the value is constant.
  1770  
  1771  // At some point during the gcc 3.1 development the `used' attribute
  1772  //    for functions was introduced.  We don't want to use it unconditionally
  1773  //    (although this would be possible) since it generates warnings.
  1774  
  1775  // Since version 3.2, gcc allows marking deprecated functions.
  1776  
  1777  // Since version 4.5, gcc also allows one to specify the message printed
  1778  //    when a deprecated function is used.  clang claims to be gcc 4.2, but
  1779  //    may also support this feature.
  1780  
  1781  // At some point during the gcc 2.8 development the `format_arg' attribute
  1782  //    for functions was introduced.  We don't want to use it unconditionally
  1783  //    (although this would be possible) since it generates warnings.
  1784  //    If several `format_arg' attributes are given for the same function, in
  1785  //    gcc-3.0 and older, all but the last one are ignored.  In newer gccs,
  1786  //    all designated arguments are considered.
  1787  
  1788  // At some point during the gcc 2.97 development the `strfmon' format
  1789  //    attribute for functions was introduced.  We don't want to use it
  1790  //    unconditionally (although this would be possible) since it
  1791  //    generates warnings.
  1792  
  1793  // The nonull function attribute allows to mark pointer parameters which
  1794  //    must not be NULL.
  1795  
  1796  // If fortification mode, we warn about unused results of certain
  1797  //    function calls which can lead to problems.
  1798  
  1799  // Forces a function to be always inlined.
  1800  // The Linux kernel defines __always_inline in stddef.h (283d7573), and
  1801  //    it conflicts with this definition.  Therefore undefine it first to
  1802  //    allow either header to be included first.
  1803  
  1804  // Associate error messages with the source location of the call site rather
  1805  //    than with the source location inside the function.
  1806  
  1807  // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
  1808  //    inline semantics, unless -fgnu89-inline is used.  Using __GNUC_STDC_INLINE__
  1809  //    or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
  1810  //    older than 4.3 may define these macros and still not guarantee GNU inlining
  1811  //    semantics.
  1812  //
  1813  //    clang++ identifies itself as gcc-4.2, but has support for GNU inlining
  1814  //    semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and
  1815  //    __GNUC_GNU_INLINE__ macro definitions.
  1816  
  1817  // GCC 4.3 and above allow passing all anonymous arguments of an
  1818  //    __extern_always_inline function to some other vararg function.
  1819  
  1820  // It is possible to compile containing GCC extensions even if GCC is
  1821  //    run in pedantic mode if the uses are carefully marked using the
  1822  //    `__extension__' keyword.  But this is not generally available before
  1823  //    version 2.8.
  1824  
  1825  // __restrict is known in EGCS 1.2 and above.
  1826  
  1827  // ISO C99 also allows to declare arrays as non-overlapping.  The syntax is
  1828  //      array_name[restrict]
  1829  //    GCC 3.1 supports this.
  1830  
  1831  // Describes a char array whose address can safely be passed as the first
  1832  //    argument to strncpy and strncat, as the char array is not necessarily
  1833  //    a NUL-terminated string.
  1834  
  1835  // Determine the wordsize from the preprocessor defines.
  1836  //
  1837  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  1838  //    This file is part of the GNU C Library.
  1839  //
  1840  //    The GNU C Library is free software; you can redistribute it and/or
  1841  //    modify it under the terms of the GNU Lesser General Public
  1842  //    License as published by the Free Software Foundation; either
  1843  //    version 2.1 of the License, or (at your option) any later version.
  1844  //
  1845  //    The GNU C Library is distributed in the hope that it will be useful,
  1846  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1847  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1848  //    Lesser General Public License for more details.
  1849  //
  1850  //    You should have received a copy of the GNU Lesser General Public
  1851  //    License along with the GNU C Library; if not, see
  1852  //    <http://www.gnu.org/licenses/>.
  1853  
  1854  // Properties of long double type.  ldbl-128 version.
  1855  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  1856  //    This file is part of the GNU C Library.
  1857  //
  1858  //    The GNU C Library is free software; you can redistribute it and/or
  1859  //    modify it under the terms of the GNU Lesser General Public
  1860  //    License  published by the Free Software Foundation; either
  1861  //    version 2.1 of the License, or (at your option) any later version.
  1862  //
  1863  //    The GNU C Library is distributed in the hope that it will be useful,
  1864  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1865  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1866  //    Lesser General Public License for more details.
  1867  //
  1868  //    You should have received a copy of the GNU Lesser General Public
  1869  //    License along with the GNU C Library; if not, see
  1870  //    <http://www.gnu.org/licenses/>.
  1871  
  1872  // long double is distinct from double, so there is nothing to
  1873  //    define here.
  1874  
  1875  // __glibc_macro_warning (MESSAGE) issues warning MESSAGE.  This is
  1876  //    intended for use in preprocessor macros.
  1877  //
  1878  //    Note: MESSAGE must be a _single_ string; concatenation of string
  1879  //    literals is not supported.
  1880  
  1881  // Generic selection (ISO C11) is a C-only feature, available in GCC
  1882  //    since version 4.9.  Previous versions do not provide generic
  1883  //    selection, even though they might set __STDC_VERSION__ to 201112L,
  1884  //    when in -std=c11 mode.  Thus, we must check for !defined __GNUC__
  1885  //    when testing __STDC_VERSION__ for generic selection support.
  1886  //    On the other hand, Clang also defines __GNUC__, so a clang-specific
  1887  //    check is required to enable the use of generic selection.
  1888  
  1889  // If we don't have __REDIRECT, prototypes will be missing if
  1890  //    __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64].
  1891  
  1892  // Decide whether we can define 'extern inline' functions in headers.
  1893  
  1894  // This is here only because every header file already includes this one.
  1895  //    Get the definitions of all the appropriate `__stub_FUNCTION' symbols.
  1896  //    <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub
  1897  //    that will always return failure (and set errno to ENOSYS).
  1898  // This file is automatically generated.
  1899  //    This file selects the right generated file of `__stub_FUNCTION' macros
  1900  //    based on the architecture being compiled for.
  1901  
  1902  // Determine the wordsize from the preprocessor defines.
  1903  //
  1904  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  1905  //    This file is part of the GNU C Library.
  1906  //
  1907  //    The GNU C Library is free software; you can redistribute it and/or
  1908  //    modify it under the terms of the GNU Lesser General Public
  1909  //    License as published by the Free Software Foundation; either
  1910  //    version 2.1 of the License, or (at your option) any later version.
  1911  //
  1912  //    The GNU C Library is distributed in the hope that it will be useful,
  1913  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1914  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1915  //    Lesser General Public License for more details.
  1916  //
  1917  //    You should have received a copy of the GNU Lesser General Public
  1918  //    License along with the GNU C Library; if not, see
  1919  //    <http://www.gnu.org/licenses/>.
  1920  
  1921  // This file is automatically generated.
  1922  //    It defines a symbol `__stub_FUNCTION' for each function
  1923  //    in the C library which is a stub, meaning it will fail
  1924  //    every time called, usually setting errno to ENOSYS.
  1925  
  1926  // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
  1927  //    macro.
  1928  
  1929  // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
  1930  //    macro.
  1931  
  1932  // ISO/IEC TS 18661-4:2015 defines the
  1933  //    __STDC_WANT_IEC_60559_FUNCS_EXT__ macro.
  1934  
  1935  // ISO/IEC TS 18661-3:2015 defines the
  1936  //    __STDC_WANT_IEC_60559_TYPES_EXT__ macro.
  1937  
  1938  // Maximum length of any multibyte character in any locale.
  1939  //    We define this value here since the gcc header does not define
  1940  //    the correct value.
  1941  
  1942  // If we are not using GNU CC we have to define all the symbols ourself.
  1943  //    Otherwise use gcc's definitions (see below).
  1944  
  1945  // Get the compiler's limits.h, which defines almost all the ISO constants.
  1946  //
  1947  //     We put this #include_next outside the double inclusion check because
  1948  //     it should be possible to include this file more than once and still get
  1949  //     the definitions from gcc's header.
  1950  
  1951  // The <limits.h> files in some gcc versions don't define LLONG_MIN,
  1952  //    LLONG_MAX, and ULLONG_MAX.  Instead only the values gcc defined for
  1953  //    ages are available.
  1954  
  1955  // The integer width macros are not defined by GCC's <limits.h> before
  1956  //    GCC 7, or if _GNU_SOURCE rather than
  1957  //    __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature.
  1958  
  1959  // POSIX adds things to <limits.h>.
  1960  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  1961  //    This file is part of the GNU C Library.
  1962  //
  1963  //    The GNU C Library is free software; you can redistribute it and/or
  1964  //    modify it under the terms of the GNU Lesser General Public
  1965  //    License as published by the Free Software Foundation; either
  1966  //    version 2.1 of the License, or (at your option) any later version.
  1967  //
  1968  //    The GNU C Library is distributed in the hope that it will be useful,
  1969  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1970  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1971  //    Lesser General Public License for more details.
  1972  //
  1973  //    You should have received a copy of the GNU Lesser General Public
  1974  //    License along with the GNU C Library; if not, see
  1975  //    <http://www.gnu.org/licenses/>.
  1976  
  1977  //	POSIX Standard: 2.9.2 Minimum Values	Added to <limits.h>
  1978  //
  1979  //	Never include this file directly; use <limits.h> instead.
  1980  
  1981  // Determine the wordsize from the preprocessor defines.
  1982  //
  1983  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  1984  //    This file is part of the GNU C Library.
  1985  //
  1986  //    The GNU C Library is free software; you can redistribute it and/or
  1987  //    modify it under the terms of the GNU Lesser General Public
  1988  //    License as published by the Free Software Foundation; either
  1989  //    version 2.1 of the License, or (at your option) any later version.
  1990  //
  1991  //    The GNU C Library is distributed in the hope that it will be useful,
  1992  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1993  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1994  //    Lesser General Public License for more details.
  1995  //
  1996  //    You should have received a copy of the GNU Lesser General Public
  1997  //    License along with the GNU C Library; if not, see
  1998  //    <http://www.gnu.org/licenses/>.
  1999  
  2000  // These are the standard-mandated minimum values.
  2001  
  2002  // Minimum number of operations in one list I/O call.
  2003  
  2004  // Minimal number of outstanding asynchronous I/O operations.
  2005  
  2006  // Maximum length of arguments to `execve', including environment.
  2007  
  2008  // Maximum simultaneous processes per real user ID.
  2009  
  2010  // Minimal number of timer expiration overruns.
  2011  
  2012  // Maximum length of a host name (not including the terminating null)
  2013  //    as returned from the GETHOSTNAME function.
  2014  
  2015  // Maximum link count of a file.
  2016  
  2017  // Maximum length of login name.
  2018  
  2019  // Number of bytes in a terminal canonical input queue.
  2020  
  2021  // Number of bytes for which space will be
  2022  //    available in a terminal input queue.
  2023  
  2024  // Maximum number of message queues open for a process.
  2025  
  2026  // Maximum number of supported message priorities.
  2027  
  2028  // Number of bytes in a filename.
  2029  
  2030  // Number of simultaneous supplementary group IDs per process.
  2031  
  2032  // Number of files one process can have open at once.
  2033  
  2034  // Number of bytes in a pathname.
  2035  
  2036  // Number of bytes than can be written atomically to a pipe.
  2037  
  2038  // The number of repeated occurrences of a BRE permitted by the
  2039  //    REGEXEC and REGCOMP functions when using the interval notation.
  2040  
  2041  // Minimal number of realtime signals reserved for the application.
  2042  
  2043  // Number of semaphores a process can have.
  2044  
  2045  // Maximal value of a semaphore.
  2046  
  2047  // Number of pending realtime signals.
  2048  
  2049  // Largest value of a `ssize_t'.
  2050  
  2051  // Number of streams a process can have open at once.
  2052  
  2053  // The number of bytes in a symbolic link.
  2054  
  2055  // The number of symbolic links that can be traversed in the
  2056  //    resolution of a pathname in the absence of a loop.
  2057  
  2058  // Number of timer for a process.
  2059  
  2060  // Maximum number of characters in a tty name.
  2061  
  2062  // Maximum length of a timezone name (element of `tzname').
  2063  
  2064  // Maximum clock resolution in nanoseconds.
  2065  
  2066  // Get the implementation-specific values for the above.
  2067  // Minimum guaranteed maximum values for system limits.  Linux version.
  2068  //    Copyright (C) 1993-2018 Free Software Foundation, Inc.
  2069  //
  2070  //    This file is part of the GNU C Library.
  2071  //
  2072  //    The GNU C Library is free software; you can redistribute it and/or
  2073  //    modify it under the terms of the GNU Lesser General Public License as
  2074  //    published by the Free Software Foundation; either version 2.1 of the
  2075  //    License, or (at your option) any later version.
  2076  //
  2077  //    The GNU C Library is distributed in the hope that it will be useful,
  2078  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2079  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2080  //    Lesser General Public License for more details.
  2081  //
  2082  //    You should have received a copy of the GNU Lesser General Public
  2083  //    License along with the GNU C Library.  If not, see
  2084  //    <http://www.gnu.org/licenses/>.
  2085  
  2086  // The kernel header pollutes the namespace with the NR_OPEN symbol
  2087  //    and defines LINK_MAX although filesystems have different maxima.  A
  2088  //    similar thing is true for OPEN_MAX: the limit can be changed at
  2089  //    runtime and therefore the macro must not be defined.  Remove this
  2090  //    after including the header if necessary.
  2091  
  2092  // The kernel sources contain a file with all the needed information.
  2093  // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
  2094  
  2095  // Have to remove NR_OPEN?
  2096  // Have to remove LINK_MAX?
  2097  // Have to remove OPEN_MAX?
  2098  // Have to remove ARG_MAX?
  2099  
  2100  // The number of data keys per process.
  2101  // This is the value this implementation supports.
  2102  
  2103  // Controlling the iterations of destructors for thread-specific data.
  2104  // Number of iterations this implementation does.
  2105  
  2106  // The number of threads per process.
  2107  // We have no predefined limit on the number of threads.
  2108  
  2109  // Maximum amount by which a process can descrease its asynchronous I/O
  2110  //    priority level.
  2111  
  2112  // Minimum size for a thread.  At least two pages for systems with 64k
  2113  //    pages.
  2114  
  2115  // Maximum number of timer expiration overruns.
  2116  
  2117  // Maximum tty name length.
  2118  
  2119  // Maximum login name length.  This is arbitrary.
  2120  
  2121  // Maximum host name length.
  2122  
  2123  // Maximum message queue priority level.
  2124  
  2125  // Maximum value the semaphore can have.
  2126  
  2127  // ssize_t is not formally required to be the signed type
  2128  //    corresponding to size_t, but it is for all configurations supported
  2129  //    by glibc.
  2130  
  2131  // This value is a guaranteed minimum maximum.
  2132  //    The current maximum can be got from `sysconf'.
  2133  
  2134  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  2135  //    This file is part of the GNU C Library.
  2136  //
  2137  //    The GNU C Library is free software; you can redistribute it and/or
  2138  //    modify it under the terms of the GNU Lesser General Public
  2139  //    License as published by the Free Software Foundation; either
  2140  //    version 2.1 of the License, or (at your option) any later version.
  2141  //
  2142  //    The GNU C Library is distributed in the hope that it will be useful,
  2143  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2144  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2145  //    Lesser General Public License for more details.
  2146  //
  2147  //    You should have received a copy of the GNU Lesser General Public
  2148  //    License along with the GNU C Library; if not, see
  2149  //    <http://www.gnu.org/licenses/>.
  2150  
  2151  // Never include this file directly; include <limits.h> instead.
  2152  
  2153  // The maximum `ibase' and `obase' values allowed by the `bc' utility.
  2154  
  2155  // The maximum number of elements allowed in an array by the `bc' utility.
  2156  
  2157  // The maximum `scale' value allowed by the `bc' utility.
  2158  
  2159  // The maximum length of a string constant accepted by the `bc' utility.
  2160  
  2161  // The maximum number of weights that can be assigned to an entry of
  2162  //    the LC_COLLATE `order' keyword in the locale definition file.
  2163  
  2164  // The maximum number of expressions that can be nested
  2165  //    within parentheses by the `expr' utility.
  2166  
  2167  // The maximum length, in bytes, of an input line.
  2168  
  2169  // The maximum number of repeated occurrences of a regular expression
  2170  //    permitted when using the interval notation `\{M,N\}'.
  2171  
  2172  // The maximum number of bytes in a character class name.  We have no
  2173  //    fixed limit, 2048 is a high number.
  2174  
  2175  // These values are implementation-specific,
  2176  //    and may vary within the implementation.
  2177  //    Their precise values can be obtained from sysconf.
  2178  
  2179  // This value is defined like this in regex.h.
  2180  
  2181  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  2182  //
  2183  // This file is part of GCC.
  2184  //
  2185  // GCC is free software; you can redistribute it and/or modify it under
  2186  // the terms of the GNU General Public License as published by the Free
  2187  // Software Foundation; either version 3, or (at your option) any later
  2188  // version.
  2189  //
  2190  // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  2191  // WARRANTY; without even the implied warranty of MERCHANTABILITY or
  2192  // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  2193  // for more details.
  2194  //
  2195  // Under Section 7 of GPL version 3, you are granted additional
  2196  // permissions described in the GCC Runtime Library Exception, version
  2197  // 3.1, as published by the Free Software Foundation.
  2198  //
  2199  // You should have received a copy of the GNU General Public License and
  2200  // a copy of the GCC Runtime Library Exception along with this program;
  2201  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  2202  // <http://www.gnu.org/licenses/>.
  2203  
  2204  // Number of bits in a `char'.
  2205  
  2206  // Maximum length of a multibyte character.
  2207  
  2208  // Minimum and maximum values a `signed char' can hold.
  2209  
  2210  // Maximum value an `unsigned char' can hold.  (Minimum is 0).
  2211  
  2212  // Minimum and maximum values a `char' can hold.
  2213  
  2214  // Minimum and maximum values a `signed short int' can hold.
  2215  
  2216  // Maximum value an `unsigned short int' can hold.  (Minimum is 0).
  2217  
  2218  // Minimum and maximum values a `signed int' can hold.
  2219  
  2220  // Maximum value an `unsigned int' can hold.  (Minimum is 0).
  2221  
  2222  // Minimum and maximum values a `signed long int' can hold.
  2223  //    (Same as `int').
  2224  
  2225  // Maximum value an `unsigned long int' can hold.  (Minimum is 0).
  2226  
  2227  // Minimum and maximum values a `signed long long int' can hold.
  2228  
  2229  // Maximum value an `unsigned long long int' can hold.  (Minimum is 0).
  2230  
  2231  // This administrivia gets added to the end of limits.h
  2232  //    if the system has its own version of limits.h.
  2233  
  2234  type Z_crc_t = uint32 /* zconf.h:429:17 */
  2235  
  2236  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  2237  //    This file is part of the GNU C Library.
  2238  //
  2239  //    The GNU C Library is free software; you can redistribute it and/or
  2240  //    modify it under the terms of the GNU Lesser General Public
  2241  //    License as published by the Free Software Foundation; either
  2242  //    version 2.1 of the License, or (at your option) any later version.
  2243  //
  2244  //    The GNU C Library is distributed in the hope that it will be useful,
  2245  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2246  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2247  //    Lesser General Public License for more details.
  2248  //
  2249  //    You should have received a copy of the GNU Lesser General Public
  2250  //    License along with the GNU C Library; if not, see
  2251  //    <http://www.gnu.org/licenses/>.
  2252  
  2253  //	POSIX Standard: 2.6 Primitive System Data Types	<sys/types.h>
  2254  
  2255  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  2256  //    This file is part of the GNU C Library.
  2257  //
  2258  //    The GNU C Library is free software; you can redistribute it and/or
  2259  //    modify it under the terms of the GNU Lesser General Public
  2260  //    License as published by the Free Software Foundation; either
  2261  //    version 2.1 of the License, or (at your option) any later version.
  2262  //
  2263  //    The GNU C Library is distributed in the hope that it will be useful,
  2264  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2265  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2266  //    Lesser General Public License for more details.
  2267  //
  2268  //    You should have received a copy of the GNU Lesser General Public
  2269  //    License along with the GNU C Library; if not, see
  2270  //    <http://www.gnu.org/licenses/>.
  2271  
  2272  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2273  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  2274  //    This file is part of the GNU C Library.
  2275  //
  2276  //    The GNU C Library is free software; you can redistribute it and/or
  2277  //    modify it under the terms of the GNU Lesser General Public
  2278  //    License as published by the Free Software Foundation; either
  2279  //    version 2.1 of the License, or (at your option) any later version.
  2280  //
  2281  //    The GNU C Library is distributed in the hope that it will be useful,
  2282  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2283  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2284  //    Lesser General Public License for more details.
  2285  //
  2286  //    You should have received a copy of the GNU Lesser General Public
  2287  //    License along with the GNU C Library; if not, see
  2288  //    <http://www.gnu.org/licenses/>.
  2289  
  2290  // Never include this file directly; use <sys/types.h> instead.
  2291  
  2292  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  2293  //    This file is part of the GNU C Library.
  2294  //
  2295  //    The GNU C Library is free software; you can redistribute it and/or
  2296  //    modify it under the terms of the GNU Lesser General Public
  2297  //    License as published by the Free Software Foundation; either
  2298  //    version 2.1 of the License, or (at your option) any later version.
  2299  //
  2300  //    The GNU C Library is distributed in the hope that it will be useful,
  2301  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2302  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2303  //    Lesser General Public License for more details.
  2304  //
  2305  //    You should have received a copy of the GNU Lesser General Public
  2306  //    License along with the GNU C Library; if not, see
  2307  //    <http://www.gnu.org/licenses/>.
  2308  
  2309  // Determine the wordsize from the preprocessor defines.
  2310  //
  2311  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  2312  //    This file is part of the GNU C Library.
  2313  //
  2314  //    The GNU C Library is free software; you can redistribute it and/or
  2315  //    modify it under the terms of the GNU Lesser General Public
  2316  //    License as published by the Free Software Foundation; either
  2317  //    version 2.1 of the License, or (at your option) any later version.
  2318  //
  2319  //    The GNU C Library is distributed in the hope that it will be useful,
  2320  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2321  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2322  //    Lesser General Public License for more details.
  2323  //
  2324  //    You should have received a copy of the GNU Lesser General Public
  2325  //    License along with the GNU C Library; if not, see
  2326  //    <http://www.gnu.org/licenses/>.
  2327  
  2328  // Convenience types.
  2329  type X__u_char = uint8   /* types.h:30:23 */
  2330  type X__u_short = uint16 /* types.h:31:28 */
  2331  type X__u_int = uint32   /* types.h:32:22 */
  2332  type X__u_long = uint64  /* types.h:33:27 */
  2333  
  2334  // Fixed-size types, underlying types depend on word size and compiler.
  2335  type X__int8_t = int8     /* types.h:36:21 */
  2336  type X__uint8_t = uint8   /* types.h:37:23 */
  2337  type X__int16_t = int16   /* types.h:38:26 */
  2338  type X__uint16_t = uint16 /* types.h:39:28 */
  2339  type X__int32_t = int32   /* types.h:40:20 */
  2340  type X__uint32_t = uint32 /* types.h:41:22 */
  2341  type X__int64_t = int64   /* types.h:43:25 */
  2342  type X__uint64_t = uint64 /* types.h:44:27 */
  2343  
  2344  // Smallest types with at least a given width.
  2345  type X__int_least8_t = X__int8_t     /* types.h:51:18 */
  2346  type X__uint_least8_t = X__uint8_t   /* types.h:52:19 */
  2347  type X__int_least16_t = X__int16_t   /* types.h:53:19 */
  2348  type X__uint_least16_t = X__uint16_t /* types.h:54:20 */
  2349  type X__int_least32_t = X__int32_t   /* types.h:55:19 */
  2350  type X__uint_least32_t = X__uint32_t /* types.h:56:20 */
  2351  type X__int_least64_t = X__int64_t   /* types.h:57:19 */
  2352  type X__uint_least64_t = X__uint64_t /* types.h:58:20 */
  2353  
  2354  // quad_t is also 64 bits.
  2355  type X__quad_t = int64    /* types.h:62:18 */
  2356  type X__u_quad_t = uint64 /* types.h:63:27 */
  2357  
  2358  // Largest integral types.
  2359  type X__intmax_t = int64   /* types.h:71:18 */
  2360  type X__uintmax_t = uint64 /* types.h:72:27 */
  2361  
  2362  // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE
  2363  //    macros for each of the OS types we define below.  The definitions
  2364  //    of those macros must use the following macros for underlying types.
  2365  //    We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned
  2366  //    variants of each of the following integer types on this machine.
  2367  //
  2368  // 	16		-- "natural" 16-bit type (always short)
  2369  // 	32		-- "natural" 32-bit type (always int)
  2370  // 	64		-- "natural" 64-bit type (long or long long)
  2371  // 	LONG32		-- 32-bit type, traditionally long
  2372  // 	QUAD		-- 64-bit type, always long long
  2373  // 	WORD		-- natural type of __WORDSIZE bits (int or long)
  2374  // 	LONGWORD	-- type of __WORDSIZE bits, traditionally long
  2375  //
  2376  //    We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the
  2377  //    conventional uses of `long' or `long long' type modifiers match the
  2378  //    types we define, even when a less-adorned type would be the same size.
  2379  //    This matters for (somewhat) portably writing printf/scanf formats for
  2380  //    these types, where using the appropriate l or ll format modifiers can
  2381  //    make the typedefs and the formats match up across all GNU platforms.  If
  2382  //    we used `long' when it's 64 bits where `long long' is expected, then the
  2383  //    compiler would warn about the formats not matching the argument types,
  2384  //    and the programmer changing them to shut up the compiler would break the
  2385  //    program's portability.
  2386  //
  2387  //    Here we assume what is presently the case in all the GCC configurations
  2388  //    we support: long long is always 64 bits, long is always word/address size,
  2389  //    and int is always 32 bits.
  2390  
  2391  // No need to mark the typedef with __extension__.
  2392  // bits/typesizes.h -- underlying types for *_t.  For the generic Linux ABI.
  2393  //    Copyright (C) 2011-2018 Free Software Foundation, Inc.
  2394  //    This file is part of the GNU C Library.
  2395  //    Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
  2396  //
  2397  //    The GNU C Library is free software; you can redistribute it and/or
  2398  //    modify it under the terms of the GNU Lesser General Public
  2399  //    License as published by the Free Software Foundation; either
  2400  //    version 2.1 of the License, or (at your option) any later version.
  2401  //
  2402  //    The GNU C Library is distributed in the hope that it will be useful,
  2403  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2404  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2405  //    Lesser General Public License for more details.
  2406  //
  2407  //    You should have received a copy of the GNU Lesser General Public
  2408  //    License along with the GNU C Library.  If not, see
  2409  //    <http://www.gnu.org/licenses/>.
  2410  
  2411  // See <bits/types.h> for the meaning of these macros.  This file exists so
  2412  //    that <bits/types.h> need not vary across different GNU platforms.
  2413  
  2414  // Tell the libc code that off_t and off64_t are actually the same type
  2415  //    for all ABI purposes, even if possibly expressed as different base types
  2416  //    for C type-checking purposes.
  2417  
  2418  // Same for ino_t and ino64_t.
  2419  
  2420  // And for __rlim_t and __rlim64_t.
  2421  
  2422  // Number of descriptors that can fit in an `fd_set'.
  2423  
  2424  type X__dev_t = uint64                     /* types.h:143:25 */ // Type of device numbers.
  2425  type X__uid_t = uint32                     /* types.h:144:25 */ // Type of user identifications.
  2426  type X__gid_t = uint32                     /* types.h:145:25 */ // Type of group identifications.
  2427  type X__ino_t = uint64                     /* types.h:146:25 */ // Type of file serial numbers.
  2428  type X__ino64_t = uint64                   /* types.h:147:27 */ // Type of file serial numbers (LFS).
  2429  type X__mode_t = uint32                    /* types.h:148:26 */ // Type of file attribute bitmasks.
  2430  type X__nlink_t = uint32                   /* types.h:149:27 */ // Type of file link counts.
  2431  type X__off_t = int64                      /* types.h:150:25 */ // Type of file sizes and offsets.
  2432  type X__off64_t = int64                    /* types.h:151:27 */ // Type of file sizes and offsets (LFS).
  2433  type X__pid_t = int32                      /* types.h:152:25 */ // Type of process identifications.
  2434  type X__fsid_t = struct{ F__val [2]int32 } /* types.h:153:26 */ // Type of file system IDs.
  2435  type X__clock_t = int64                    /* types.h:154:27 */ // Type of CPU usage counts.
  2436  type X__rlim_t = uint64                    /* types.h:155:26 */ // Type for resource measurement.
  2437  type X__rlim64_t = uint64                  /* types.h:156:28 */ // Type for resource measurement (LFS).
  2438  type X__id_t = uint32                      /* types.h:157:24 */ // General type for IDs.
  2439  type X__time_t = int64                     /* types.h:158:26 */ // Seconds since the Epoch.
  2440  type X__useconds_t = uint32                /* types.h:159:30 */ // Count of microseconds.
  2441  type X__suseconds_t = int64                /* types.h:160:31 */ // Signed count of microseconds.
  2442  
  2443  type X__daddr_t = int32 /* types.h:162:27 */ // The type of a disk address.
  2444  type X__key_t = int32   /* types.h:163:25 */ // Type of an IPC key.
  2445  
  2446  // Clock ID used in clock and timer functions.
  2447  type X__clockid_t = int32 /* types.h:166:29 */
  2448  
  2449  // Timer ID returned by `timer_create'.
  2450  type X__timer_t = uintptr /* types.h:169:12 */
  2451  
  2452  // Type to represent block size.
  2453  type X__blksize_t = int32 /* types.h:172:29 */
  2454  
  2455  // Types from the Large File Support interface.
  2456  
  2457  // Type to count number of disk blocks.
  2458  type X__blkcnt_t = int64   /* types.h:177:28 */
  2459  type X__blkcnt64_t = int64 /* types.h:178:30 */
  2460  
  2461  // Type to count file system blocks.
  2462  type X__fsblkcnt_t = uint64   /* types.h:181:30 */
  2463  type X__fsblkcnt64_t = uint64 /* types.h:182:32 */
  2464  
  2465  // Type to count file system nodes.
  2466  type X__fsfilcnt_t = uint64   /* types.h:185:30 */
  2467  type X__fsfilcnt64_t = uint64 /* types.h:186:32 */
  2468  
  2469  // Type of miscellaneous file system fields.
  2470  type X__fsword_t = int64 /* types.h:189:28 */
  2471  
  2472  type X__ssize_t = int64 /* types.h:191:27 */ // Type of a byte count, or error.
  2473  
  2474  // Signed long type used in system calls.
  2475  type X__syscall_slong_t = int64 /* types.h:194:33 */
  2476  // Unsigned long type used in system calls.
  2477  type X__syscall_ulong_t = uint64 /* types.h:196:33 */
  2478  
  2479  // These few don't really vary by system, they always correspond
  2480  //    to one of the other defined types.
  2481  type X__loff_t = X__off64_t /* types.h:200:19 */ // Type of file sizes and offsets (LFS).
  2482  type X__caddr_t = uintptr   /* types.h:201:14 */
  2483  
  2484  // Duplicates info from stdint.h but this is used in unistd.h.
  2485  type X__intptr_t = int64 /* types.h:204:25 */
  2486  
  2487  // Duplicate info from sys/socket.h.
  2488  type X__socklen_t = uint32 /* types.h:207:23 */
  2489  
  2490  // C99: An integer type that can be accessed as an atomic entity,
  2491  //    even in the presence of asynchronous interrupts.
  2492  //    It is not currently necessary for this to be machine-specific.
  2493  type X__sig_atomic_t = int32 /* types.h:212:13 */
  2494  
  2495  type U_char = X__u_char     /* types.h:33:18 */
  2496  type U_short = X__u_short   /* types.h:34:19 */
  2497  type U_int = X__u_int       /* types.h:35:17 */
  2498  type U_long = X__u_long     /* types.h:36:18 */
  2499  type Quad_t = X__quad_t     /* types.h:37:18 */
  2500  type U_quad_t = X__u_quad_t /* types.h:38:20 */
  2501  type Fsid_t = X__fsid_t     /* types.h:39:18 */
  2502  type Loff_t = X__loff_t     /* types.h:42:18 */
  2503  
  2504  type Ino_t = X__ino64_t   /* types.h:49:19 */
  2505  type Ino64_t = X__ino64_t /* types.h:54:19 */
  2506  
  2507  type Dev_t = X__dev_t /* types.h:59:17 */
  2508  
  2509  type Gid_t = X__gid_t /* types.h:64:17 */
  2510  
  2511  type Mode_t = X__mode_t /* types.h:69:18 */
  2512  
  2513  type Nlink_t = X__nlink_t /* types.h:74:19 */
  2514  
  2515  type Uid_t = X__uid_t /* types.h:79:17 */
  2516  
  2517  type Off_t = X__off64_t   /* types.h:87:19 */
  2518  type Off64_t = X__off64_t /* types.h:92:19 */
  2519  
  2520  type Pid_t = X__pid_t /* types.h:97:17 */
  2521  
  2522  type Id_t = X__id_t /* types.h:103:16 */
  2523  
  2524  type Ssize_t = X__ssize_t /* types.h:108:19 */
  2525  
  2526  type Daddr_t = X__daddr_t /* types.h:114:19 */
  2527  type Caddr_t = X__caddr_t /* types.h:115:19 */
  2528  
  2529  type Key_t = X__key_t /* types.h:121:17 */
  2530  
  2531  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2532  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  2533  //    This file is part of the GNU C Library.
  2534  //
  2535  //    The GNU C Library is free software; you can redistribute it and/or
  2536  //    modify it under the terms of the GNU Lesser General Public
  2537  //    License as published by the Free Software Foundation; either
  2538  //    version 2.1 of the License, or (at your option) any later version.
  2539  //
  2540  //    The GNU C Library is distributed in the hope that it will be useful,
  2541  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2542  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2543  //    Lesser General Public License for more details.
  2544  //
  2545  //    You should have received a copy of the GNU Lesser General Public
  2546  //    License along with the GNU C Library; if not, see
  2547  //    <http://www.gnu.org/licenses/>.
  2548  
  2549  // Never include this file directly; use <sys/types.h> instead.
  2550  
  2551  // Returned by `clock'.
  2552  type Clock_t = X__clock_t /* clock_t.h:7:19 */
  2553  
  2554  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2555  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  2556  //    This file is part of the GNU C Library.
  2557  //
  2558  //    The GNU C Library is free software; you can redistribute it and/or
  2559  //    modify it under the terms of the GNU Lesser General Public
  2560  //    License as published by the Free Software Foundation; either
  2561  //    version 2.1 of the License, or (at your option) any later version.
  2562  //
  2563  //    The GNU C Library is distributed in the hope that it will be useful,
  2564  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2565  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2566  //    Lesser General Public License for more details.
  2567  //
  2568  //    You should have received a copy of the GNU Lesser General Public
  2569  //    License along with the GNU C Library; if not, see
  2570  //    <http://www.gnu.org/licenses/>.
  2571  
  2572  // Never include this file directly; use <sys/types.h> instead.
  2573  
  2574  // Clock ID used in clock and timer functions.
  2575  type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */
  2576  
  2577  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2578  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  2579  //    This file is part of the GNU C Library.
  2580  //
  2581  //    The GNU C Library is free software; you can redistribute it and/or
  2582  //    modify it under the terms of the GNU Lesser General Public
  2583  //    License as published by the Free Software Foundation; either
  2584  //    version 2.1 of the License, or (at your option) any later version.
  2585  //
  2586  //    The GNU C Library is distributed in the hope that it will be useful,
  2587  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2588  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2589  //    Lesser General Public License for more details.
  2590  //
  2591  //    You should have received a copy of the GNU Lesser General Public
  2592  //    License along with the GNU C Library; if not, see
  2593  //    <http://www.gnu.org/licenses/>.
  2594  
  2595  // Never include this file directly; use <sys/types.h> instead.
  2596  
  2597  // Returned by `time'.
  2598  type Time_t = X__time_t /* time_t.h:7:18 */
  2599  
  2600  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2601  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  2602  //    This file is part of the GNU C Library.
  2603  //
  2604  //    The GNU C Library is free software; you can redistribute it and/or
  2605  //    modify it under the terms of the GNU Lesser General Public
  2606  //    License as published by the Free Software Foundation; either
  2607  //    version 2.1 of the License, or (at your option) any later version.
  2608  //
  2609  //    The GNU C Library is distributed in the hope that it will be useful,
  2610  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2611  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2612  //    Lesser General Public License for more details.
  2613  //
  2614  //    You should have received a copy of the GNU Lesser General Public
  2615  //    License along with the GNU C Library; if not, see
  2616  //    <http://www.gnu.org/licenses/>.
  2617  
  2618  // Never include this file directly; use <sys/types.h> instead.
  2619  
  2620  // Timer ID returned by `timer_create'.
  2621  type Timer_t = X__timer_t /* timer_t.h:7:19 */
  2622  
  2623  // Copyright (C) 1989-2018 Free Software Foundation, Inc.
  2624  //
  2625  // This file is part of GCC.
  2626  //
  2627  // GCC is free software; you can redistribute it and/or modify
  2628  // it under the terms of the GNU General Public License as published by
  2629  // the Free Software Foundation; either version 3, or (at your option)
  2630  // any later version.
  2631  //
  2632  // GCC is distributed in the hope that it will be useful,
  2633  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  2634  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2635  // GNU General Public License for more details.
  2636  //
  2637  // Under Section 7 of GPL version 3, you are granted additional
  2638  // permissions described in the GCC Runtime Library Exception, version
  2639  // 3.1, as published by the Free Software Foundation.
  2640  //
  2641  // You should have received a copy of the GNU General Public License and
  2642  // a copy of the GCC Runtime Library Exception along with this program;
  2643  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  2644  // <http://www.gnu.org/licenses/>.
  2645  
  2646  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  2647  
  2648  // Any one of these symbols __need_* means that GNU libc
  2649  //    wants us just to define one data type.  So don't define
  2650  //    the symbols that indicate this file's entire job has been done.
  2651  
  2652  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  2653  //    There's no way to win with the other order!  Sun lossage.
  2654  
  2655  // On 4.3bsd-net2, make sure ansi.h is included, so we have
  2656  //    one less case to deal with in the following.
  2657  // On FreeBSD 5, machine/ansi.h does not exist anymore...
  2658  
  2659  // In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
  2660  //    defined if the corresponding type is *not* defined.
  2661  //    FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
  2662  //    NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_
  2663  
  2664  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  2665  //    Just ignore it.
  2666  
  2667  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  2668  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  2669  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  2670  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  2671  //    If we find that the macros are still defined at this point, we must
  2672  //    invoke them so that the type is defined as expected.
  2673  
  2674  // In case nobody has defined these types, but we aren't running under
  2675  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  2676  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  2677  //    parts of GCC is compiled by an older compiler, that actually
  2678  //    include gstddef.h, such as collect2.
  2679  
  2680  // Signed type of difference of two pointers.
  2681  
  2682  // Define this type if we are doing the whole job,
  2683  //    or if we want this type in particular.
  2684  
  2685  // If this symbol has done its job, get rid of it.
  2686  
  2687  // Unsigned type of `sizeof' something.
  2688  
  2689  // Define this type if we are doing the whole job,
  2690  //    or if we want this type in particular.
  2691  
  2692  // Wide character type.
  2693  //    Locale-writers should change this as necessary to
  2694  //    be big enough to hold unique values not between 0 and 127,
  2695  //    and not (wchar_t) -1, for each defined multibyte character.
  2696  
  2697  // Define this type if we are doing the whole job,
  2698  //    or if we want this type in particular.
  2699  
  2700  //  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
  2701  //     are already defined.
  2702  //  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
  2703  //  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
  2704  
  2705  // A null pointer constant.
  2706  
  2707  // Offset of member MEMBER in a struct of type TYPE.
  2708  
  2709  // Old compatibility names for C types.
  2710  type Ulong = uint64  /* types.h:148:27 */
  2711  type Ushort = uint16 /* types.h:149:28 */
  2712  type Uint = uint32   /* types.h:150:22 */
  2713  
  2714  // These size-specific names are used by some of the inet code.
  2715  
  2716  // Define intN_t types.
  2717  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  2718  //    This file is part of the GNU C Library.
  2719  //
  2720  //    The GNU C Library is free software; you can redistribute it and/or
  2721  //    modify it under the terms of the GNU Lesser General Public
  2722  //    License as published by the Free Software Foundation; either
  2723  //    version 2.1 of the License, or (at your option) any later version.
  2724  //
  2725  //    The GNU C Library is distributed in the hope that it will be useful,
  2726  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2727  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2728  //    Lesser General Public License for more details.
  2729  //
  2730  //    You should have received a copy of the GNU Lesser General Public
  2731  //    License along with the GNU C Library; if not, see
  2732  //    <http://www.gnu.org/licenses/>.
  2733  
  2734  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2735  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  2736  //    This file is part of the GNU C Library.
  2737  //
  2738  //    The GNU C Library is free software; you can redistribute it and/or
  2739  //    modify it under the terms of the GNU Lesser General Public
  2740  //    License as published by the Free Software Foundation; either
  2741  //    version 2.1 of the License, or (at your option) any later version.
  2742  //
  2743  //    The GNU C Library is distributed in the hope that it will be useful,
  2744  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2745  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2746  //    Lesser General Public License for more details.
  2747  //
  2748  //    You should have received a copy of the GNU Lesser General Public
  2749  //    License along with the GNU C Library; if not, see
  2750  //    <http://www.gnu.org/licenses/>.
  2751  
  2752  // Never include this file directly; use <sys/types.h> instead.
  2753  
  2754  type Int8_t = X__int8_t   /* stdint-intn.h:24:18 */
  2755  type Int16_t = X__int16_t /* stdint-intn.h:25:19 */
  2756  type Int32_t = X__int32_t /* stdint-intn.h:26:19 */
  2757  type Int64_t = X__int64_t /* stdint-intn.h:27:19 */
  2758  
  2759  // For GCC 2.7 and later, we can use specific type-size attributes.
  2760  
  2761  type U_int8_t = uint32  /* types.h:177:1 */
  2762  type U_int16_t = uint32 /* types.h:178:1 */
  2763  type U_int32_t = uint32 /* types.h:179:1 */
  2764  type U_int64_t = uint32 /* types.h:180:1 */
  2765  
  2766  type Register_t = int32 /* types.h:182:13 */
  2767  
  2768  // It also defines `fd_set' and the FD_* macros for `select'.
  2769  // `fd_set' type and related macros, and `select'/`pselect' declarations.
  2770  //    Copyright (C) 1996-2018 Free Software Foundation, Inc.
  2771  //    This file is part of the GNU C Library.
  2772  //
  2773  //    The GNU C Library is free software; you can redistribute it and/or
  2774  //    modify it under the terms of the GNU Lesser General Public
  2775  //    License as published by the Free Software Foundation; either
  2776  //    version 2.1 of the License, or (at your option) any later version.
  2777  //
  2778  //    The GNU C Library is distributed in the hope that it will be useful,
  2779  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2780  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2781  //    Lesser General Public License for more details.
  2782  //
  2783  //    You should have received a copy of the GNU Lesser General Public
  2784  //    License along with the GNU C Library; if not, see
  2785  //    <http://www.gnu.org/licenses/>.
  2786  
  2787  //	POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h>
  2788  
  2789  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  2790  //    This file is part of the GNU C Library.
  2791  //
  2792  //    The GNU C Library is free software; you can redistribute it and/or
  2793  //    modify it under the terms of the GNU Lesser General Public
  2794  //    License as published by the Free Software Foundation; either
  2795  //    version 2.1 of the License, or (at your option) any later version.
  2796  //
  2797  //    The GNU C Library is distributed in the hope that it will be useful,
  2798  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2799  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2800  //    Lesser General Public License for more details.
  2801  //
  2802  //    You should have received a copy of the GNU Lesser General Public
  2803  //    License along with the GNU C Library; if not, see
  2804  //    <http://www.gnu.org/licenses/>.
  2805  
  2806  // Get definition of needed basic types.
  2807  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2808  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  2809  //    This file is part of the GNU C Library.
  2810  //
  2811  //    The GNU C Library is free software; you can redistribute it and/or
  2812  //    modify it under the terms of the GNU Lesser General Public
  2813  //    License as published by the Free Software Foundation; either
  2814  //    version 2.1 of the License, or (at your option) any later version.
  2815  //
  2816  //    The GNU C Library is distributed in the hope that it will be useful,
  2817  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2818  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2819  //    Lesser General Public License for more details.
  2820  //
  2821  //    You should have received a copy of the GNU Lesser General Public
  2822  //    License along with the GNU C Library; if not, see
  2823  //    <http://www.gnu.org/licenses/>.
  2824  
  2825  // Never include this file directly; use <sys/types.h> instead.
  2826  
  2827  // Get __FD_* definitions.
  2828  // Copyright (C) 1997-2018 Free Software Foundation, Inc.
  2829  //    This file is part of the GNU C Library.
  2830  //
  2831  //    The GNU C Library is free software; you can redistribute it and/or
  2832  //    modify it under the terms of the GNU Lesser General Public
  2833  //    License as published by the Free Software Foundation; either
  2834  //    version 2.1 of the License, or (at your option) any later version.
  2835  //
  2836  //    The GNU C Library is distributed in the hope that it will be useful,
  2837  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2838  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2839  //    Lesser General Public License for more details.
  2840  //
  2841  //    You should have received a copy of the GNU Lesser General Public
  2842  //    License along with the GNU C Library; if not, see
  2843  //    <http://www.gnu.org/licenses/>.
  2844  
  2845  // We don't use `memset' because this would require a prototype and
  2846  //    the array isn't too big.
  2847  
  2848  // Get sigset_t.
  2849  
  2850  type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */
  2851  
  2852  // A set of signals to be blocked, unblocked, or waited for.
  2853  type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */
  2854  
  2855  // Get definition of timer specification structures.
  2856  
  2857  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2858  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  2859  //    This file is part of the GNU C Library.
  2860  //
  2861  //    The GNU C Library is free software; you can redistribute it and/or
  2862  //    modify it under the terms of the GNU Lesser General Public
  2863  //    License as published by the Free Software Foundation; either
  2864  //    version 2.1 of the License, or (at your option) any later version.
  2865  //
  2866  //    The GNU C Library is distributed in the hope that it will be useful,
  2867  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2868  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2869  //    Lesser General Public License for more details.
  2870  //
  2871  //    You should have received a copy of the GNU Lesser General Public
  2872  //    License along with the GNU C Library; if not, see
  2873  //    <http://www.gnu.org/licenses/>.
  2874  
  2875  // Never include this file directly; use <sys/types.h> instead.
  2876  
  2877  // A time value that is accurate to the nearest
  2878  //    microsecond but also has a range of years.
  2879  type Timeval = struct {
  2880  	Ftv_sec  X__time_t
  2881  	Ftv_usec X__suseconds_t
  2882  } /* struct_timeval.h:8:1 */
  2883  
  2884  // NB: Include guard matches what <linux/time.h> uses.
  2885  
  2886  // bits/types.h -- definitions of __*_t types underlying *_t types.
  2887  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  2888  //    This file is part of the GNU C Library.
  2889  //
  2890  //    The GNU C Library is free software; you can redistribute it and/or
  2891  //    modify it under the terms of the GNU Lesser General Public
  2892  //    License as published by the Free Software Foundation; either
  2893  //    version 2.1 of the License, or (at your option) any later version.
  2894  //
  2895  //    The GNU C Library is distributed in the hope that it will be useful,
  2896  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2897  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2898  //    Lesser General Public License for more details.
  2899  //
  2900  //    You should have received a copy of the GNU Lesser General Public
  2901  //    License along with the GNU C Library; if not, see
  2902  //    <http://www.gnu.org/licenses/>.
  2903  
  2904  // Never include this file directly; use <sys/types.h> instead.
  2905  
  2906  // POSIX.1b structure for a time value.  This is like a `struct timeval' but
  2907  //    has nanoseconds instead of microseconds.
  2908  type Timespec = struct {
  2909  	Ftv_sec  X__time_t
  2910  	Ftv_nsec X__syscall_slong_t
  2911  } /* struct_timespec.h:9:1 */
  2912  
  2913  type Suseconds_t = X__suseconds_t /* select.h:43:23 */
  2914  
  2915  // The fd_set member is required to be an array of longs.
  2916  type X__fd_mask = int64 /* select.h:49:18 */
  2917  
  2918  // Some versions of <linux/posix_types.h> define this macros.
  2919  // It's easier to assume 8-bit bytes than to get CHAR_BIT.
  2920  
  2921  // fd_set for select and pselect.
  2922  type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */
  2923  
  2924  // Maximum number of file descriptors in `fd_set'.
  2925  
  2926  // Sometimes the fd_set member is assumed to have this type.
  2927  type Fd_mask = X__fd_mask /* select.h:77:19 */
  2928  
  2929  // Define some inlines helping to catch common problems.
  2930  
  2931  type Blksize_t = X__blksize_t /* types.h:202:21 */
  2932  
  2933  // Types from the Large File Support interface.
  2934  type Blkcnt_t = X__blkcnt64_t     /* types.h:222:22 */ // Type to count number of disk blocks.
  2935  type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:226:24 */ // Type to count file system blocks.
  2936  type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:230:24 */ // Type to count file system inodes.
  2937  
  2938  type Blkcnt64_t = X__blkcnt64_t     /* types.h:236:22 */ // Type to count number of disk blocks.
  2939  type Fsblkcnt64_t = X__fsblkcnt64_t /* types.h:237:24 */ // Type to count file system blocks.
  2940  type Fsfilcnt64_t = X__fsfilcnt64_t /* types.h:238:24 */ // Type to count file system inodes.
  2941  
  2942  // Now add the thread types.
  2943  // Declaration of common pthread types for all architectures.
  2944  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  2945  //    This file is part of the GNU C Library.
  2946  //
  2947  //    The GNU C Library is free software; you can redistribute it and/or
  2948  //    modify it under the terms of the GNU Lesser General Public
  2949  //    License as published by the Free Software Foundation; either
  2950  //    version 2.1 of the License, or (at your option) any later version.
  2951  //
  2952  //    The GNU C Library is distributed in the hope that it will be useful,
  2953  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2954  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2955  //    Lesser General Public License for more details.
  2956  //
  2957  //    You should have received a copy of the GNU Lesser General Public
  2958  //    License along with the GNU C Library; if not, see
  2959  //    <http://www.gnu.org/licenses/>.
  2960  
  2961  // For internal mutex and condition variable definitions.
  2962  // Common threading primitives definitions for both POSIX and C11.
  2963  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  2964  //    This file is part of the GNU C Library.
  2965  //
  2966  //    The GNU C Library is free software; you can redistribute it and/or
  2967  //    modify it under the terms of the GNU Lesser General Public
  2968  //    License as published by the Free Software Foundation; either
  2969  //    version 2.1 of the License, or (at your option) any later version.
  2970  //
  2971  //    The GNU C Library is distributed in the hope that it will be useful,
  2972  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  2973  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  2974  //    Lesser General Public License for more details.
  2975  //
  2976  //    You should have received a copy of the GNU Lesser General Public
  2977  //    License along with the GNU C Library; if not, see
  2978  //    <http://www.gnu.org/licenses/>.
  2979  
  2980  // Arch-specific definitions.  Each architecture must define the following
  2981  //    macros to define the expected sizes of pthread data types:
  2982  //
  2983  //    __SIZEOF_PTHREAD_ATTR_T        - size of pthread_attr_t.
  2984  //    __SIZEOF_PTHREAD_MUTEX_T       - size of pthread_mutex_t.
  2985  //    __SIZEOF_PTHREAD_MUTEXATTR_T   - size of pthread_mutexattr_t.
  2986  //    __SIZEOF_PTHREAD_COND_T        - size of pthread_cond_t.
  2987  //    __SIZEOF_PTHREAD_CONDATTR_T    - size of pthread_condattr_t.
  2988  //    __SIZEOF_PTHREAD_RWLOCK_T      - size of pthread_rwlock_t.
  2989  //    __SIZEOF_PTHREAD_RWLOCKATTR_T  - size of pthread_rwlockattr_t.
  2990  //    __SIZEOF_PTHREAD_BARRIER_T     - size of pthread_barrier_t.
  2991  //    __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
  2992  //
  2993  //    Also, the following macros must be define for internal pthread_mutex_t
  2994  //    struct definitions (struct __pthread_mutex_s):
  2995  //
  2996  //    __PTHREAD_COMPAT_PADDING_MID   - any additional members after 'kind'
  2997  // 				    and before '__spin' (for 64 bits) or
  2998  // 				    '__nusers' (for 32 bits).
  2999  //    __PTHREAD_COMPAT_PADDING_END   - any additional members at the end of
  3000  // 				    the internal structure.
  3001  //    __PTHREAD_MUTEX_LOCK_ELISION   - 1 if the architecture supports lock
  3002  // 				    elision or 0 otherwise.
  3003  //    __PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers.  The
  3004  // 				       preferred value for new architectures
  3005  // 				       is 0.
  3006  //    __PTHREAD_MUTEX_USE_UNION      - control whether internal __spins and
  3007  // 				    __list will be place inside a union for
  3008  // 				    linuxthreads compatibility.
  3009  // 				    The preferred value for new architectures
  3010  // 				    is 0.
  3011  //
  3012  //    For a new port the preferred values for the required defines are:
  3013  //
  3014  //    #define __PTHREAD_COMPAT_PADDING_MID
  3015  //    #define __PTHREAD_COMPAT_PADDING_END
  3016  //    #define __PTHREAD_MUTEX_LOCK_ELISION         0
  3017  //    #define __PTHREAD_MUTEX_NUSERS_AFTER_KIND    0
  3018  //    #define __PTHREAD_MUTEX_USE_UNION            0
  3019  //
  3020  //    __PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to
  3021  //    eventually support lock elision using transactional memory.
  3022  //
  3023  //    The additional macro defines any constraint for the lock alignment
  3024  //    inside the thread structures:
  3025  //
  3026  //    __LOCK_ALIGNMENT - for internal lock/futex usage.
  3027  //
  3028  //    Same idea but for the once locking primitive:
  3029  //
  3030  //    __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
  3031  //
  3032  //    And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t)
  3033  //    must be defined.
  3034  //
  3035  // Copyright (C) 2002-2018 Free Software Foundation, Inc.
  3036  //
  3037  //    This file is part of the GNU C Library.
  3038  //
  3039  //    The GNU C Library is free software; you can redistribute it and/or
  3040  //    modify it under the terms of the GNU Lesser General Public
  3041  //    License as published by the Free Software Foundation; either
  3042  //    version 2.1 of the License, or (at your option) any later version.
  3043  //
  3044  //    The GNU C Library is distributed in the hope that it will be useful,
  3045  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3046  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3047  //    Lesser General Public License for more details.
  3048  //
  3049  //    You should have received a copy of the GNU Lesser General Public
  3050  //    License along with the GNU C Library; if not, see
  3051  //    <http://www.gnu.org/licenses/>.
  3052  
  3053  // Copyright (C) 1992-2018 Free Software Foundation, Inc.
  3054  //    This file is part of the GNU C Library.
  3055  //
  3056  //    The GNU C Library is free software; you can redistribute it and/or
  3057  //    modify it under the terms of the GNU Lesser General Public
  3058  //    License as published by the Free Software Foundation; either
  3059  //    version 2.1 of the License, or (at your option) any later version.
  3060  //
  3061  //    The GNU C Library is distributed in the hope that it will be useful,
  3062  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3063  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3064  //    Lesser General Public License for more details.
  3065  //
  3066  //    You should have received a copy of the GNU Lesser General Public
  3067  //    License along with the GNU C Library; if not, see
  3068  //    <http://www.gnu.org/licenses/>.
  3069  
  3070  // Definitions for internal mutex struct.
  3071  
  3072  type X__pthread_rwlock_arch_t = struct {
  3073  	F__readers       uint32
  3074  	F__writers       uint32
  3075  	F__wrphase_futex uint32
  3076  	F__writers_futex uint32
  3077  	F__pad3          uint32
  3078  	F__pad4          uint32
  3079  	F__cur_writer    int32
  3080  	F__shared        int32
  3081  	F__pad1          uint64
  3082  	F__pad2          uint64
  3083  	F__flags         uint32
  3084  	_                [4]byte
  3085  } /* pthreadtypes-arch.h:54:1 */
  3086  
  3087  // Common definition of pthread_mutex_t.
  3088  
  3089  type X__pthread_internal_list = struct {
  3090  	F__prev uintptr
  3091  	F__next uintptr
  3092  } /* thread-shared-types.h:82:9 */
  3093  
  3094  // Common definition of pthread_mutex_t.
  3095  
  3096  type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:86:3 */
  3097  
  3098  // Lock elision support.
  3099  // Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.
  3100  
  3101  type X__pthread_mutex_s = struct {
  3102  	F__lock   int32
  3103  	F__count  uint32
  3104  	F__owner  int32
  3105  	F__nusers uint32
  3106  	F__kind   int32
  3107  	F__spins  int32
  3108  	F__list   X__pthread_list_t
  3109  } /* thread-shared-types.h:118:1 */
  3110  
  3111  // Common definition of pthread_cond_t.
  3112  
  3113  type X__pthread_cond_s = struct {
  3114  	F__0            struct{ F__wseq uint64 }
  3115  	F__8            struct{ F__g1_start uint64 }
  3116  	F__g_refs       [2]uint32
  3117  	F__g_size       [2]uint32
  3118  	F__g1_orig_size uint32
  3119  	F__wrefs        uint32
  3120  	F__g_signals    [2]uint32
  3121  } /* thread-shared-types.h:171:1 */
  3122  
  3123  // Thread identifiers.  The structure of the attribute type is not
  3124  //    exposed on purpose.
  3125  type Pthread_t = uint64 /* pthreadtypes.h:27:27 */
  3126  
  3127  // Data structures for mutex handling.  The structure of the attribute
  3128  //    type is not exposed on purpose.
  3129  type Pthread_mutexattr_t = struct {
  3130  	_       [0]uint32
  3131  	F__size [8]int8
  3132  } /* pthreadtypes.h:36:3 */
  3133  
  3134  // Data structure for condition variable handling.  The structure of
  3135  //    the attribute type is not exposed on purpose.
  3136  type Pthread_condattr_t = struct {
  3137  	_       [0]uint32
  3138  	F__size [8]int8
  3139  } /* pthreadtypes.h:45:3 */
  3140  
  3141  // Keys for thread-specific data
  3142  type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */
  3143  
  3144  // Once-only execution
  3145  type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */
  3146  
  3147  type Pthread_attr_t1 = struct {
  3148  	_       [0]uint64
  3149  	F__size [64]int8
  3150  } /* pthreadtypes.h:56:1 */
  3151  
  3152  type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */
  3153  
  3154  type Pthread_mutex_t = struct {
  3155  	F__data X__pthread_mutex_s
  3156  	_       [8]byte
  3157  } /* pthreadtypes.h:72:3 */
  3158  
  3159  type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */
  3160  
  3161  // Data structure for reader-writer lock variable handling.  The
  3162  //    structure of the attribute type is deliberately not exposed.
  3163  type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */
  3164  
  3165  type Pthread_rwlockattr_t = struct {
  3166  	_       [0]uint64
  3167  	F__size [8]int8
  3168  } /* pthreadtypes.h:97:3 */
  3169  
  3170  // POSIX spinlock data type.
  3171  type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */
  3172  
  3173  // POSIX barriers data type.  The structure of the type is
  3174  //    deliberately not exposed.
  3175  type Pthread_barrier_t = struct {
  3176  	_       [0]uint64
  3177  	F__size [32]int8
  3178  } /* pthreadtypes.h:112:3 */
  3179  
  3180  type Pthread_barrierattr_t = struct {
  3181  	_       [0]uint32
  3182  	F__size [8]int8
  3183  } /* pthreadtypes.h:118:3 */
  3184  
  3185  // Copyright (C) 1989-2018 Free Software Foundation, Inc.
  3186  //
  3187  // This file is part of GCC.
  3188  //
  3189  // GCC is free software; you can redistribute it and/or modify
  3190  // it under the terms of the GNU General Public License as published by
  3191  // the Free Software Foundation; either version 3, or (at your option)
  3192  // any later version.
  3193  //
  3194  // GCC is distributed in the hope that it will be useful,
  3195  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  3196  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3197  // GNU General Public License for more details.
  3198  //
  3199  // Under Section 7 of GPL version 3, you are granted additional
  3200  // permissions described in the GCC Runtime Library Exception, version
  3201  // 3.1, as published by the Free Software Foundation.
  3202  //
  3203  // You should have received a copy of the GNU General Public License and
  3204  // a copy of the GCC Runtime Library Exception along with this program;
  3205  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  3206  // <http://www.gnu.org/licenses/>.
  3207  
  3208  // ISO C Standard:  7.15  Variable arguments  <stdarg.h>
  3209  
  3210  // Define __gnuc_va_list.
  3211  
  3212  type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */
  3213  
  3214  // Define the standard macros for the user,
  3215  //    if this invocation was from the user program.
  3216  
  3217  // Define va_list, if desired, from __gnuc_va_list.
  3218  // We deliberately do not define va_list when called from
  3219  //    stdio.h, because ANSI C says that stdio.h is not supposed to define
  3220  //    va_list.  stdio.h needs to have access to that data type,
  3221  //    but must not use that name.  It should use the name __gnuc_va_list,
  3222  //    which is safe because it is reserved for the implementation.
  3223  
  3224  // The macro _VA_LIST_ is the same thing used by this file in Ultrix.
  3225  //    But on BSD NET2 we must not test or define or undef it.
  3226  //    (Note that the comments in NET 2's ansi.h
  3227  //    are incorrect for _VA_LIST_--see stdio.h!)
  3228  // The macro _VA_LIST_DEFINED is used in Windows NT 3.5
  3229  // The macro _VA_LIST is used in SCO Unix 3.2.
  3230  // The macro _VA_LIST_T_H is used in the Bull dpx2
  3231  // The macro __va_list__ is used by BeOS.
  3232  type Va_list = X__gnuc_va_list /* stdarg.h:99:24 */
  3233  
  3234  // a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
  3235  // "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
  3236  // though the former does not conform to the LFS document), but considering
  3237  // both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
  3238  // equivalently requesting no 64-bit operations
  3239  
  3240  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  3241  //    This file is part of the GNU C Library.
  3242  //
  3243  //    The GNU C Library is free software; you can redistribute it and/or
  3244  //    modify it under the terms of the GNU Lesser General Public
  3245  //    License as published by the Free Software Foundation; either
  3246  //    version 2.1 of the License, or (at your option) any later version.
  3247  //
  3248  //    The GNU C Library is distributed in the hope that it will be useful,
  3249  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3250  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3251  //    Lesser General Public License for more details.
  3252  //
  3253  //    You should have received a copy of the GNU Lesser General Public
  3254  //    License along with the GNU C Library; if not, see
  3255  //    <http://www.gnu.org/licenses/>.
  3256  
  3257  //	POSIX Standard: 2.10 Symbolic Constants		<unistd.h>
  3258  
  3259  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  3260  //    This file is part of the GNU C Library.
  3261  //
  3262  //    The GNU C Library is free software; you can redistribute it and/or
  3263  //    modify it under the terms of the GNU Lesser General Public
  3264  //    License as published by the Free Software Foundation; either
  3265  //    version 2.1 of the License, or (at your option) any later version.
  3266  //
  3267  //    The GNU C Library is distributed in the hope that it will be useful,
  3268  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3269  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3270  //    Lesser General Public License for more details.
  3271  //
  3272  //    You should have received a copy of the GNU Lesser General Public
  3273  //    License along with the GNU C Library; if not, see
  3274  //    <http://www.gnu.org/licenses/>.
  3275  
  3276  // These may be used to determine what facilities are present at compile time.
  3277  //    Their values can be obtained at run time from `sysconf'.
  3278  
  3279  // POSIX Standard approved as ISO/IEC 9945-1 as of September 2008.
  3280  
  3281  // These are not #ifdef __USE_POSIX2 because they are
  3282  //    in the theoretically application-owned namespace.
  3283  
  3284  // The utilities on GNU systems also correspond to this version.
  3285  
  3286  // The utilities on GNU systems also correspond to this version.
  3287  
  3288  // This symbol was required until the 2001 edition of POSIX.
  3289  
  3290  // If defined, the implementation supports the
  3291  //    C Language Bindings Option.
  3292  
  3293  // If defined, the implementation supports the
  3294  //    C Language Development Utilities Option.
  3295  
  3296  // If defined, the implementation supports the
  3297  //    Software Development Utilities Option.
  3298  
  3299  // If defined, the implementation supports the
  3300  //    creation of locales with the localedef utility.
  3301  
  3302  // X/Open version number to which the library conforms.  It is selectable.
  3303  
  3304  // Commands and utilities from XPG4 are available.
  3305  
  3306  // We are compatible with the old published standards as well.
  3307  
  3308  // The X/Open Unix extensions are available.
  3309  
  3310  // The enhanced internationalization capabilities according to XPG4.2
  3311  //    are present.
  3312  
  3313  // The legacy interfaces are also available.
  3314  
  3315  // Get values of POSIX options:
  3316  //
  3317  //    If these symbols are defined, the corresponding features are
  3318  //    always available.  If not, they may be available sometimes.
  3319  //    The current values can be obtained with `sysconf'.
  3320  //
  3321  //    _POSIX_JOB_CONTROL		Job control is supported.
  3322  //    _POSIX_SAVED_IDS		Processes have a saved set-user-ID
  3323  // 				and a saved set-group-ID.
  3324  //    _POSIX_REALTIME_SIGNALS	Real-time, queued signals are supported.
  3325  //    _POSIX_PRIORITY_SCHEDULING	Priority scheduling is supported.
  3326  //    _POSIX_TIMERS		POSIX.4 clocks and timers are supported.
  3327  //    _POSIX_ASYNCHRONOUS_IO	Asynchronous I/O is supported.
  3328  //    _POSIX_PRIORITIZED_IO	Prioritized asynchronous I/O is supported.
  3329  //    _POSIX_SYNCHRONIZED_IO	Synchronizing file data is supported.
  3330  //    _POSIX_FSYNC			The fsync function is present.
  3331  //    _POSIX_MAPPED_FILES		Mapping of files to memory is supported.
  3332  //    _POSIX_MEMLOCK		Locking of all memory is supported.
  3333  //    _POSIX_MEMLOCK_RANGE		Locking of ranges of memory is supported.
  3334  //    _POSIX_MEMORY_PROTECTION	Setting of memory protections is supported.
  3335  //    _POSIX_MESSAGE_PASSING	POSIX.4 message queues are supported.
  3336  //    _POSIX_SEMAPHORES		POSIX.4 counting semaphores are supported.
  3337  //    _POSIX_SHARED_MEMORY_OBJECTS	POSIX.4 shared memory objects are supported.
  3338  //    _POSIX_THREADS		POSIX.1c pthreads are supported.
  3339  //    _POSIX_THREAD_ATTR_STACKADDR	Thread stack address attribute option supported.
  3340  //    _POSIX_THREAD_ATTR_STACKSIZE	Thread stack size attribute option supported.
  3341  //    _POSIX_THREAD_SAFE_FUNCTIONS	Thread-safe functions are supported.
  3342  //    _POSIX_THREAD_PRIORITY_SCHEDULING
  3343  // 				POSIX.1c thread execution scheduling supported.
  3344  //    _POSIX_THREAD_PRIO_INHERIT	Thread priority inheritance option supported.
  3345  //    _POSIX_THREAD_PRIO_PROTECT	Thread priority protection option supported.
  3346  //    _POSIX_THREAD_PROCESS_SHARED	Process-shared synchronization supported.
  3347  //    _POSIX_PII			Protocol-independent interfaces are supported.
  3348  //    _POSIX_PII_XTI		XTI protocol-indep. interfaces are supported.
  3349  //    _POSIX_PII_SOCKET		Socket protocol-indep. interfaces are supported.
  3350  //    _POSIX_PII_INTERNET		Internet family of protocols supported.
  3351  //    _POSIX_PII_INTERNET_STREAM	Connection-mode Internet protocol supported.
  3352  //    _POSIX_PII_INTERNET_DGRAM	Connectionless Internet protocol supported.
  3353  //    _POSIX_PII_OSI		ISO/OSI family of protocols supported.
  3354  //    _POSIX_PII_OSI_COTS		Connection-mode ISO/OSI service supported.
  3355  //    _POSIX_PII_OSI_CLTS		Connectionless ISO/OSI service supported.
  3356  //    _POSIX_POLL			Implementation supports `poll' function.
  3357  //    _POSIX_SELECT		Implementation supports `select' and `pselect'.
  3358  //
  3359  //    _XOPEN_REALTIME		X/Open realtime support is available.
  3360  //    _XOPEN_REALTIME_THREADS	X/Open realtime thread support is available.
  3361  //    _XOPEN_SHM			Shared memory interface according to XPG4.2.
  3362  //
  3363  //    _XBS5_ILP32_OFF32		Implementation provides environment with 32-bit
  3364  // 				int, long, pointer, and off_t types.
  3365  //    _XBS5_ILP32_OFFBIG		Implementation provides environment with 32-bit
  3366  // 				int, long, and pointer and off_t with at least
  3367  // 				64 bits.
  3368  //    _XBS5_LP64_OFF64		Implementation provides environment with 32-bit
  3369  // 				int, and 64-bit long, pointer, and off_t types.
  3370  //    _XBS5_LPBIG_OFFBIG		Implementation provides environment with at
  3371  // 				least 32 bits int and long, pointer, and off_t
  3372  // 				with at least 64 bits.
  3373  //
  3374  //    If any of these symbols is defined as -1, the corresponding option is not
  3375  //    true for any file.  If any is defined as other than -1, the corresponding
  3376  //    option is true for all files.  If a symbol is not defined at all, the value
  3377  //    for a specific file can be obtained from `pathconf' and `fpathconf'.
  3378  //
  3379  //    _POSIX_CHOWN_RESTRICTED	Only the super user can use `chown' to change
  3380  // 				the owner of a file.  `chown' can only be used
  3381  // 				to change the group ID of a file to a group of
  3382  // 				which the calling process is a member.
  3383  //    _POSIX_NO_TRUNC		Pathname components longer than
  3384  // 				NAME_MAX generate an error.
  3385  //    _POSIX_VDISABLE		If defined, if the value of an element of the
  3386  // 				`c_cc' member of `struct termios' is
  3387  // 				_POSIX_VDISABLE, no character will have the
  3388  // 				effect associated with that element.
  3389  //    _POSIX_SYNC_IO		Synchronous I/O may be performed.
  3390  //    _POSIX_ASYNC_IO		Asynchronous I/O may be performed.
  3391  //    _POSIX_PRIO_IO		Prioritized Asynchronous I/O may be performed.
  3392  //
  3393  //    Support for the Large File Support interface is not generally available.
  3394  //    If it is available the following constants are defined to one.
  3395  //    _LFS64_LARGEFILE		Low-level I/O supports large files.
  3396  //    _LFS64_STDIO			Standard I/O supports large files.
  3397  //
  3398  
  3399  // Define POSIX options for Linux.
  3400  //    Copyright (C) 1996-2018 Free Software Foundation, Inc.
  3401  //    This file is part of the GNU C Library.
  3402  //
  3403  //    The GNU C Library is free software; you can redistribute it and/or
  3404  //    modify it under the terms of the GNU Lesser General Public License as
  3405  //    published by the Free Software Foundation; either version 2.1 of the
  3406  //    License, or (at your option) any later version.
  3407  //
  3408  //    The GNU C Library is distributed in the hope that it will be useful,
  3409  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3410  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3411  //    Lesser General Public License for more details.
  3412  //
  3413  //    You should have received a copy of the GNU Lesser General Public
  3414  //    License along with the GNU C Library; see the file COPYING.LIB.  If
  3415  //    not, see <http://www.gnu.org/licenses/>.
  3416  
  3417  // Job control is supported.
  3418  
  3419  // Processes have a saved set-user-ID and a saved set-group-ID.
  3420  
  3421  // Priority scheduling is supported.
  3422  
  3423  // Synchronizing file data is supported.
  3424  
  3425  // The fsync function is present.
  3426  
  3427  // Mapping of files to memory is supported.
  3428  
  3429  // Locking of all memory is supported.
  3430  
  3431  // Locking of ranges of memory is supported.
  3432  
  3433  // Setting of memory protections is supported.
  3434  
  3435  // Some filesystems allow all users to change file ownership.
  3436  
  3437  // `c_cc' member of 'struct termios' structure can be disabled by
  3438  //    using the value _POSIX_VDISABLE.
  3439  
  3440  // Filenames are not silently truncated.
  3441  
  3442  // X/Open realtime support is available.
  3443  
  3444  // X/Open thread realtime support is available.
  3445  
  3446  // XPG4.2 shared memory is supported.
  3447  
  3448  // Tell we have POSIX threads.
  3449  
  3450  // We have the reentrant functions described in POSIX.
  3451  
  3452  // We provide priority scheduling for threads.
  3453  
  3454  // We support user-defined stack sizes.
  3455  
  3456  // We support user-defined stacks.
  3457  
  3458  // We support priority inheritence.
  3459  
  3460  // We support priority protection, though only for non-robust
  3461  //    mutexes.
  3462  
  3463  // We support priority inheritence for robust mutexes.
  3464  
  3465  // We do not support priority protection for robust mutexes.
  3466  
  3467  // We support POSIX.1b semaphores.
  3468  
  3469  // Real-time signals are supported.
  3470  
  3471  // We support asynchronous I/O.
  3472  // Alternative name for Unix98.
  3473  // Support for prioritization is also available.
  3474  
  3475  // The LFS support in asynchronous I/O is also available.
  3476  
  3477  // The rest of the LFS is also available.
  3478  
  3479  // POSIX shared memory objects are implemented.
  3480  
  3481  // CPU-time clocks support needs to be checked at runtime.
  3482  
  3483  // Clock support in threads must be also checked at runtime.
  3484  
  3485  // GNU libc provides regular expression handling.
  3486  
  3487  // Reader/Writer locks are available.
  3488  
  3489  // We have a POSIX shell.
  3490  
  3491  // We support the Timeouts option.
  3492  
  3493  // We support spinlocks.
  3494  
  3495  // The `spawn' function family is supported.
  3496  
  3497  // We have POSIX timers.
  3498  
  3499  // The barrier functions are available.
  3500  
  3501  // POSIX message queues are available.
  3502  
  3503  // Thread process-shared synchronization is supported.
  3504  
  3505  // The monotonic clock might be available.
  3506  
  3507  // The clock selection interfaces are available.
  3508  
  3509  // Advisory information interfaces are available.
  3510  
  3511  // IPv6 support is available.
  3512  
  3513  // Raw socket support is available.
  3514  
  3515  // We have at least one terminal.
  3516  
  3517  // Neither process nor thread sporadic server interfaces is available.
  3518  
  3519  // trace.h is not available.
  3520  
  3521  // Typed memory objects are not available.
  3522  
  3523  // Get the environment definitions from Unix98.
  3524  // Copyright (C) 1999-2018 Free Software Foundation, Inc.
  3525  //    This file is part of the GNU C Library.
  3526  //
  3527  //    The GNU C Library is free software; you can redistribute it and/or
  3528  //    modify it under the terms of the GNU Lesser General Public
  3529  //    License as published by the Free Software Foundation; either
  3530  //    version 2.1 of the License, or (at your option) any later version.
  3531  //
  3532  //    The GNU C Library is distributed in the hope that it will be useful,
  3533  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3534  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3535  //    Lesser General Public License for more details.
  3536  //
  3537  //    You should have received a copy of the GNU Lesser General Public
  3538  //    License along with the GNU C Library; if not, see
  3539  //    <http://www.gnu.org/licenses/>.
  3540  
  3541  // Determine the wordsize from the preprocessor defines.
  3542  //
  3543  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  3544  //    This file is part of the GNU C Library.
  3545  //
  3546  //    The GNU C Library is free software; you can redistribute it and/or
  3547  //    modify it under the terms of the GNU Lesser General Public
  3548  //    License as published by the Free Software Foundation; either
  3549  //    version 2.1 of the License, or (at your option) any later version.
  3550  //
  3551  //    The GNU C Library is distributed in the hope that it will be useful,
  3552  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3553  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3554  //    Lesser General Public License for more details.
  3555  //
  3556  //    You should have received a copy of the GNU Lesser General Public
  3557  //    License along with the GNU C Library; if not, see
  3558  //    <http://www.gnu.org/licenses/>.
  3559  
  3560  // This header should define the following symbols under the described
  3561  //    situations.  A value `1' means that the model is always supported,
  3562  //    `-1' means it is never supported.  Undefined means it cannot be
  3563  //    statically decided.
  3564  //
  3565  //    _POSIX_V7_ILP32_OFF32   32bit int, long, pointers, and off_t type
  3566  //    _POSIX_V7_ILP32_OFFBIG  32bit int, long, and pointers and larger off_t type
  3567  //
  3568  //    _POSIX_V7_LP64_OFF32	   64bit long and pointers and 32bit off_t type
  3569  //    _POSIX_V7_LPBIG_OFFBIG  64bit long and pointers and large off_t type
  3570  //
  3571  //    The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
  3572  //    _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
  3573  //    _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
  3574  //    used in previous versions of the Unix standard and are available
  3575  //    only for compatibility.
  3576  
  3577  // We can never provide environments with 32-bit wide pointers.
  3578  // We also have no use (for now) for an environment with bigger pointers
  3579  //    and offsets.
  3580  
  3581  // By default we have 64-bit wide `long int', pointers and `off_t'.
  3582  
  3583  // Standard file descriptors.
  3584  
  3585  // All functions that are not declared anywhere else.
  3586  
  3587  // bits/types.h -- definitions of __*_t types underlying *_t types.
  3588  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  3589  //    This file is part of the GNU C Library.
  3590  //
  3591  //    The GNU C Library is free software; you can redistribute it and/or
  3592  //    modify it under the terms of the GNU Lesser General Public
  3593  //    License as published by the Free Software Foundation; either
  3594  //    version 2.1 of the License, or (at your option) any later version.
  3595  //
  3596  //    The GNU C Library is distributed in the hope that it will be useful,
  3597  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3598  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3599  //    Lesser General Public License for more details.
  3600  //
  3601  //    You should have received a copy of the GNU Lesser General Public
  3602  //    License along with the GNU C Library; if not, see
  3603  //    <http://www.gnu.org/licenses/>.
  3604  
  3605  // Never include this file directly; use <sys/types.h> instead.
  3606  
  3607  // Copyright (C) 1989-2018 Free Software Foundation, Inc.
  3608  //
  3609  // This file is part of GCC.
  3610  //
  3611  // GCC is free software; you can redistribute it and/or modify
  3612  // it under the terms of the GNU General Public License as published by
  3613  // the Free Software Foundation; either version 3, or (at your option)
  3614  // any later version.
  3615  //
  3616  // GCC is distributed in the hope that it will be useful,
  3617  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  3618  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3619  // GNU General Public License for more details.
  3620  //
  3621  // Under Section 7 of GPL version 3, you are granted additional
  3622  // permissions described in the GCC Runtime Library Exception, version
  3623  // 3.1, as published by the Free Software Foundation.
  3624  //
  3625  // You should have received a copy of the GNU General Public License and
  3626  // a copy of the GCC Runtime Library Exception along with this program;
  3627  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  3628  // <http://www.gnu.org/licenses/>.
  3629  
  3630  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  3631  
  3632  // Any one of these symbols __need_* means that GNU libc
  3633  //    wants us just to define one data type.  So don't define
  3634  //    the symbols that indicate this file's entire job has been done.
  3635  
  3636  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  3637  //    There's no way to win with the other order!  Sun lossage.
  3638  
  3639  // On 4.3bsd-net2, make sure ansi.h is included, so we have
  3640  //    one less case to deal with in the following.
  3641  // On FreeBSD 5, machine/ansi.h does not exist anymore...
  3642  
  3643  // In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
  3644  //    defined if the corresponding type is *not* defined.
  3645  //    FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
  3646  //    NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_
  3647  
  3648  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  3649  //    Just ignore it.
  3650  
  3651  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  3652  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  3653  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  3654  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  3655  //    If we find that the macros are still defined at this point, we must
  3656  //    invoke them so that the type is defined as expected.
  3657  
  3658  // In case nobody has defined these types, but we aren't running under
  3659  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  3660  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  3661  //    parts of GCC is compiled by an older compiler, that actually
  3662  //    include gstddef.h, such as collect2.
  3663  
  3664  // Signed type of difference of two pointers.
  3665  
  3666  // Define this type if we are doing the whole job,
  3667  //    or if we want this type in particular.
  3668  
  3669  // If this symbol has done its job, get rid of it.
  3670  
  3671  // Unsigned type of `sizeof' something.
  3672  
  3673  // Define this type if we are doing the whole job,
  3674  //    or if we want this type in particular.
  3675  
  3676  // Wide character type.
  3677  //    Locale-writers should change this as necessary to
  3678  //    be big enough to hold unique values not between 0 and 127,
  3679  //    and not (wchar_t) -1, for each defined multibyte character.
  3680  
  3681  // Define this type if we are doing the whole job,
  3682  //    or if we want this type in particular.
  3683  
  3684  //  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
  3685  //     are already defined.
  3686  //  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
  3687  //  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
  3688  
  3689  // A null pointer constant.
  3690  
  3691  // Offset of member MEMBER in a struct of type TYPE.
  3692  
  3693  // The Single Unix specification says that some more types are
  3694  //    available here.
  3695  
  3696  type Useconds_t = X__useconds_t /* unistd.h:255:22 */
  3697  
  3698  type Intptr_t = X__intptr_t /* unistd.h:267:20 */
  3699  
  3700  type Socklen_t = X__socklen_t /* unistd.h:274:21 */
  3701  
  3702  // Define some macros helping to catch buffer overflows.
  3703  
  3704  // MVS linker does not support external names larger than 8 bytes
  3705  
  3706  //
  3707  //     The 'zlib' compression library provides in-memory compression and
  3708  //   decompression functions, including integrity checks of the uncompressed data.
  3709  //   This version of the library supports only one compression method (deflation)
  3710  //   but other algorithms will be added later and will have the same stream
  3711  //   interface.
  3712  //
  3713  //     Compression can be done in a single step if the buffers are large enough,
  3714  //   or can be done by repeated calls of the compression function.  In the latter
  3715  //   case, the application must provide more input and/or consume the output
  3716  //   (providing more output space) before each call.
  3717  //
  3718  //     The compressed data format used by default by the in-memory functions is
  3719  //   the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
  3720  //   around a deflate stream, which is itself documented in RFC 1951.
  3721  //
  3722  //     The library also supports reading and writing files in gzip (.gz) format
  3723  //   with an interface similar to that of stdio using the functions that start
  3724  //   with "gz".  The gzip format is different from the zlib format.  gzip is a
  3725  //   gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
  3726  //
  3727  //     This library can optionally read and write gzip and raw deflate streams in
  3728  //   memory as well.
  3729  //
  3730  //     The zlib format was designed to be compact and fast for use in memory
  3731  //   and on communications channels.  The gzip format was designed for single-
  3732  //   file compression on file systems, has a larger header than zlib to maintain
  3733  //   directory information, and uses a different, slower check method than zlib.
  3734  //
  3735  //     The library does not install any signal handler.  The decoder checks
  3736  //   the consistency of the compressed data, so the library should never crash
  3737  //   even in the case of corrupted input.
  3738  
  3739  type Alloc_func = uintptr /* zlib.h:81:16 */
  3740  type Free_func = uintptr  /* zlib.h:82:16 */
  3741  
  3742  type Internal_state = struct {
  3743  	Fstrm             Z_streamp
  3744  	Fstatus           int32
  3745  	_                 [4]byte
  3746  	Fpending_buf      uintptr
  3747  	Fpending_buf_size Ulg
  3748  	Fpending_out      uintptr
  3749  	Fpending          Ulg
  3750  	Fwrap             int32
  3751  	_                 [4]byte
  3752  	Fgzhead           Gz_headerp
  3753  	Fgzindex          Ulg
  3754  	Fmethod           Byte
  3755  	_                 [3]byte
  3756  	Flast_flush       int32
  3757  	Fw_size           UInt
  3758  	Fw_bits           UInt
  3759  	Fw_mask           UInt
  3760  	_                 [4]byte
  3761  	Fwindow           uintptr
  3762  	Fwindow_size      Ulg
  3763  	Fprev             uintptr
  3764  	Fhead             uintptr
  3765  	Fins_h            UInt
  3766  	Fhash_size        UInt
  3767  	Fhash_bits        UInt
  3768  	Fhash_mask        UInt
  3769  	Fhash_shift       UInt
  3770  	_                 [4]byte
  3771  	Fblock_start      int64
  3772  	Fmatch_length     UInt
  3773  	Fprev_match       IPos
  3774  	Fmatch_available  int32
  3775  	Fstrstart         UInt
  3776  	Fmatch_start      UInt
  3777  	Flookahead        UInt
  3778  	Fprev_length      UInt
  3779  	Fmax_chain_length UInt
  3780  	Fmax_lazy_match   UInt
  3781  	Flevel            int32
  3782  	Fstrategy         int32
  3783  	Fgood_match       UInt
  3784  	Fnice_match       int32
  3785  	Fdyn_ltree        [573]struct {
  3786  		Ffc struct{ Ffreq Ush }
  3787  		Fdl struct{ Fdad Ush }
  3788  	}
  3789  	Fdyn_dtree [61]struct {
  3790  		Ffc struct{ Ffreq Ush }
  3791  		Fdl struct{ Fdad Ush }
  3792  	}
  3793  	Fbl_tree [39]struct {
  3794  		Ffc struct{ Ffreq Ush }
  3795  		Fdl struct{ Fdad Ush }
  3796  	}
  3797  	Fl_desc struct {
  3798  		Fdyn_tree  uintptr
  3799  		Fmax_code  int32
  3800  		_          [4]byte
  3801  		Fstat_desc uintptr
  3802  	}
  3803  	Fd_desc struct {
  3804  		Fdyn_tree  uintptr
  3805  		Fmax_code  int32
  3806  		_          [4]byte
  3807  		Fstat_desc uintptr
  3808  	}
  3809  	Fbl_desc struct {
  3810  		Fdyn_tree  uintptr
  3811  		Fmax_code  int32
  3812  		_          [4]byte
  3813  		Fstat_desc uintptr
  3814  	}
  3815  	Fbl_count    [16]Ush
  3816  	Fheap        [573]int32
  3817  	Fheap_len    int32
  3818  	Fheap_max    int32
  3819  	Fdepth       [573]Uch
  3820  	_            [7]byte
  3821  	Fl_buf       uintptr
  3822  	Flit_bufsize UInt
  3823  	Flast_lit    UInt
  3824  	Fd_buf       uintptr
  3825  	Fopt_len     Ulg
  3826  	Fstatic_len  Ulg
  3827  	Fmatches     UInt
  3828  	Finsert      UInt
  3829  	Fbi_buf      Ush
  3830  	_            [2]byte
  3831  	Fbi_valid    int32
  3832  	Fhigh_water  Ulg
  3833  } /* zlib.h:84:1 */
  3834  
  3835  type Z_stream_s = struct {
  3836  	Fnext_in   uintptr
  3837  	Favail_in  UInt
  3838  	_          [4]byte
  3839  	Ftotal_in  ULong
  3840  	Fnext_out  uintptr
  3841  	Favail_out UInt
  3842  	_          [4]byte
  3843  	Ftotal_out ULong
  3844  	Fmsg       uintptr
  3845  	Fstate     uintptr
  3846  	Fzalloc    Alloc_func
  3847  	Fzfree     Free_func
  3848  	Fopaque    Voidpf
  3849  	Fdata_type int32
  3850  	_          [4]byte
  3851  	Fadler     ULong
  3852  	Freserved  ULong
  3853  } /* zlib.h:86:9 */
  3854  
  3855  type Z_stream = Z_stream_s /* zlib.h:106:3 */
  3856  
  3857  type Z_streamp = uintptr /* zlib.h:108:22 */
  3858  
  3859  //
  3860  //      gzip header information passed to and from zlib routines.  See RFC 1952
  3861  //   for more details on the meanings of these fields.
  3862  type Gz_header_s = struct {
  3863  	Ftext      int32
  3864  	_          [4]byte
  3865  	Ftime      ULong
  3866  	Fxflags    int32
  3867  	Fos        int32
  3868  	Fextra     uintptr
  3869  	Fextra_len UInt
  3870  	Fextra_max UInt
  3871  	Fname      uintptr
  3872  	Fname_max  UInt
  3873  	_          [4]byte
  3874  	Fcomment   uintptr
  3875  	Fcomm_max  UInt
  3876  	Fhcrc      int32
  3877  	Fdone      int32
  3878  	_          [4]byte
  3879  } /* zlib.h:114:9 */
  3880  
  3881  //
  3882  //      gzip header information passed to and from zlib routines.  See RFC 1952
  3883  //   for more details on the meanings of these fields.
  3884  type Gz_header = Gz_header_s /* zlib.h:129:3 */
  3885  
  3886  type Gz_headerp = uintptr /* zlib.h:131:23 */
  3887  //
  3888  //      inflateGetHeader() requests that gzip header information be stored in the
  3889  //    provided gz_header structure.  inflateGetHeader() may be called after
  3890  //    inflateInit2() or inflateReset(), and before the first call of inflate().
  3891  //    As inflate() processes the gzip stream, head->done is zero until the header
  3892  //    is completed, at which time head->done is set to one.  If a zlib stream is
  3893  //    being decoded, then head->done is set to -1 to indicate that there will be
  3894  //    no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
  3895  //    used to force inflate() to return immediately after header processing is
  3896  //    complete and before any actual data is decompressed.
  3897  //
  3898  //      The text, time, xflags, and os fields are filled in with the gzip header
  3899  //    contents.  hcrc is set to true if there is a header CRC.  (The header CRC
  3900  //    was valid if done is set to one.) If extra is not Z_NULL, then extra_max
  3901  //    contains the maximum number of bytes to write to extra.  Once done is true,
  3902  //    extra_len contains the actual extra field length, and extra contains the
  3903  //    extra field, or that field truncated if extra_max is less than extra_len.
  3904  //    If name is not Z_NULL, then up to name_max characters are written there,
  3905  //    terminated with a zero unless the length is greater than name_max.  If
  3906  //    comment is not Z_NULL, then up to comm_max characters are written there,
  3907  //    terminated with a zero unless the length is greater than comm_max.  When any
  3908  //    of extra, name, or comment are not Z_NULL and the respective field is not
  3909  //    present in the header, then that field is set to Z_NULL to signal its
  3910  //    absence.  This allows the use of deflateSetHeader() with the returned
  3911  //    structure to duplicate the header.  However if those fields are set to
  3912  //    allocated memory, then the application will need to save those pointers
  3913  //    elsewhere so that they can be eventually freed.
  3914  //
  3915  //      If inflateGetHeader is not used, then the header information is simply
  3916  //    discarded.  The header is always checked for validity, including the header
  3917  //    CRC if present.  inflateReset() will reset the process to discard the header
  3918  //    information.  The application would need to call inflateGetHeader() again to
  3919  //    retrieve the header from the next gzip stream.
  3920  //
  3921  //      inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
  3922  //    stream state was inconsistent.
  3923  
  3924  //
  3925  // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
  3926  //                                         unsigned char FAR *window));
  3927  //
  3928  //      Initialize the internal stream state for decompression using inflateBack()
  3929  //    calls.  The fields zalloc, zfree and opaque in strm must be initialized
  3930  //    before the call.  If zalloc and zfree are Z_NULL, then the default library-
  3931  //    derived memory allocation routines are used.  windowBits is the base two
  3932  //    logarithm of the window size, in the range 8..15.  window is a caller
  3933  //    supplied buffer of that size.  Except for special applications where it is
  3934  //    assured that deflate was used with small window sizes, windowBits must be 15
  3935  //    and a 32K byte window must be supplied to be able to decompress general
  3936  //    deflate streams.
  3937  //
  3938  //      See inflateBack() for the usage of these routines.
  3939  //
  3940  //      inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
  3941  //    the parameters are invalid, Z_MEM_ERROR if the internal state could not be
  3942  //    allocated, or Z_VERSION_ERROR if the version of the library does not match
  3943  //    the version of the header file.
  3944  
  3945  type In_func = uintptr  /* zlib.h:1092:18 */
  3946  type Out_func = uintptr /* zlib.h:1094:13 */
  3947  //
  3948  //      Same as uncompress, except that sourceLen is a pointer, where the
  3949  //    length of the source is *sourceLen.  On return, *sourceLen is the number of
  3950  //    source bytes consumed.
  3951  
  3952  // gzip file access functions
  3953  
  3954  //
  3955  //      This library supports reading and writing files in gzip (.gz) format with
  3956  //    an interface similar to that of stdio, using the functions that start with
  3957  //    "gz".  The gzip format is different from the zlib format.  gzip is a gzip
  3958  //    wrapper, documented in RFC 1952, wrapped around a deflate stream.
  3959  
  3960  type GzFile_s = struct {
  3961  	Fhave uint32
  3962  	_     [4]byte
  3963  	Fnext uintptr
  3964  	Fpos  Off64_t
  3965  } /* zlib.h:1300:9 */
  3966  
  3967  //
  3968  //      Same as uncompress, except that sourceLen is a pointer, where the
  3969  //    length of the source is *sourceLen.  On return, *sourceLen is the number of
  3970  //    source bytes consumed.
  3971  
  3972  // gzip file access functions
  3973  
  3974  //
  3975  //      This library supports reading and writing files in gzip (.gz) format with
  3976  //    an interface similar to that of stdio, using the functions that start with
  3977  //    "gz".  The gzip format is different from the zlib format.  gzip is a gzip
  3978  //    wrapper, documented in RFC 1952, wrapped around a deflate stream.
  3979  
  3980  type GzFile = uintptr /* zlib.h:1300:25 */
  3981  
  3982  // POSIX.1-2008 extended locale interface (see locale.h).
  3983  // Definition of locale_t.
  3984  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  3985  //    This file is part of the GNU C Library.
  3986  //
  3987  //    The GNU C Library is free software; you can redistribute it and/or
  3988  //    modify it under the terms of the GNU Lesser General Public
  3989  //    License as published by the Free Software Foundation; either
  3990  //    version 2.1 of the License, or (at your option) any later version.
  3991  //
  3992  //    The GNU C Library is distributed in the hope that it will be useful,
  3993  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  3994  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3995  //    Lesser General Public License for more details.
  3996  //
  3997  //    You should have received a copy of the GNU Lesser General Public
  3998  //    License along with the GNU C Library; if not, see
  3999  //    <http://www.gnu.org/licenses/>.
  4000  
  4001  // Definition of struct __locale_struct and __locale_t.
  4002  //    Copyright (C) 1997-2018 Free Software Foundation, Inc.
  4003  //    This file is part of the GNU C Library.
  4004  //    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  4005  //
  4006  //    The GNU C Library is free software; you can redistribute it and/or
  4007  //    modify it under the terms of the GNU Lesser General Public
  4008  //    License as published by the Free Software Foundation; either
  4009  //    version 2.1 of the License, or (at your option) any later version.
  4010  //
  4011  //    The GNU C Library is distributed in the hope that it will be useful,
  4012  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4013  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4014  //    Lesser General Public License for more details.
  4015  //
  4016  //    You should have received a copy of the GNU Lesser General Public
  4017  //    License along with the GNU C Library; if not, see
  4018  //    <http://www.gnu.org/licenses/>.
  4019  
  4020  // POSIX.1-2008: the locale_t type, representing a locale context
  4021  //    (implementation-namespace version).  This type should be treated
  4022  //    as opaque by applications; some details are exposed for the sake of
  4023  //    efficiency in e.g. ctype functions.
  4024  
  4025  type X__locale_struct = struct {
  4026  	F__locales       [13]uintptr
  4027  	F__ctype_b       uintptr
  4028  	F__ctype_tolower uintptr
  4029  	F__ctype_toupper uintptr
  4030  	F__names         [13]uintptr
  4031  } /* __locale_t.h:28:1 */
  4032  
  4033  type X__locale_t = uintptr /* __locale_t.h:42:32 */
  4034  
  4035  type Locale_t = X__locale_t /* locale_t.h:24:20 */
  4036  
  4037  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  4038  //    This file is part of the GNU C Library.
  4039  //
  4040  //    The GNU C Library is free software; you can redistribute it and/or
  4041  //    modify it under the terms of the GNU Lesser General Public
  4042  //    License as published by the Free Software Foundation; either
  4043  //    version 2.1 of the License, or (at your option) any later version.
  4044  //
  4045  //    The GNU C Library is distributed in the hope that it will be useful,
  4046  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4047  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4048  //    Lesser General Public License for more details.
  4049  //
  4050  //    You should have received a copy of the GNU Lesser General Public
  4051  //    License along with the GNU C Library; if not, see
  4052  //    <http://www.gnu.org/licenses/>.
  4053  
  4054  //	ISO C99 Standard: 7.20 General utilities	<stdlib.h>
  4055  
  4056  // Handle feature test macros at the start of a header.
  4057  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  4058  //    This file is part of the GNU C Library.
  4059  //
  4060  //    The GNU C Library is free software; you can redistribute it and/or
  4061  //    modify it under the terms of the GNU Lesser General Public
  4062  //    License as published by the Free Software Foundation; either
  4063  //    version 2.1 of the License, or (at your option) any later version.
  4064  //
  4065  //    The GNU C Library is distributed in the hope that it will be useful,
  4066  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4067  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4068  //    Lesser General Public License for more details.
  4069  //
  4070  //    You should have received a copy of the GNU Lesser General Public
  4071  //    License along with the GNU C Library; if not, see
  4072  //    <http://www.gnu.org/licenses/>.
  4073  
  4074  // This header is internal to glibc and should not be included outside
  4075  //    of glibc headers.  Headers including it must define
  4076  //    __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first.  This header
  4077  //    cannot have multiple include guards because ISO C feature test
  4078  //    macros depend on the definition of the macro when an affected
  4079  //    header is included, not when the first system header is
  4080  //    included.
  4081  
  4082  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  4083  //    This file is part of the GNU C Library.
  4084  //
  4085  //    The GNU C Library is free software; you can redistribute it and/or
  4086  //    modify it under the terms of the GNU Lesser General Public
  4087  //    License as published by the Free Software Foundation; either
  4088  //    version 2.1 of the License, or (at your option) any later version.
  4089  //
  4090  //    The GNU C Library is distributed in the hope that it will be useful,
  4091  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4092  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4093  //    Lesser General Public License for more details.
  4094  //
  4095  //    You should have received a copy of the GNU Lesser General Public
  4096  //    License along with the GNU C Library; if not, see
  4097  //    <http://www.gnu.org/licenses/>.
  4098  
  4099  // ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__
  4100  //    macro.
  4101  
  4102  // ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
  4103  //    macro.
  4104  
  4105  // ISO/IEC TS 18661-4:2015 defines the
  4106  //    __STDC_WANT_IEC_60559_FUNCS_EXT__ macro.
  4107  
  4108  // ISO/IEC TS 18661-3:2015 defines the
  4109  //    __STDC_WANT_IEC_60559_TYPES_EXT__ macro.
  4110  
  4111  // Get size_t, wchar_t and NULL from <stddef.h>.
  4112  // Copyright (C) 1989-2018 Free Software Foundation, Inc.
  4113  //
  4114  // This file is part of GCC.
  4115  //
  4116  // GCC is free software; you can redistribute it and/or modify
  4117  // it under the terms of the GNU General Public License as published by
  4118  // the Free Software Foundation; either version 3, or (at your option)
  4119  // any later version.
  4120  //
  4121  // GCC is distributed in the hope that it will be useful,
  4122  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  4123  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  4124  // GNU General Public License for more details.
  4125  //
  4126  // Under Section 7 of GPL version 3, you are granted additional
  4127  // permissions described in the GCC Runtime Library Exception, version
  4128  // 3.1, as published by the Free Software Foundation.
  4129  //
  4130  // You should have received a copy of the GNU General Public License and
  4131  // a copy of the GCC Runtime Library Exception along with this program;
  4132  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  4133  // <http://www.gnu.org/licenses/>.
  4134  
  4135  // ISO C Standard:  7.17  Common definitions  <stddef.h>
  4136  
  4137  // Any one of these symbols __need_* means that GNU libc
  4138  //    wants us just to define one data type.  So don't define
  4139  //    the symbols that indicate this file's entire job has been done.
  4140  
  4141  // This avoids lossage on SunOS but only if stdtypes.h comes first.
  4142  //    There's no way to win with the other order!  Sun lossage.
  4143  
  4144  // On 4.3bsd-net2, make sure ansi.h is included, so we have
  4145  //    one less case to deal with in the following.
  4146  // On FreeBSD 5, machine/ansi.h does not exist anymore...
  4147  
  4148  // In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
  4149  //    defined if the corresponding type is *not* defined.
  4150  //    FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_.
  4151  //    NetBSD defines _I386_ANSI_H_ and _X86_64_ANSI_H_ instead of _ANSI_H_
  4152  
  4153  // Sequent's header files use _PTRDIFF_T_ in some conflicting way.
  4154  //    Just ignore it.
  4155  
  4156  // On VxWorks, <type/vxTypesBase.h> may have defined macros like
  4157  //    _TYPE_size_t which will typedef size_t.  fixincludes patched the
  4158  //    vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
  4159  //    not defined, and so that defining this macro defines _GCC_SIZE_T.
  4160  //    If we find that the macros are still defined at this point, we must
  4161  //    invoke them so that the type is defined as expected.
  4162  
  4163  // In case nobody has defined these types, but we aren't running under
  4164  //    GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
  4165  //    __WCHAR_TYPE__ have reasonable values.  This can happen if the
  4166  //    parts of GCC is compiled by an older compiler, that actually
  4167  //    include gstddef.h, such as collect2.
  4168  
  4169  // Signed type of difference of two pointers.
  4170  
  4171  // Define this type if we are doing the whole job,
  4172  //    or if we want this type in particular.
  4173  
  4174  // If this symbol has done its job, get rid of it.
  4175  
  4176  // Unsigned type of `sizeof' something.
  4177  
  4178  // Define this type if we are doing the whole job,
  4179  //    or if we want this type in particular.
  4180  
  4181  // Wide character type.
  4182  //    Locale-writers should change this as necessary to
  4183  //    be big enough to hold unique values not between 0 and 127,
  4184  //    and not (wchar_t) -1, for each defined multibyte character.
  4185  
  4186  // Define this type if we are doing the whole job,
  4187  //    or if we want this type in particular.
  4188  
  4189  //  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
  4190  //     are already defined.
  4191  //  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.
  4192  //  NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here.
  4193  
  4194  // A null pointer constant.
  4195  
  4196  // Offset of member MEMBER in a struct of type TYPE.
  4197  
  4198  // XPG requires a few symbols from <sys/wait.h> being defined.
  4199  // Definitions of flag bits for `waitpid' et al.
  4200  //    Copyright (C) 1992-2018 Free Software Foundation, Inc.
  4201  //    This file is part of the GNU C Library.
  4202  //
  4203  //    The GNU C Library is free software; you can redistribute it and/or
  4204  //    modify it under the terms of the GNU Lesser General Public
  4205  //    License as published by the Free Software Foundation; either
  4206  //    version 2.1 of the License, or (at your option) any later version.
  4207  //
  4208  //    The GNU C Library is distributed in the hope that it will be useful,
  4209  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4210  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4211  //    Lesser General Public License for more details.
  4212  //
  4213  //    You should have received a copy of the GNU Lesser General Public
  4214  //    License along with the GNU C Library; if not, see
  4215  //    <http://www.gnu.org/licenses/>.
  4216  
  4217  // Bits in the third argument to `waitpid'.
  4218  
  4219  // Bits in the fourth argument to `waitid'.
  4220  
  4221  // The following values are used by the `waitid' function.
  4222  
  4223  // The Linux kernel defines these bare, rather than an enum,
  4224  //    which causes a conflict if the include order is reversed.
  4225  
  4226  type Idtype_t = uint32 /* waitflags.h:57:3 */
  4227  // Definitions of status bits for `wait' et al.
  4228  //    Copyright (C) 1992-2018 Free Software Foundation, Inc.
  4229  //    This file is part of the GNU C Library.
  4230  //
  4231  //    The GNU C Library is free software; you can redistribute it and/or
  4232  //    modify it under the terms of the GNU Lesser General Public
  4233  //    License as published by the Free Software Foundation; either
  4234  //    version 2.1 of the License, or (at your option) any later version.
  4235  //
  4236  //    The GNU C Library is distributed in the hope that it will be useful,
  4237  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4238  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4239  //    Lesser General Public License for more details.
  4240  //
  4241  //    You should have received a copy of the GNU Lesser General Public
  4242  //    License along with the GNU C Library; if not, see
  4243  //    <http://www.gnu.org/licenses/>.
  4244  
  4245  // Everything extant so far uses these same bits.
  4246  
  4247  // If WIFEXITED(STATUS), the low-order 8 bits of the status.
  4248  
  4249  // If WIFSIGNALED(STATUS), the terminating signal.
  4250  
  4251  // If WIFSTOPPED(STATUS), the signal that stopped the child.
  4252  
  4253  // Nonzero if STATUS indicates normal termination.
  4254  
  4255  // Nonzero if STATUS indicates termination by a signal.
  4256  
  4257  // Nonzero if STATUS indicates the child is stopped.
  4258  
  4259  // Nonzero if STATUS indicates the child continued after a stop.  We only
  4260  //    define this if <bits/waitflags.h> provides the WCONTINUED flag bit.
  4261  
  4262  // Nonzero if STATUS indicates the child dumped core.
  4263  
  4264  // Macros for constructing status values.
  4265  
  4266  // Define the macros <sys/wait.h> also would define this way.
  4267  
  4268  // _FloatN API tests for enablement.
  4269  // Macros to control TS 18661-3 glibc features on ldbl-128 platforms.
  4270  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  4271  //    This file is part of the GNU C Library.
  4272  //
  4273  //    The GNU C Library is free software; you can redistribute it and/or
  4274  //    modify it under the terms of the GNU Lesser General Public
  4275  //    License as published by the Free Software Foundation; either
  4276  //    version 2.1 of the License, or (at your option) any later version.
  4277  //
  4278  //    The GNU C Library is distributed in the hope that it will be useful,
  4279  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4280  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4281  //    Lesser General Public License for more details.
  4282  //
  4283  //    You should have received a copy of the GNU Lesser General Public
  4284  //    License along with the GNU C Library; if not, see
  4285  //    <http://www.gnu.org/licenses/>.
  4286  
  4287  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  4288  //    This file is part of the GNU C Library.
  4289  //
  4290  //    The GNU C Library is free software; you can redistribute it and/or
  4291  //    modify it under the terms of the GNU Lesser General Public
  4292  //    License as published by the Free Software Foundation; either
  4293  //    version 2.1 of the License, or (at your option) any later version.
  4294  //
  4295  //    The GNU C Library is distributed in the hope that it will be useful,
  4296  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4297  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4298  //    Lesser General Public License for more details.
  4299  //
  4300  //    You should have received a copy of the GNU Lesser General Public
  4301  //    License along with the GNU C Library; if not, see
  4302  //    <http://www.gnu.org/licenses/>.
  4303  
  4304  // Properties of long double type.  ldbl-128 version.
  4305  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  4306  //    This file is part of the GNU C Library.
  4307  //
  4308  //    The GNU C Library is free software; you can redistribute it and/or
  4309  //    modify it under the terms of the GNU Lesser General Public
  4310  //    License  published by the Free Software Foundation; either
  4311  //    version 2.1 of the License, or (at your option) any later version.
  4312  //
  4313  //    The GNU C Library is distributed in the hope that it will be useful,
  4314  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4315  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4316  //    Lesser General Public License for more details.
  4317  //
  4318  //    You should have received a copy of the GNU Lesser General Public
  4319  //    License along with the GNU C Library; if not, see
  4320  //    <http://www.gnu.org/licenses/>.
  4321  
  4322  // long double is distinct from double, so there is nothing to
  4323  //    define here.
  4324  
  4325  // Defined to 1 if the current compiler invocation provides a
  4326  //    floating-point type with the IEEE 754 binary128 format, and this
  4327  //    glibc includes corresponding *f128 interfaces for it.
  4328  
  4329  // Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
  4330  //    from the default float, double and long double types in this glibc.
  4331  
  4332  // Defined to 1 if the current compiler invocation provides a
  4333  //    floating-point type with the right format for _Float64x, and this
  4334  //    glibc includes corresponding *f64x interfaces for it.
  4335  
  4336  // Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
  4337  //    of long double.  Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
  4338  //    the format of _Float128, which must be different from that of long
  4339  //    double.
  4340  
  4341  // Defined to concatenate the literal suffix to be used with _Float128
  4342  //    types, if __HAVE_FLOAT128 is 1.
  4343  
  4344  // Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
  4345  
  4346  // The remaining of this file provides support for older compilers.
  4347  
  4348  // The type _Float128 exists only since GCC 7.0.
  4349  
  4350  // Various built-in functions do not exist before GCC 7.0.
  4351  
  4352  // Macros to control TS 18661-3 glibc features where the same
  4353  //    definitions are appropriate for all platforms.
  4354  //    Copyright (C) 2017-2018 Free Software Foundation, Inc.
  4355  //    This file is part of the GNU C Library.
  4356  //
  4357  //    The GNU C Library is free software; you can redistribute it and/or
  4358  //    modify it under the terms of the GNU Lesser General Public
  4359  //    License as published by the Free Software Foundation; either
  4360  //    version 2.1 of the License, or (at your option) any later version.
  4361  //
  4362  //    The GNU C Library is distributed in the hope that it will be useful,
  4363  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4364  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4365  //    Lesser General Public License for more details.
  4366  //
  4367  //    You should have received a copy of the GNU Lesser General Public
  4368  //    License along with the GNU C Library; if not, see
  4369  //    <http://www.gnu.org/licenses/>.
  4370  
  4371  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  4372  //    This file is part of the GNU C Library.
  4373  //
  4374  //    The GNU C Library is free software; you can redistribute it and/or
  4375  //    modify it under the terms of the GNU Lesser General Public
  4376  //    License as published by the Free Software Foundation; either
  4377  //    version 2.1 of the License, or (at your option) any later version.
  4378  //
  4379  //    The GNU C Library is distributed in the hope that it will be useful,
  4380  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4381  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4382  //    Lesser General Public License for more details.
  4383  //
  4384  //    You should have received a copy of the GNU Lesser General Public
  4385  //    License along with the GNU C Library; if not, see
  4386  //    <http://www.gnu.org/licenses/>.
  4387  
  4388  // Properties of long double type.  ldbl-128 version.
  4389  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  4390  //    This file is part of the GNU C Library.
  4391  //
  4392  //    The GNU C Library is free software; you can redistribute it and/or
  4393  //    modify it under the terms of the GNU Lesser General Public
  4394  //    License  published by the Free Software Foundation; either
  4395  //    version 2.1 of the License, or (at your option) any later version.
  4396  //
  4397  //    The GNU C Library is distributed in the hope that it will be useful,
  4398  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4399  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4400  //    Lesser General Public License for more details.
  4401  //
  4402  //    You should have received a copy of the GNU Lesser General Public
  4403  //    License along with the GNU C Library; if not, see
  4404  //    <http://www.gnu.org/licenses/>.
  4405  
  4406  // long double is distinct from double, so there is nothing to
  4407  //    define here.
  4408  
  4409  // This header should be included at the bottom of each bits/floatn.h.
  4410  //    It defines the following macros for each _FloatN and _FloatNx type,
  4411  //    where the same definitions, or definitions based only on the macros
  4412  //    in bits/floatn.h, are appropriate for all glibc configurations.
  4413  
  4414  // Defined to 1 if the current compiler invocation provides a
  4415  //    floating-point type with the right format for this type, and this
  4416  //    glibc includes corresponding *fN or *fNx interfaces for it.
  4417  
  4418  // Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the
  4419  //    type is the first with its format in the sequence of (the default
  4420  //    choices for) float, double, long double, _Float16, _Float32,
  4421  //    _Float64, _Float128, _Float32x, _Float64x, _Float128x for this
  4422  //    glibc; that is, if functions present once per floating-point format
  4423  //    rather than once per type are present for this type.
  4424  //
  4425  //    All configurations supported by glibc have _Float32 the same format
  4426  //    as float, _Float64 and _Float32x the same format as double, the
  4427  //    _Float64x the same format as either long double or _Float128.  No
  4428  //    configurations support _Float128x or, as of GCC 7, have compiler
  4429  //    support for a type meeting the requirements for _Float128x.
  4430  
  4431  // Defined to 1 if the corresponding _FloatN type is not binary compatible
  4432  //    with the corresponding ISO C type in the current compilation unit as
  4433  //    opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built
  4434  //    in glibc.
  4435  
  4436  // Defined to 1 if any _FloatN or _FloatNx types that are not
  4437  //    ABI-distinct are however distinct types at the C language level (so
  4438  //    for the purposes of __builtin_types_compatible_p and _Generic).
  4439  
  4440  // Defined to concatenate the literal suffix to be used with _FloatN
  4441  //    or _FloatNx types, if __HAVE_<type> is 1.  The corresponding
  4442  //    literal suffixes exist since GCC 7, for C only.
  4443  
  4444  // Defined to a complex type if __HAVE_<type> is 1.
  4445  
  4446  // The remaining of this file provides support for older compilers.
  4447  
  4448  // If double, long double and _Float64 all have the same set of
  4449  //    values, TS 18661-3 requires the usual arithmetic conversions on
  4450  //    long double and _Float64 to produce _Float64.  For this to be the
  4451  //    case when building with a compiler without a distinct _Float64
  4452  //    type, _Float64 must be a typedef for long double, not for
  4453  //    double.
  4454  
  4455  // Returned by `div'.
  4456  type Div_t = struct {
  4457  	Fquot int32
  4458  	Frem  int32
  4459  } /* stdlib.h:62:5 */
  4460  
  4461  // Returned by `ldiv'.
  4462  type Ldiv_t = struct {
  4463  	Fquot int64
  4464  	Frem  int64
  4465  } /* stdlib.h:70:5 */
  4466  
  4467  // Returned by `lldiv'.
  4468  type Lldiv_t = struct {
  4469  	Fquot int64
  4470  	Frem  int64
  4471  } /* stdlib.h:80:5 */
  4472  
  4473  // Reentrant versions of the `random' family of functions.
  4474  //    These functions all use the following data structure to contain
  4475  //    state, rather than global state variables.
  4476  
  4477  type Random_data = struct {
  4478  	Ffptr      uintptr
  4479  	Frptr      uintptr
  4480  	Fstate     uintptr
  4481  	Frand_type int32
  4482  	Frand_deg  int32
  4483  	Frand_sep  int32
  4484  	_          [4]byte
  4485  	Fend_ptr   uintptr
  4486  } /* stdlib.h:423:1 */
  4487  
  4488  // Data structure for communication with thread safe versions.  This
  4489  //    type is to be regarded as opaque.  It's only exported because users
  4490  //    have to allocate objects of this type.
  4491  type Drand48_data = struct {
  4492  	F__x     [3]uint16
  4493  	F__old_x [3]uint16
  4494  	F__c     uint16
  4495  	F__init  uint16
  4496  	F__a     uint64
  4497  } /* stdlib.h:490:1 */
  4498  
  4499  // Shorthand for type of comparison functions.
  4500  type X__compar_fn_t = uintptr /* stdlib.h:805:13 */
  4501  
  4502  // Floating-point inline functions for stdlib.h.
  4503  //    Copyright (C) 2012-2018 Free Software Foundation, Inc.
  4504  //    This file is part of the GNU C Library.
  4505  //
  4506  //    The GNU C Library is free software; you can redistribute it and/or
  4507  //    modify it under the terms of the GNU Lesser General Public
  4508  //    License as published by the Free Software Foundation; either
  4509  //    version 2.1 of the License, or (at your option) any later version.
  4510  //
  4511  //    The GNU C Library is distributed in the hope that it will be useful,
  4512  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  4513  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4514  //    Lesser General Public License for more details.
  4515  //
  4516  //    You should have received a copy of the GNU Lesser General Public
  4517  //    License along with the GNU C Library; if not, see
  4518  //    <http://www.gnu.org/licenses/>.
  4519  
  4520  // Define some macros helping to catch buffer overflows.
  4521  
  4522  // since "static" is used to mean two completely different things in C, we
  4523  //    define "local" for the non-static meaning of "static", for readability
  4524  //    (compile with -Dlocal if your debugger can't find static symbols)
  4525  
  4526  type Uch = uint8  /* zutil.h:43:24 */
  4527  type Uchf = Uch   /* zutil.h:44:17 */
  4528  type Ush = uint16 /* zutil.h:45:24 */
  4529  type Ushf = Ush   /* zutil.h:46:17 */
  4530  type Ulg = uint64 /* zutil.h:47:24 */
  4531  
  4532  // NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1
  4533  
  4534  // use NO_DIVIDE if your processor does not do division in hardware --
  4535  //    try it both ways to see which is faster
  4536  
  4537  // =========================================================================
  4538  func Xadler32_z(tls *libc.TLS, adler ULong, buf uintptr, len Z_size_t) ULong { /* adler32.c:63:15: */
  4539  	var sum2 uint64
  4540  	var n uint32
  4541  
  4542  	// split Adler-32 into component sums
  4543  	sum2 = ((adler >> 16) & uint64(0xffff))
  4544  	adler = adler & (uint64(0xffff))
  4545  
  4546  	// in case user likes doing a byte at a time, keep it fast
  4547  	if len == uint64(1) {
  4548  		adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(buf))))
  4549  		if adler >= uint64(BASE) {
  4550  			adler = adler - (uint64(BASE))
  4551  		}
  4552  		sum2 = sum2 + (adler)
  4553  		if sum2 >= uint64(BASE) {
  4554  			sum2 = sum2 - (uint64(BASE))
  4555  		}
  4556  		return (adler | (sum2 << 16))
  4557  	}
  4558  
  4559  	// initial Adler-32 value (deferred check for len == 1 speed)
  4560  	if buf == uintptr(Z_NULL) {
  4561  		return uint64(1)
  4562  	}
  4563  
  4564  	// in case short lengths are provided, keep it somewhat fast
  4565  	if len < uint64(16) {
  4566  		for libc.PostDecUint64(&len, 1) != 0 {
  4567  			adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))
  4568  			sum2 = sum2 + (adler)
  4569  		}
  4570  		if adler >= uint64(BASE) {
  4571  			adler = adler - (uint64(BASE))
  4572  		}
  4573  		sum2 = sum2 % (uint64(BASE)) // only added so many BASE's
  4574  		return (adler | (sum2 << 16))
  4575  	}
  4576  
  4577  	// do length NMAX blocks -- requires just one modulo operation
  4578  	for len >= uint64(NMAX) {
  4579  		len = len - (uint64(NMAX))
  4580  		n = (uint32(NMAX / 16)) // NMAX is divisible by 16
  4581  		for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
  4582  			{
  4583  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf)))))
  4584  				sum2 = sum2 + (adler)
  4585  			}
  4586  			{
  4587  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 1))))
  4588  				sum2 = sum2 + (adler)
  4589  			}
  4590  
  4591  			{
  4592  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 2))))
  4593  				sum2 = sum2 + (adler)
  4594  			}
  4595  			{
  4596  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 3))))
  4597  				sum2 = sum2 + (adler)
  4598  			}
  4599  
  4600  			{
  4601  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 4))))
  4602  				sum2 = sum2 + (adler)
  4603  			}
  4604  			{
  4605  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 5))))
  4606  				sum2 = sum2 + (adler)
  4607  			}
  4608  
  4609  			{
  4610  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 6))))
  4611  				sum2 = sum2 + (adler)
  4612  			}
  4613  			{
  4614  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 7))))
  4615  				sum2 = sum2 + (adler)
  4616  			}
  4617  
  4618  			{
  4619  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 8))))
  4620  				sum2 = sum2 + (adler)
  4621  			}
  4622  			{
  4623  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 9))))
  4624  				sum2 = sum2 + (adler)
  4625  			}
  4626  
  4627  			{
  4628  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 10))))
  4629  				sum2 = sum2 + (adler)
  4630  			}
  4631  			{
  4632  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 11))))
  4633  				sum2 = sum2 + (adler)
  4634  			}
  4635  
  4636  			{
  4637  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 12))))
  4638  				sum2 = sum2 + (adler)
  4639  			}
  4640  			{
  4641  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 13))))
  4642  				sum2 = sum2 + (adler)
  4643  			}
  4644  
  4645  			{
  4646  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 14))))
  4647  				sum2 = sum2 + (adler)
  4648  			}
  4649  			{
  4650  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 15))))
  4651  				sum2 = sum2 + (adler)
  4652  			}
  4653  
  4654  			// 16 sums unrolled
  4655  			buf += uintptr(16)
  4656  		}
  4657  		adler = adler % (uint64(BASE))
  4658  		sum2 = sum2 % (uint64(BASE))
  4659  	}
  4660  
  4661  	// do remaining bytes (less than NMAX, still just one modulo)
  4662  	if len != 0 { // avoid modulos if none remaining
  4663  		for len >= uint64(16) {
  4664  			len = len - (uint64(16))
  4665  			{
  4666  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf)))))
  4667  				sum2 = sum2 + (adler)
  4668  			}
  4669  			{
  4670  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 1))))
  4671  				sum2 = sum2 + (adler)
  4672  			}
  4673  
  4674  			{
  4675  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 2))))
  4676  				sum2 = sum2 + (adler)
  4677  			}
  4678  			{
  4679  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 3))))
  4680  				sum2 = sum2 + (adler)
  4681  			}
  4682  
  4683  			{
  4684  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 4))))
  4685  				sum2 = sum2 + (adler)
  4686  			}
  4687  			{
  4688  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 5))))
  4689  				sum2 = sum2 + (adler)
  4690  			}
  4691  
  4692  			{
  4693  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 6))))
  4694  				sum2 = sum2 + (adler)
  4695  			}
  4696  			{
  4697  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 7))))
  4698  				sum2 = sum2 + (adler)
  4699  			}
  4700  
  4701  			{
  4702  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 8))))
  4703  				sum2 = sum2 + (adler)
  4704  			}
  4705  			{
  4706  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 9))))
  4707  				sum2 = sum2 + (adler)
  4708  			}
  4709  
  4710  			{
  4711  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 10))))
  4712  				sum2 = sum2 + (adler)
  4713  			}
  4714  			{
  4715  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 11))))
  4716  				sum2 = sum2 + (adler)
  4717  			}
  4718  
  4719  			{
  4720  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 12))))
  4721  				sum2 = sum2 + (adler)
  4722  			}
  4723  			{
  4724  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 13))))
  4725  				sum2 = sum2 + (adler)
  4726  			}
  4727  
  4728  			{
  4729  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 14))))
  4730  				sum2 = sum2 + (adler)
  4731  			}
  4732  			{
  4733  				adler = adler + (ULong(*(*Bytef)(unsafe.Pointer((buf) + 15))))
  4734  				sum2 = sum2 + (adler)
  4735  			}
  4736  
  4737  			buf += uintptr(16)
  4738  		}
  4739  		for libc.PostDecUint64(&len, 1) != 0 {
  4740  			adler = adler + (ULong(*(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1)))))
  4741  			sum2 = sum2 + (adler)
  4742  		}
  4743  		adler = adler % (uint64(BASE))
  4744  		sum2 = sum2 % (uint64(BASE))
  4745  	}
  4746  
  4747  	// return recombined sums
  4748  	return (adler | (sum2 << 16))
  4749  }
  4750  
  4751  // =========================================================================
  4752  func Xadler32(tls *libc.TLS, adler ULong, buf uintptr, len UInt) ULong { /* adler32.c:134:15: */
  4753  	return Xadler32_z(tls, adler, buf, uint64(len))
  4754  }
  4755  
  4756  // =========================================================================
  4757  func adler32_combine_(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off64_t) ULong { /* adler32.c:143:13: */
  4758  	var sum1 uint64
  4759  	var sum2 uint64
  4760  	var rem uint32
  4761  
  4762  	// for negative len, return invalid adler32 as a clue for debugging
  4763  	if len2 < int64(0) {
  4764  		return 0xffffffff
  4765  	}
  4766  
  4767  	// the derivation of this formula is left as an exercise for the reader
  4768  	len2 = len2 % (int64(BASE)) // assumes len2 >= 0
  4769  	rem = uint32(len2)
  4770  	sum1 = (adler1 & uint64(0xffff))
  4771  	sum2 = (uint64(rem) * sum1)
  4772  	sum2 = sum2 % (uint64(BASE))
  4773  	sum1 = sum1 + (((adler2 & uint64(0xffff)) + uint64(BASE)) - uint64(1))
  4774  	sum2 = sum2 + (((((adler1 >> 16) & uint64(0xffff)) + ((adler2 >> 16) & uint64(0xffff))) + uint64(BASE)) - ULong(rem))
  4775  	if sum1 >= uint64(BASE) {
  4776  		sum1 = sum1 - (uint64(BASE))
  4777  	}
  4778  	if sum1 >= uint64(BASE) {
  4779  		sum1 = sum1 - (uint64(BASE))
  4780  	}
  4781  	if sum2 >= (uint64(uint64(BASE)) << 1) {
  4782  		sum2 = sum2 - (uint64(uint64(BASE)) << 1)
  4783  	}
  4784  	if sum2 >= uint64(BASE) {
  4785  		sum2 = sum2 - (uint64(BASE))
  4786  	}
  4787  	return (sum1 | (sum2 << 16))
  4788  }
  4789  
  4790  // =========================================================================
  4791  func Xadler32_combine(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off_t) ULong { /* adler32.c:172:15: */
  4792  	return adler32_combine_(tls, adler1, adler2, len2)
  4793  }
  4794  
  4795  func Xadler32_combine64(tls *libc.TLS, adler1 ULong, adler2 ULong, len2 Off64_t) ULong { /* adler32.c:180:15: */
  4796  	return adler32_combine_(tls, adler1, adler2, len2)
  4797  }
  4798  
  4799  // ===========================================================================
  4800  //      Compresses the source buffer into the destination buffer. The level
  4801  //    parameter has the same meaning as in deflateInit.  sourceLen is the byte
  4802  //    length of the source buffer. Upon entry, destLen is the total size of the
  4803  //    destination buffer, which must be at least 0.1% larger than sourceLen plus
  4804  //    12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
  4805  //
  4806  //      compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
  4807  //    memory, Z_BUF_ERROR if there was not enough room in the output buffer,
  4808  //    Z_STREAM_ERROR if the level parameter is invalid.
  4809  func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong, level int32) int32 { /* compress.c:22:13: */
  4810  	bp := tls.Alloc(112)
  4811  	defer tls.Free(112)
  4812  
  4813  	// var stream Z_stream at bp, 112
  4814  
  4815  	var err int32
  4816  	var max UInt = libc.Uint32(libc.Uint32FromInt32(-1))
  4817  	var left ULong
  4818  
  4819  	left = *(*ULongf)(unsafe.Pointer(destLen))
  4820  	*(*ULongf)(unsafe.Pointer(destLen)) = uint64(0)
  4821  
  4822  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzalloc = uintptr(0)
  4823  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fzfree = uintptr(0)
  4824  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fopaque = uintptr(0)
  4825  
  4826  	err = XdeflateInit_(tls, bp /* &stream */, level, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{})))
  4827  	if err != Z_OK {
  4828  		return err
  4829  	}
  4830  
  4831  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_out = dest
  4832  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = UInt(0)
  4833  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Fnext_in = source
  4834  	(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = UInt(0)
  4835  
  4836  	for ok := true; ok; ok = (err == Z_OK) {
  4837  		if (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out == UInt(0) {
  4838  			(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out = func() uint32 {
  4839  				if left > ULong(max) {
  4840  					return max
  4841  				}
  4842  				return UInt(left)
  4843  			}()
  4844  			left = left - (ULong((*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_out))
  4845  		}
  4846  		if (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in == UInt(0) {
  4847  			(*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in = func() uint32 {
  4848  				if sourceLen > ULong(max) {
  4849  					return max
  4850  				}
  4851  				return UInt(sourceLen)
  4852  			}()
  4853  			sourceLen = sourceLen - (ULong((*Z_stream)(unsafe.Pointer(bp /* &stream */)).Favail_in))
  4854  		}
  4855  		err = Xdeflate(tls, bp /* &stream */, func() int32 {
  4856  			if sourceLen != 0 {
  4857  				return Z_NO_FLUSH
  4858  			}
  4859  			return Z_FINISH
  4860  		}())
  4861  	}
  4862  
  4863  	*(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp /* &stream */)).Ftotal_out
  4864  	XdeflateEnd(tls, bp /* &stream */)
  4865  	if err == Z_STREAM_END {
  4866  		return Z_OK
  4867  	}
  4868  	return err
  4869  }
  4870  
  4871  // ===========================================================================
  4872  func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* compress.c:68:13: */
  4873  	return Xcompress2(tls, dest, destLen, source, sourceLen, -1)
  4874  }
  4875  
  4876  // ===========================================================================
  4877  //      If the default memLevel or windowBits for deflateInit() is changed, then
  4878  //    this function needs to be updated.
  4879  //
  4880  func XcompressBound(tls *libc.TLS, sourceLen ULong) ULong { /* compress.c:81:15: */
  4881  	return ((((sourceLen + (sourceLen >> 12)) + (sourceLen >> 14)) + (sourceLen >> 25)) + uint64(13))
  4882  }
  4883  
  4884  // ========================================================================
  4885  // Tables of CRC-32s of all single-byte values, made by make_crc_table().
  4886  // crc32.h -- tables for rapid CRC calculation
  4887  // Generated automatically by crc32.c
  4888  
  4889  var crc_table = [8][256]Z_crc_t{
  4890  	{
  4891  		uint32(0x00000000), uint32(0x77073096), uint32(0xee0e612c), uint32(0x990951ba), uint32(0x076dc419),
  4892  		uint32(0x706af48f), uint32(0xe963a535), uint32(0x9e6495a3), uint32(0x0edb8832), uint32(0x79dcb8a4),
  4893  		uint32(0xe0d5e91e), uint32(0x97d2d988), uint32(0x09b64c2b), uint32(0x7eb17cbd), uint32(0xe7b82d07),
  4894  		uint32(0x90bf1d91), uint32(0x1db71064), uint32(0x6ab020f2), uint32(0xf3b97148), uint32(0x84be41de),
  4895  		uint32(0x1adad47d), uint32(0x6ddde4eb), uint32(0xf4d4b551), uint32(0x83d385c7), uint32(0x136c9856),
  4896  		uint32(0x646ba8c0), uint32(0xfd62f97a), uint32(0x8a65c9ec), uint32(0x14015c4f), uint32(0x63066cd9),
  4897  		uint32(0xfa0f3d63), uint32(0x8d080df5), uint32(0x3b6e20c8), uint32(0x4c69105e), uint32(0xd56041e4),
  4898  		uint32(0xa2677172), uint32(0x3c03e4d1), uint32(0x4b04d447), uint32(0xd20d85fd), uint32(0xa50ab56b),
  4899  		uint32(0x35b5a8fa), uint32(0x42b2986c), uint32(0xdbbbc9d6), uint32(0xacbcf940), uint32(0x32d86ce3),
  4900  		uint32(0x45df5c75), uint32(0xdcd60dcf), uint32(0xabd13d59), uint32(0x26d930ac), uint32(0x51de003a),
  4901  		uint32(0xc8d75180), uint32(0xbfd06116), uint32(0x21b4f4b5), uint32(0x56b3c423), uint32(0xcfba9599),
  4902  		uint32(0xb8bda50f), uint32(0x2802b89e), uint32(0x5f058808), uint32(0xc60cd9b2), uint32(0xb10be924),
  4903  		uint32(0x2f6f7c87), uint32(0x58684c11), uint32(0xc1611dab), uint32(0xb6662d3d), uint32(0x76dc4190),
  4904  		uint32(0x01db7106), uint32(0x98d220bc), uint32(0xefd5102a), uint32(0x71b18589), uint32(0x06b6b51f),
  4905  		uint32(0x9fbfe4a5), uint32(0xe8b8d433), uint32(0x7807c9a2), uint32(0x0f00f934), uint32(0x9609a88e),
  4906  		uint32(0xe10e9818), uint32(0x7f6a0dbb), uint32(0x086d3d2d), uint32(0x91646c97), uint32(0xe6635c01),
  4907  		uint32(0x6b6b51f4), uint32(0x1c6c6162), uint32(0x856530d8), uint32(0xf262004e), uint32(0x6c0695ed),
  4908  		uint32(0x1b01a57b), uint32(0x8208f4c1), uint32(0xf50fc457), uint32(0x65b0d9c6), uint32(0x12b7e950),
  4909  		uint32(0x8bbeb8ea), uint32(0xfcb9887c), uint32(0x62dd1ddf), uint32(0x15da2d49), uint32(0x8cd37cf3),
  4910  		uint32(0xfbd44c65), uint32(0x4db26158), uint32(0x3ab551ce), uint32(0xa3bc0074), uint32(0xd4bb30e2),
  4911  		uint32(0x4adfa541), uint32(0x3dd895d7), uint32(0xa4d1c46d), uint32(0xd3d6f4fb), uint32(0x4369e96a),
  4912  		uint32(0x346ed9fc), uint32(0xad678846), uint32(0xda60b8d0), uint32(0x44042d73), uint32(0x33031de5),
  4913  		uint32(0xaa0a4c5f), uint32(0xdd0d7cc9), uint32(0x5005713c), uint32(0x270241aa), uint32(0xbe0b1010),
  4914  		uint32(0xc90c2086), uint32(0x5768b525), uint32(0x206f85b3), uint32(0xb966d409), uint32(0xce61e49f),
  4915  		uint32(0x5edef90e), uint32(0x29d9c998), uint32(0xb0d09822), uint32(0xc7d7a8b4), uint32(0x59b33d17),
  4916  		uint32(0x2eb40d81), uint32(0xb7bd5c3b), uint32(0xc0ba6cad), uint32(0xedb88320), uint32(0x9abfb3b6),
  4917  		uint32(0x03b6e20c), uint32(0x74b1d29a), uint32(0xead54739), uint32(0x9dd277af), uint32(0x04db2615),
  4918  		uint32(0x73dc1683), uint32(0xe3630b12), uint32(0x94643b84), uint32(0x0d6d6a3e), uint32(0x7a6a5aa8),
  4919  		uint32(0xe40ecf0b), uint32(0x9309ff9d), uint32(0x0a00ae27), uint32(0x7d079eb1), uint32(0xf00f9344),
  4920  		uint32(0x8708a3d2), uint32(0x1e01f268), uint32(0x6906c2fe), uint32(0xf762575d), uint32(0x806567cb),
  4921  		uint32(0x196c3671), uint32(0x6e6b06e7), uint32(0xfed41b76), uint32(0x89d32be0), uint32(0x10da7a5a),
  4922  		uint32(0x67dd4acc), uint32(0xf9b9df6f), uint32(0x8ebeeff9), uint32(0x17b7be43), uint32(0x60b08ed5),
  4923  		uint32(0xd6d6a3e8), uint32(0xa1d1937e), uint32(0x38d8c2c4), uint32(0x4fdff252), uint32(0xd1bb67f1),
  4924  		uint32(0xa6bc5767), uint32(0x3fb506dd), uint32(0x48b2364b), uint32(0xd80d2bda), uint32(0xaf0a1b4c),
  4925  		uint32(0x36034af6), uint32(0x41047a60), uint32(0xdf60efc3), uint32(0xa867df55), uint32(0x316e8eef),
  4926  		uint32(0x4669be79), uint32(0xcb61b38c), uint32(0xbc66831a), uint32(0x256fd2a0), uint32(0x5268e236),
  4927  		uint32(0xcc0c7795), uint32(0xbb0b4703), uint32(0x220216b9), uint32(0x5505262f), uint32(0xc5ba3bbe),
  4928  		uint32(0xb2bd0b28), uint32(0x2bb45a92), uint32(0x5cb36a04), uint32(0xc2d7ffa7), uint32(0xb5d0cf31),
  4929  		uint32(0x2cd99e8b), uint32(0x5bdeae1d), uint32(0x9b64c2b0), uint32(0xec63f226), uint32(0x756aa39c),
  4930  		uint32(0x026d930a), uint32(0x9c0906a9), uint32(0xeb0e363f), uint32(0x72076785), uint32(0x05005713),
  4931  		uint32(0x95bf4a82), uint32(0xe2b87a14), uint32(0x7bb12bae), uint32(0x0cb61b38), uint32(0x92d28e9b),
  4932  		uint32(0xe5d5be0d), uint32(0x7cdcefb7), uint32(0x0bdbdf21), uint32(0x86d3d2d4), uint32(0xf1d4e242),
  4933  		uint32(0x68ddb3f8), uint32(0x1fda836e), uint32(0x81be16cd), uint32(0xf6b9265b), uint32(0x6fb077e1),
  4934  		uint32(0x18b74777), uint32(0x88085ae6), uint32(0xff0f6a70), uint32(0x66063bca), uint32(0x11010b5c),
  4935  		uint32(0x8f659eff), uint32(0xf862ae69), uint32(0x616bffd3), uint32(0x166ccf45), uint32(0xa00ae278),
  4936  		uint32(0xd70dd2ee), uint32(0x4e048354), uint32(0x3903b3c2), uint32(0xa7672661), uint32(0xd06016f7),
  4937  		uint32(0x4969474d), uint32(0x3e6e77db), uint32(0xaed16a4a), uint32(0xd9d65adc), uint32(0x40df0b66),
  4938  		uint32(0x37d83bf0), uint32(0xa9bcae53), uint32(0xdebb9ec5), uint32(0x47b2cf7f), uint32(0x30b5ffe9),
  4939  		uint32(0xbdbdf21c), uint32(0xcabac28a), uint32(0x53b39330), uint32(0x24b4a3a6), uint32(0xbad03605),
  4940  		uint32(0xcdd70693), uint32(0x54de5729), uint32(0x23d967bf), uint32(0xb3667a2e), uint32(0xc4614ab8),
  4941  		uint32(0x5d681b02), uint32(0x2a6f2b94), uint32(0xb40bbe37), uint32(0xc30c8ea1), uint32(0x5a05df1b),
  4942  		uint32(0x2d02ef8d),
  4943  	},
  4944  	{
  4945  		uint32(0x00000000), uint32(0x191b3141), uint32(0x32366282), uint32(0x2b2d53c3), uint32(0x646cc504),
  4946  		uint32(0x7d77f445), uint32(0x565aa786), uint32(0x4f4196c7), uint32(0xc8d98a08), uint32(0xd1c2bb49),
  4947  		uint32(0xfaefe88a), uint32(0xe3f4d9cb), uint32(0xacb54f0c), uint32(0xb5ae7e4d), uint32(0x9e832d8e),
  4948  		uint32(0x87981ccf), uint32(0x4ac21251), uint32(0x53d92310), uint32(0x78f470d3), uint32(0x61ef4192),
  4949  		uint32(0x2eaed755), uint32(0x37b5e614), uint32(0x1c98b5d7), uint32(0x05838496), uint32(0x821b9859),
  4950  		uint32(0x9b00a918), uint32(0xb02dfadb), uint32(0xa936cb9a), uint32(0xe6775d5d), uint32(0xff6c6c1c),
  4951  		uint32(0xd4413fdf), uint32(0xcd5a0e9e), uint32(0x958424a2), uint32(0x8c9f15e3), uint32(0xa7b24620),
  4952  		uint32(0xbea97761), uint32(0xf1e8e1a6), uint32(0xe8f3d0e7), uint32(0xc3de8324), uint32(0xdac5b265),
  4953  		uint32(0x5d5daeaa), uint32(0x44469feb), uint32(0x6f6bcc28), uint32(0x7670fd69), uint32(0x39316bae),
  4954  		uint32(0x202a5aef), uint32(0x0b07092c), uint32(0x121c386d), uint32(0xdf4636f3), uint32(0xc65d07b2),
  4955  		uint32(0xed705471), uint32(0xf46b6530), uint32(0xbb2af3f7), uint32(0xa231c2b6), uint32(0x891c9175),
  4956  		uint32(0x9007a034), uint32(0x179fbcfb), uint32(0x0e848dba), uint32(0x25a9de79), uint32(0x3cb2ef38),
  4957  		uint32(0x73f379ff), uint32(0x6ae848be), uint32(0x41c51b7d), uint32(0x58de2a3c), uint32(0xf0794f05),
  4958  		uint32(0xe9627e44), uint32(0xc24f2d87), uint32(0xdb541cc6), uint32(0x94158a01), uint32(0x8d0ebb40),
  4959  		uint32(0xa623e883), uint32(0xbf38d9c2), uint32(0x38a0c50d), uint32(0x21bbf44c), uint32(0x0a96a78f),
  4960  		uint32(0x138d96ce), uint32(0x5ccc0009), uint32(0x45d73148), uint32(0x6efa628b), uint32(0x77e153ca),
  4961  		uint32(0xbabb5d54), uint32(0xa3a06c15), uint32(0x888d3fd6), uint32(0x91960e97), uint32(0xded79850),
  4962  		uint32(0xc7cca911), uint32(0xece1fad2), uint32(0xf5facb93), uint32(0x7262d75c), uint32(0x6b79e61d),
  4963  		uint32(0x4054b5de), uint32(0x594f849f), uint32(0x160e1258), uint32(0x0f152319), uint32(0x243870da),
  4964  		uint32(0x3d23419b), uint32(0x65fd6ba7), uint32(0x7ce65ae6), uint32(0x57cb0925), uint32(0x4ed03864),
  4965  		uint32(0x0191aea3), uint32(0x188a9fe2), uint32(0x33a7cc21), uint32(0x2abcfd60), uint32(0xad24e1af),
  4966  		uint32(0xb43fd0ee), uint32(0x9f12832d), uint32(0x8609b26c), uint32(0xc94824ab), uint32(0xd05315ea),
  4967  		uint32(0xfb7e4629), uint32(0xe2657768), uint32(0x2f3f79f6), uint32(0x362448b7), uint32(0x1d091b74),
  4968  		uint32(0x04122a35), uint32(0x4b53bcf2), uint32(0x52488db3), uint32(0x7965de70), uint32(0x607eef31),
  4969  		uint32(0xe7e6f3fe), uint32(0xfefdc2bf), uint32(0xd5d0917c), uint32(0xcccba03d), uint32(0x838a36fa),
  4970  		uint32(0x9a9107bb), uint32(0xb1bc5478), uint32(0xa8a76539), uint32(0x3b83984b), uint32(0x2298a90a),
  4971  		uint32(0x09b5fac9), uint32(0x10aecb88), uint32(0x5fef5d4f), uint32(0x46f46c0e), uint32(0x6dd93fcd),
  4972  		uint32(0x74c20e8c), uint32(0xf35a1243), uint32(0xea412302), uint32(0xc16c70c1), uint32(0xd8774180),
  4973  		uint32(0x9736d747), uint32(0x8e2de606), uint32(0xa500b5c5), uint32(0xbc1b8484), uint32(0x71418a1a),
  4974  		uint32(0x685abb5b), uint32(0x4377e898), uint32(0x5a6cd9d9), uint32(0x152d4f1e), uint32(0x0c367e5f),
  4975  		uint32(0x271b2d9c), uint32(0x3e001cdd), uint32(0xb9980012), uint32(0xa0833153), uint32(0x8bae6290),
  4976  		uint32(0x92b553d1), uint32(0xddf4c516), uint32(0xc4eff457), uint32(0xefc2a794), uint32(0xf6d996d5),
  4977  		uint32(0xae07bce9), uint32(0xb71c8da8), uint32(0x9c31de6b), uint32(0x852aef2a), uint32(0xca6b79ed),
  4978  		uint32(0xd37048ac), uint32(0xf85d1b6f), uint32(0xe1462a2e), uint32(0x66de36e1), uint32(0x7fc507a0),
  4979  		uint32(0x54e85463), uint32(0x4df36522), uint32(0x02b2f3e5), uint32(0x1ba9c2a4), uint32(0x30849167),
  4980  		uint32(0x299fa026), uint32(0xe4c5aeb8), uint32(0xfdde9ff9), uint32(0xd6f3cc3a), uint32(0xcfe8fd7b),
  4981  		uint32(0x80a96bbc), uint32(0x99b25afd), uint32(0xb29f093e), uint32(0xab84387f), uint32(0x2c1c24b0),
  4982  		uint32(0x350715f1), uint32(0x1e2a4632), uint32(0x07317773), uint32(0x4870e1b4), uint32(0x516bd0f5),
  4983  		uint32(0x7a468336), uint32(0x635db277), uint32(0xcbfad74e), uint32(0xd2e1e60f), uint32(0xf9ccb5cc),
  4984  		uint32(0xe0d7848d), uint32(0xaf96124a), uint32(0xb68d230b), uint32(0x9da070c8), uint32(0x84bb4189),
  4985  		uint32(0x03235d46), uint32(0x1a386c07), uint32(0x31153fc4), uint32(0x280e0e85), uint32(0x674f9842),
  4986  		uint32(0x7e54a903), uint32(0x5579fac0), uint32(0x4c62cb81), uint32(0x8138c51f), uint32(0x9823f45e),
  4987  		uint32(0xb30ea79d), uint32(0xaa1596dc), uint32(0xe554001b), uint32(0xfc4f315a), uint32(0xd7626299),
  4988  		uint32(0xce7953d8), uint32(0x49e14f17), uint32(0x50fa7e56), uint32(0x7bd72d95), uint32(0x62cc1cd4),
  4989  		uint32(0x2d8d8a13), uint32(0x3496bb52), uint32(0x1fbbe891), uint32(0x06a0d9d0), uint32(0x5e7ef3ec),
  4990  		uint32(0x4765c2ad), uint32(0x6c48916e), uint32(0x7553a02f), uint32(0x3a1236e8), uint32(0x230907a9),
  4991  		uint32(0x0824546a), uint32(0x113f652b), uint32(0x96a779e4), uint32(0x8fbc48a5), uint32(0xa4911b66),
  4992  		uint32(0xbd8a2a27), uint32(0xf2cbbce0), uint32(0xebd08da1), uint32(0xc0fdde62), uint32(0xd9e6ef23),
  4993  		uint32(0x14bce1bd), uint32(0x0da7d0fc), uint32(0x268a833f), uint32(0x3f91b27e), uint32(0x70d024b9),
  4994  		uint32(0x69cb15f8), uint32(0x42e6463b), uint32(0x5bfd777a), uint32(0xdc656bb5), uint32(0xc57e5af4),
  4995  		uint32(0xee530937), uint32(0xf7483876), uint32(0xb809aeb1), uint32(0xa1129ff0), uint32(0x8a3fcc33),
  4996  		uint32(0x9324fd72),
  4997  	},
  4998  	{
  4999  		uint32(0x00000000), uint32(0x01c26a37), uint32(0x0384d46e), uint32(0x0246be59), uint32(0x0709a8dc),
  5000  		uint32(0x06cbc2eb), uint32(0x048d7cb2), uint32(0x054f1685), uint32(0x0e1351b8), uint32(0x0fd13b8f),
  5001  		uint32(0x0d9785d6), uint32(0x0c55efe1), uint32(0x091af964), uint32(0x08d89353), uint32(0x0a9e2d0a),
  5002  		uint32(0x0b5c473d), uint32(0x1c26a370), uint32(0x1de4c947), uint32(0x1fa2771e), uint32(0x1e601d29),
  5003  		uint32(0x1b2f0bac), uint32(0x1aed619b), uint32(0x18abdfc2), uint32(0x1969b5f5), uint32(0x1235f2c8),
  5004  		uint32(0x13f798ff), uint32(0x11b126a6), uint32(0x10734c91), uint32(0x153c5a14), uint32(0x14fe3023),
  5005  		uint32(0x16b88e7a), uint32(0x177ae44d), uint32(0x384d46e0), uint32(0x398f2cd7), uint32(0x3bc9928e),
  5006  		uint32(0x3a0bf8b9), uint32(0x3f44ee3c), uint32(0x3e86840b), uint32(0x3cc03a52), uint32(0x3d025065),
  5007  		uint32(0x365e1758), uint32(0x379c7d6f), uint32(0x35dac336), uint32(0x3418a901), uint32(0x3157bf84),
  5008  		uint32(0x3095d5b3), uint32(0x32d36bea), uint32(0x331101dd), uint32(0x246be590), uint32(0x25a98fa7),
  5009  		uint32(0x27ef31fe), uint32(0x262d5bc9), uint32(0x23624d4c), uint32(0x22a0277b), uint32(0x20e69922),
  5010  		uint32(0x2124f315), uint32(0x2a78b428), uint32(0x2bbade1f), uint32(0x29fc6046), uint32(0x283e0a71),
  5011  		uint32(0x2d711cf4), uint32(0x2cb376c3), uint32(0x2ef5c89a), uint32(0x2f37a2ad), uint32(0x709a8dc0),
  5012  		uint32(0x7158e7f7), uint32(0x731e59ae), uint32(0x72dc3399), uint32(0x7793251c), uint32(0x76514f2b),
  5013  		uint32(0x7417f172), uint32(0x75d59b45), uint32(0x7e89dc78), uint32(0x7f4bb64f), uint32(0x7d0d0816),
  5014  		uint32(0x7ccf6221), uint32(0x798074a4), uint32(0x78421e93), uint32(0x7a04a0ca), uint32(0x7bc6cafd),
  5015  		uint32(0x6cbc2eb0), uint32(0x6d7e4487), uint32(0x6f38fade), uint32(0x6efa90e9), uint32(0x6bb5866c),
  5016  		uint32(0x6a77ec5b), uint32(0x68315202), uint32(0x69f33835), uint32(0x62af7f08), uint32(0x636d153f),
  5017  		uint32(0x612bab66), uint32(0x60e9c151), uint32(0x65a6d7d4), uint32(0x6464bde3), uint32(0x662203ba),
  5018  		uint32(0x67e0698d), uint32(0x48d7cb20), uint32(0x4915a117), uint32(0x4b531f4e), uint32(0x4a917579),
  5019  		uint32(0x4fde63fc), uint32(0x4e1c09cb), uint32(0x4c5ab792), uint32(0x4d98dda5), uint32(0x46c49a98),
  5020  		uint32(0x4706f0af), uint32(0x45404ef6), uint32(0x448224c1), uint32(0x41cd3244), uint32(0x400f5873),
  5021  		uint32(0x4249e62a), uint32(0x438b8c1d), uint32(0x54f16850), uint32(0x55330267), uint32(0x5775bc3e),
  5022  		uint32(0x56b7d609), uint32(0x53f8c08c), uint32(0x523aaabb), uint32(0x507c14e2), uint32(0x51be7ed5),
  5023  		uint32(0x5ae239e8), uint32(0x5b2053df), uint32(0x5966ed86), uint32(0x58a487b1), uint32(0x5deb9134),
  5024  		uint32(0x5c29fb03), uint32(0x5e6f455a), uint32(0x5fad2f6d), uint32(0xe1351b80), uint32(0xe0f771b7),
  5025  		uint32(0xe2b1cfee), uint32(0xe373a5d9), uint32(0xe63cb35c), uint32(0xe7fed96b), uint32(0xe5b86732),
  5026  		uint32(0xe47a0d05), uint32(0xef264a38), uint32(0xeee4200f), uint32(0xeca29e56), uint32(0xed60f461),
  5027  		uint32(0xe82fe2e4), uint32(0xe9ed88d3), uint32(0xebab368a), uint32(0xea695cbd), uint32(0xfd13b8f0),
  5028  		uint32(0xfcd1d2c7), uint32(0xfe976c9e), uint32(0xff5506a9), uint32(0xfa1a102c), uint32(0xfbd87a1b),
  5029  		uint32(0xf99ec442), uint32(0xf85cae75), uint32(0xf300e948), uint32(0xf2c2837f), uint32(0xf0843d26),
  5030  		uint32(0xf1465711), uint32(0xf4094194), uint32(0xf5cb2ba3), uint32(0xf78d95fa), uint32(0xf64fffcd),
  5031  		uint32(0xd9785d60), uint32(0xd8ba3757), uint32(0xdafc890e), uint32(0xdb3ee339), uint32(0xde71f5bc),
  5032  		uint32(0xdfb39f8b), uint32(0xddf521d2), uint32(0xdc374be5), uint32(0xd76b0cd8), uint32(0xd6a966ef),
  5033  		uint32(0xd4efd8b6), uint32(0xd52db281), uint32(0xd062a404), uint32(0xd1a0ce33), uint32(0xd3e6706a),
  5034  		uint32(0xd2241a5d), uint32(0xc55efe10), uint32(0xc49c9427), uint32(0xc6da2a7e), uint32(0xc7184049),
  5035  		uint32(0xc25756cc), uint32(0xc3953cfb), uint32(0xc1d382a2), uint32(0xc011e895), uint32(0xcb4dafa8),
  5036  		uint32(0xca8fc59f), uint32(0xc8c97bc6), uint32(0xc90b11f1), uint32(0xcc440774), uint32(0xcd866d43),
  5037  		uint32(0xcfc0d31a), uint32(0xce02b92d), uint32(0x91af9640), uint32(0x906dfc77), uint32(0x922b422e),
  5038  		uint32(0x93e92819), uint32(0x96a63e9c), uint32(0x976454ab), uint32(0x9522eaf2), uint32(0x94e080c5),
  5039  		uint32(0x9fbcc7f8), uint32(0x9e7eadcf), uint32(0x9c381396), uint32(0x9dfa79a1), uint32(0x98b56f24),
  5040  		uint32(0x99770513), uint32(0x9b31bb4a), uint32(0x9af3d17d), uint32(0x8d893530), uint32(0x8c4b5f07),
  5041  		uint32(0x8e0de15e), uint32(0x8fcf8b69), uint32(0x8a809dec), uint32(0x8b42f7db), uint32(0x89044982),
  5042  		uint32(0x88c623b5), uint32(0x839a6488), uint32(0x82580ebf), uint32(0x801eb0e6), uint32(0x81dcdad1),
  5043  		uint32(0x8493cc54), uint32(0x8551a663), uint32(0x8717183a), uint32(0x86d5720d), uint32(0xa9e2d0a0),
  5044  		uint32(0xa820ba97), uint32(0xaa6604ce), uint32(0xaba46ef9), uint32(0xaeeb787c), uint32(0xaf29124b),
  5045  		uint32(0xad6fac12), uint32(0xacadc625), uint32(0xa7f18118), uint32(0xa633eb2f), uint32(0xa4755576),
  5046  		uint32(0xa5b73f41), uint32(0xa0f829c4), uint32(0xa13a43f3), uint32(0xa37cfdaa), uint32(0xa2be979d),
  5047  		uint32(0xb5c473d0), uint32(0xb40619e7), uint32(0xb640a7be), uint32(0xb782cd89), uint32(0xb2cddb0c),
  5048  		uint32(0xb30fb13b), uint32(0xb1490f62), uint32(0xb08b6555), uint32(0xbbd72268), uint32(0xba15485f),
  5049  		uint32(0xb853f606), uint32(0xb9919c31), uint32(0xbcde8ab4), uint32(0xbd1ce083), uint32(0xbf5a5eda),
  5050  		uint32(0xbe9834ed),
  5051  	},
  5052  	{
  5053  		uint32(0x00000000), uint32(0xb8bc6765), uint32(0xaa09c88b), uint32(0x12b5afee), uint32(0x8f629757),
  5054  		uint32(0x37def032), uint32(0x256b5fdc), uint32(0x9dd738b9), uint32(0xc5b428ef), uint32(0x7d084f8a),
  5055  		uint32(0x6fbde064), uint32(0xd7018701), uint32(0x4ad6bfb8), uint32(0xf26ad8dd), uint32(0xe0df7733),
  5056  		uint32(0x58631056), uint32(0x5019579f), uint32(0xe8a530fa), uint32(0xfa109f14), uint32(0x42acf871),
  5057  		uint32(0xdf7bc0c8), uint32(0x67c7a7ad), uint32(0x75720843), uint32(0xcdce6f26), uint32(0x95ad7f70),
  5058  		uint32(0x2d111815), uint32(0x3fa4b7fb), uint32(0x8718d09e), uint32(0x1acfe827), uint32(0xa2738f42),
  5059  		uint32(0xb0c620ac), uint32(0x087a47c9), uint32(0xa032af3e), uint32(0x188ec85b), uint32(0x0a3b67b5),
  5060  		uint32(0xb28700d0), uint32(0x2f503869), uint32(0x97ec5f0c), uint32(0x8559f0e2), uint32(0x3de59787),
  5061  		uint32(0x658687d1), uint32(0xdd3ae0b4), uint32(0xcf8f4f5a), uint32(0x7733283f), uint32(0xeae41086),
  5062  		uint32(0x525877e3), uint32(0x40edd80d), uint32(0xf851bf68), uint32(0xf02bf8a1), uint32(0x48979fc4),
  5063  		uint32(0x5a22302a), uint32(0xe29e574f), uint32(0x7f496ff6), uint32(0xc7f50893), uint32(0xd540a77d),
  5064  		uint32(0x6dfcc018), uint32(0x359fd04e), uint32(0x8d23b72b), uint32(0x9f9618c5), uint32(0x272a7fa0),
  5065  		uint32(0xbafd4719), uint32(0x0241207c), uint32(0x10f48f92), uint32(0xa848e8f7), uint32(0x9b14583d),
  5066  		uint32(0x23a83f58), uint32(0x311d90b6), uint32(0x89a1f7d3), uint32(0x1476cf6a), uint32(0xaccaa80f),
  5067  		uint32(0xbe7f07e1), uint32(0x06c36084), uint32(0x5ea070d2), uint32(0xe61c17b7), uint32(0xf4a9b859),
  5068  		uint32(0x4c15df3c), uint32(0xd1c2e785), uint32(0x697e80e0), uint32(0x7bcb2f0e), uint32(0xc377486b),
  5069  		uint32(0xcb0d0fa2), uint32(0x73b168c7), uint32(0x6104c729), uint32(0xd9b8a04c), uint32(0x446f98f5),
  5070  		uint32(0xfcd3ff90), uint32(0xee66507e), uint32(0x56da371b), uint32(0x0eb9274d), uint32(0xb6054028),
  5071  		uint32(0xa4b0efc6), uint32(0x1c0c88a3), uint32(0x81dbb01a), uint32(0x3967d77f), uint32(0x2bd27891),
  5072  		uint32(0x936e1ff4), uint32(0x3b26f703), uint32(0x839a9066), uint32(0x912f3f88), uint32(0x299358ed),
  5073  		uint32(0xb4446054), uint32(0x0cf80731), uint32(0x1e4da8df), uint32(0xa6f1cfba), uint32(0xfe92dfec),
  5074  		uint32(0x462eb889), uint32(0x549b1767), uint32(0xec277002), uint32(0x71f048bb), uint32(0xc94c2fde),
  5075  		uint32(0xdbf98030), uint32(0x6345e755), uint32(0x6b3fa09c), uint32(0xd383c7f9), uint32(0xc1366817),
  5076  		uint32(0x798a0f72), uint32(0xe45d37cb), uint32(0x5ce150ae), uint32(0x4e54ff40), uint32(0xf6e89825),
  5077  		uint32(0xae8b8873), uint32(0x1637ef16), uint32(0x048240f8), uint32(0xbc3e279d), uint32(0x21e91f24),
  5078  		uint32(0x99557841), uint32(0x8be0d7af), uint32(0x335cb0ca), uint32(0xed59b63b), uint32(0x55e5d15e),
  5079  		uint32(0x47507eb0), uint32(0xffec19d5), uint32(0x623b216c), uint32(0xda874609), uint32(0xc832e9e7),
  5080  		uint32(0x708e8e82), uint32(0x28ed9ed4), uint32(0x9051f9b1), uint32(0x82e4565f), uint32(0x3a58313a),
  5081  		uint32(0xa78f0983), uint32(0x1f336ee6), uint32(0x0d86c108), uint32(0xb53aa66d), uint32(0xbd40e1a4),
  5082  		uint32(0x05fc86c1), uint32(0x1749292f), uint32(0xaff54e4a), uint32(0x322276f3), uint32(0x8a9e1196),
  5083  		uint32(0x982bbe78), uint32(0x2097d91d), uint32(0x78f4c94b), uint32(0xc048ae2e), uint32(0xd2fd01c0),
  5084  		uint32(0x6a4166a5), uint32(0xf7965e1c), uint32(0x4f2a3979), uint32(0x5d9f9697), uint32(0xe523f1f2),
  5085  		uint32(0x4d6b1905), uint32(0xf5d77e60), uint32(0xe762d18e), uint32(0x5fdeb6eb), uint32(0xc2098e52),
  5086  		uint32(0x7ab5e937), uint32(0x680046d9), uint32(0xd0bc21bc), uint32(0x88df31ea), uint32(0x3063568f),
  5087  		uint32(0x22d6f961), uint32(0x9a6a9e04), uint32(0x07bda6bd), uint32(0xbf01c1d8), uint32(0xadb46e36),
  5088  		uint32(0x15080953), uint32(0x1d724e9a), uint32(0xa5ce29ff), uint32(0xb77b8611), uint32(0x0fc7e174),
  5089  		uint32(0x9210d9cd), uint32(0x2aacbea8), uint32(0x38191146), uint32(0x80a57623), uint32(0xd8c66675),
  5090  		uint32(0x607a0110), uint32(0x72cfaefe), uint32(0xca73c99b), uint32(0x57a4f122), uint32(0xef189647),
  5091  		uint32(0xfdad39a9), uint32(0x45115ecc), uint32(0x764dee06), uint32(0xcef18963), uint32(0xdc44268d),
  5092  		uint32(0x64f841e8), uint32(0xf92f7951), uint32(0x41931e34), uint32(0x5326b1da), uint32(0xeb9ad6bf),
  5093  		uint32(0xb3f9c6e9), uint32(0x0b45a18c), uint32(0x19f00e62), uint32(0xa14c6907), uint32(0x3c9b51be),
  5094  		uint32(0x842736db), uint32(0x96929935), uint32(0x2e2efe50), uint32(0x2654b999), uint32(0x9ee8defc),
  5095  		uint32(0x8c5d7112), uint32(0x34e11677), uint32(0xa9362ece), uint32(0x118a49ab), uint32(0x033fe645),
  5096  		uint32(0xbb838120), uint32(0xe3e09176), uint32(0x5b5cf613), uint32(0x49e959fd), uint32(0xf1553e98),
  5097  		uint32(0x6c820621), uint32(0xd43e6144), uint32(0xc68bceaa), uint32(0x7e37a9cf), uint32(0xd67f4138),
  5098  		uint32(0x6ec3265d), uint32(0x7c7689b3), uint32(0xc4caeed6), uint32(0x591dd66f), uint32(0xe1a1b10a),
  5099  		uint32(0xf3141ee4), uint32(0x4ba87981), uint32(0x13cb69d7), uint32(0xab770eb2), uint32(0xb9c2a15c),
  5100  		uint32(0x017ec639), uint32(0x9ca9fe80), uint32(0x241599e5), uint32(0x36a0360b), uint32(0x8e1c516e),
  5101  		uint32(0x866616a7), uint32(0x3eda71c2), uint32(0x2c6fde2c), uint32(0x94d3b949), uint32(0x090481f0),
  5102  		uint32(0xb1b8e695), uint32(0xa30d497b), uint32(0x1bb12e1e), uint32(0x43d23e48), uint32(0xfb6e592d),
  5103  		uint32(0xe9dbf6c3), uint32(0x516791a6), uint32(0xccb0a91f), uint32(0x740cce7a), uint32(0x66b96194),
  5104  		uint32(0xde0506f1),
  5105  	},
  5106  	{
  5107  		uint32(0x00000000), uint32(0x96300777), uint32(0x2c610eee), uint32(0xba510999), uint32(0x19c46d07),
  5108  		uint32(0x8ff46a70), uint32(0x35a563e9), uint32(0xa395649e), uint32(0x3288db0e), uint32(0xa4b8dc79),
  5109  		uint32(0x1ee9d5e0), uint32(0x88d9d297), uint32(0x2b4cb609), uint32(0xbd7cb17e), uint32(0x072db8e7),
  5110  		uint32(0x911dbf90), uint32(0x6410b71d), uint32(0xf220b06a), uint32(0x4871b9f3), uint32(0xde41be84),
  5111  		uint32(0x7dd4da1a), uint32(0xebe4dd6d), uint32(0x51b5d4f4), uint32(0xc785d383), uint32(0x56986c13),
  5112  		uint32(0xc0a86b64), uint32(0x7af962fd), uint32(0xecc9658a), uint32(0x4f5c0114), uint32(0xd96c0663),
  5113  		uint32(0x633d0ffa), uint32(0xf50d088d), uint32(0xc8206e3b), uint32(0x5e10694c), uint32(0xe44160d5),
  5114  		uint32(0x727167a2), uint32(0xd1e4033c), uint32(0x47d4044b), uint32(0xfd850dd2), uint32(0x6bb50aa5),
  5115  		uint32(0xfaa8b535), uint32(0x6c98b242), uint32(0xd6c9bbdb), uint32(0x40f9bcac), uint32(0xe36cd832),
  5116  		uint32(0x755cdf45), uint32(0xcf0dd6dc), uint32(0x593dd1ab), uint32(0xac30d926), uint32(0x3a00de51),
  5117  		uint32(0x8051d7c8), uint32(0x1661d0bf), uint32(0xb5f4b421), uint32(0x23c4b356), uint32(0x9995bacf),
  5118  		uint32(0x0fa5bdb8), uint32(0x9eb80228), uint32(0x0888055f), uint32(0xb2d90cc6), uint32(0x24e90bb1),
  5119  		uint32(0x877c6f2f), uint32(0x114c6858), uint32(0xab1d61c1), uint32(0x3d2d66b6), uint32(0x9041dc76),
  5120  		uint32(0x0671db01), uint32(0xbc20d298), uint32(0x2a10d5ef), uint32(0x8985b171), uint32(0x1fb5b606),
  5121  		uint32(0xa5e4bf9f), uint32(0x33d4b8e8), uint32(0xa2c90778), uint32(0x34f9000f), uint32(0x8ea80996),
  5122  		uint32(0x18980ee1), uint32(0xbb0d6a7f), uint32(0x2d3d6d08), uint32(0x976c6491), uint32(0x015c63e6),
  5123  		uint32(0xf4516b6b), uint32(0x62616c1c), uint32(0xd8306585), uint32(0x4e0062f2), uint32(0xed95066c),
  5124  		uint32(0x7ba5011b), uint32(0xc1f40882), uint32(0x57c40ff5), uint32(0xc6d9b065), uint32(0x50e9b712),
  5125  		uint32(0xeab8be8b), uint32(0x7c88b9fc), uint32(0xdf1ddd62), uint32(0x492dda15), uint32(0xf37cd38c),
  5126  		uint32(0x654cd4fb), uint32(0x5861b24d), uint32(0xce51b53a), uint32(0x7400bca3), uint32(0xe230bbd4),
  5127  		uint32(0x41a5df4a), uint32(0xd795d83d), uint32(0x6dc4d1a4), uint32(0xfbf4d6d3), uint32(0x6ae96943),
  5128  		uint32(0xfcd96e34), uint32(0x468867ad), uint32(0xd0b860da), uint32(0x732d0444), uint32(0xe51d0333),
  5129  		uint32(0x5f4c0aaa), uint32(0xc97c0ddd), uint32(0x3c710550), uint32(0xaa410227), uint32(0x10100bbe),
  5130  		uint32(0x86200cc9), uint32(0x25b56857), uint32(0xb3856f20), uint32(0x09d466b9), uint32(0x9fe461ce),
  5131  		uint32(0x0ef9de5e), uint32(0x98c9d929), uint32(0x2298d0b0), uint32(0xb4a8d7c7), uint32(0x173db359),
  5132  		uint32(0x810db42e), uint32(0x3b5cbdb7), uint32(0xad6cbac0), uint32(0x2083b8ed), uint32(0xb6b3bf9a),
  5133  		uint32(0x0ce2b603), uint32(0x9ad2b174), uint32(0x3947d5ea), uint32(0xaf77d29d), uint32(0x1526db04),
  5134  		uint32(0x8316dc73), uint32(0x120b63e3), uint32(0x843b6494), uint32(0x3e6a6d0d), uint32(0xa85a6a7a),
  5135  		uint32(0x0bcf0ee4), uint32(0x9dff0993), uint32(0x27ae000a), uint32(0xb19e077d), uint32(0x44930ff0),
  5136  		uint32(0xd2a30887), uint32(0x68f2011e), uint32(0xfec20669), uint32(0x5d5762f7), uint32(0xcb676580),
  5137  		uint32(0x71366c19), uint32(0xe7066b6e), uint32(0x761bd4fe), uint32(0xe02bd389), uint32(0x5a7ada10),
  5138  		uint32(0xcc4add67), uint32(0x6fdfb9f9), uint32(0xf9efbe8e), uint32(0x43beb717), uint32(0xd58eb060),
  5139  		uint32(0xe8a3d6d6), uint32(0x7e93d1a1), uint32(0xc4c2d838), uint32(0x52f2df4f), uint32(0xf167bbd1),
  5140  		uint32(0x6757bca6), uint32(0xdd06b53f), uint32(0x4b36b248), uint32(0xda2b0dd8), uint32(0x4c1b0aaf),
  5141  		uint32(0xf64a0336), uint32(0x607a0441), uint32(0xc3ef60df), uint32(0x55df67a8), uint32(0xef8e6e31),
  5142  		uint32(0x79be6946), uint32(0x8cb361cb), uint32(0x1a8366bc), uint32(0xa0d26f25), uint32(0x36e26852),
  5143  		uint32(0x95770ccc), uint32(0x03470bbb), uint32(0xb9160222), uint32(0x2f260555), uint32(0xbe3bbac5),
  5144  		uint32(0x280bbdb2), uint32(0x925ab42b), uint32(0x046ab35c), uint32(0xa7ffd7c2), uint32(0x31cfd0b5),
  5145  		uint32(0x8b9ed92c), uint32(0x1daede5b), uint32(0xb0c2649b), uint32(0x26f263ec), uint32(0x9ca36a75),
  5146  		uint32(0x0a936d02), uint32(0xa906099c), uint32(0x3f360eeb), uint32(0x85670772), uint32(0x13570005),
  5147  		uint32(0x824abf95), uint32(0x147ab8e2), uint32(0xae2bb17b), uint32(0x381bb60c), uint32(0x9b8ed292),
  5148  		uint32(0x0dbed5e5), uint32(0xb7efdc7c), uint32(0x21dfdb0b), uint32(0xd4d2d386), uint32(0x42e2d4f1),
  5149  		uint32(0xf8b3dd68), uint32(0x6e83da1f), uint32(0xcd16be81), uint32(0x5b26b9f6), uint32(0xe177b06f),
  5150  		uint32(0x7747b718), uint32(0xe65a0888), uint32(0x706a0fff), uint32(0xca3b0666), uint32(0x5c0b0111),
  5151  		uint32(0xff9e658f), uint32(0x69ae62f8), uint32(0xd3ff6b61), uint32(0x45cf6c16), uint32(0x78e20aa0),
  5152  		uint32(0xeed20dd7), uint32(0x5483044e), uint32(0xc2b30339), uint32(0x612667a7), uint32(0xf71660d0),
  5153  		uint32(0x4d476949), uint32(0xdb776e3e), uint32(0x4a6ad1ae), uint32(0xdc5ad6d9), uint32(0x660bdf40),
  5154  		uint32(0xf03bd837), uint32(0x53aebca9), uint32(0xc59ebbde), uint32(0x7fcfb247), uint32(0xe9ffb530),
  5155  		uint32(0x1cf2bdbd), uint32(0x8ac2baca), uint32(0x3093b353), uint32(0xa6a3b424), uint32(0x0536d0ba),
  5156  		uint32(0x9306d7cd), uint32(0x2957de54), uint32(0xbf67d923), uint32(0x2e7a66b3), uint32(0xb84a61c4),
  5157  		uint32(0x021b685d), uint32(0x942b6f2a), uint32(0x37be0bb4), uint32(0xa18e0cc3), uint32(0x1bdf055a),
  5158  		uint32(0x8def022d),
  5159  	},
  5160  	{
  5161  		uint32(0x00000000), uint32(0x41311b19), uint32(0x82623632), uint32(0xc3532d2b), uint32(0x04c56c64),
  5162  		uint32(0x45f4777d), uint32(0x86a75a56), uint32(0xc796414f), uint32(0x088ad9c8), uint32(0x49bbc2d1),
  5163  		uint32(0x8ae8effa), uint32(0xcbd9f4e3), uint32(0x0c4fb5ac), uint32(0x4d7eaeb5), uint32(0x8e2d839e),
  5164  		uint32(0xcf1c9887), uint32(0x5112c24a), uint32(0x1023d953), uint32(0xd370f478), uint32(0x9241ef61),
  5165  		uint32(0x55d7ae2e), uint32(0x14e6b537), uint32(0xd7b5981c), uint32(0x96848305), uint32(0x59981b82),
  5166  		uint32(0x18a9009b), uint32(0xdbfa2db0), uint32(0x9acb36a9), uint32(0x5d5d77e6), uint32(0x1c6c6cff),
  5167  		uint32(0xdf3f41d4), uint32(0x9e0e5acd), uint32(0xa2248495), uint32(0xe3159f8c), uint32(0x2046b2a7),
  5168  		uint32(0x6177a9be), uint32(0xa6e1e8f1), uint32(0xe7d0f3e8), uint32(0x2483dec3), uint32(0x65b2c5da),
  5169  		uint32(0xaaae5d5d), uint32(0xeb9f4644), uint32(0x28cc6b6f), uint32(0x69fd7076), uint32(0xae6b3139),
  5170  		uint32(0xef5a2a20), uint32(0x2c09070b), uint32(0x6d381c12), uint32(0xf33646df), uint32(0xb2075dc6),
  5171  		uint32(0x715470ed), uint32(0x30656bf4), uint32(0xf7f32abb), uint32(0xb6c231a2), uint32(0x75911c89),
  5172  		uint32(0x34a00790), uint32(0xfbbc9f17), uint32(0xba8d840e), uint32(0x79dea925), uint32(0x38efb23c),
  5173  		uint32(0xff79f373), uint32(0xbe48e86a), uint32(0x7d1bc541), uint32(0x3c2ade58), uint32(0x054f79f0),
  5174  		uint32(0x447e62e9), uint32(0x872d4fc2), uint32(0xc61c54db), uint32(0x018a1594), uint32(0x40bb0e8d),
  5175  		uint32(0x83e823a6), uint32(0xc2d938bf), uint32(0x0dc5a038), uint32(0x4cf4bb21), uint32(0x8fa7960a),
  5176  		uint32(0xce968d13), uint32(0x0900cc5c), uint32(0x4831d745), uint32(0x8b62fa6e), uint32(0xca53e177),
  5177  		uint32(0x545dbbba), uint32(0x156ca0a3), uint32(0xd63f8d88), uint32(0x970e9691), uint32(0x5098d7de),
  5178  		uint32(0x11a9ccc7), uint32(0xd2fae1ec), uint32(0x93cbfaf5), uint32(0x5cd76272), uint32(0x1de6796b),
  5179  		uint32(0xdeb55440), uint32(0x9f844f59), uint32(0x58120e16), uint32(0x1923150f), uint32(0xda703824),
  5180  		uint32(0x9b41233d), uint32(0xa76bfd65), uint32(0xe65ae67c), uint32(0x2509cb57), uint32(0x6438d04e),
  5181  		uint32(0xa3ae9101), uint32(0xe29f8a18), uint32(0x21cca733), uint32(0x60fdbc2a), uint32(0xafe124ad),
  5182  		uint32(0xeed03fb4), uint32(0x2d83129f), uint32(0x6cb20986), uint32(0xab2448c9), uint32(0xea1553d0),
  5183  		uint32(0x29467efb), uint32(0x687765e2), uint32(0xf6793f2f), uint32(0xb7482436), uint32(0x741b091d),
  5184  		uint32(0x352a1204), uint32(0xf2bc534b), uint32(0xb38d4852), uint32(0x70de6579), uint32(0x31ef7e60),
  5185  		uint32(0xfef3e6e7), uint32(0xbfc2fdfe), uint32(0x7c91d0d5), uint32(0x3da0cbcc), uint32(0xfa368a83),
  5186  		uint32(0xbb07919a), uint32(0x7854bcb1), uint32(0x3965a7a8), uint32(0x4b98833b), uint32(0x0aa99822),
  5187  		uint32(0xc9fab509), uint32(0x88cbae10), uint32(0x4f5def5f), uint32(0x0e6cf446), uint32(0xcd3fd96d),
  5188  		uint32(0x8c0ec274), uint32(0x43125af3), uint32(0x022341ea), uint32(0xc1706cc1), uint32(0x804177d8),
  5189  		uint32(0x47d73697), uint32(0x06e62d8e), uint32(0xc5b500a5), uint32(0x84841bbc), uint32(0x1a8a4171),
  5190  		uint32(0x5bbb5a68), uint32(0x98e87743), uint32(0xd9d96c5a), uint32(0x1e4f2d15), uint32(0x5f7e360c),
  5191  		uint32(0x9c2d1b27), uint32(0xdd1c003e), uint32(0x120098b9), uint32(0x533183a0), uint32(0x9062ae8b),
  5192  		uint32(0xd153b592), uint32(0x16c5f4dd), uint32(0x57f4efc4), uint32(0x94a7c2ef), uint32(0xd596d9f6),
  5193  		uint32(0xe9bc07ae), uint32(0xa88d1cb7), uint32(0x6bde319c), uint32(0x2aef2a85), uint32(0xed796bca),
  5194  		uint32(0xac4870d3), uint32(0x6f1b5df8), uint32(0x2e2a46e1), uint32(0xe136de66), uint32(0xa007c57f),
  5195  		uint32(0x6354e854), uint32(0x2265f34d), uint32(0xe5f3b202), uint32(0xa4c2a91b), uint32(0x67918430),
  5196  		uint32(0x26a09f29), uint32(0xb8aec5e4), uint32(0xf99fdefd), uint32(0x3accf3d6), uint32(0x7bfde8cf),
  5197  		uint32(0xbc6ba980), uint32(0xfd5ab299), uint32(0x3e099fb2), uint32(0x7f3884ab), uint32(0xb0241c2c),
  5198  		uint32(0xf1150735), uint32(0x32462a1e), uint32(0x73773107), uint32(0xb4e17048), uint32(0xf5d06b51),
  5199  		uint32(0x3683467a), uint32(0x77b25d63), uint32(0x4ed7facb), uint32(0x0fe6e1d2), uint32(0xccb5ccf9),
  5200  		uint32(0x8d84d7e0), uint32(0x4a1296af), uint32(0x0b238db6), uint32(0xc870a09d), uint32(0x8941bb84),
  5201  		uint32(0x465d2303), uint32(0x076c381a), uint32(0xc43f1531), uint32(0x850e0e28), uint32(0x42984f67),
  5202  		uint32(0x03a9547e), uint32(0xc0fa7955), uint32(0x81cb624c), uint32(0x1fc53881), uint32(0x5ef42398),
  5203  		uint32(0x9da70eb3), uint32(0xdc9615aa), uint32(0x1b0054e5), uint32(0x5a314ffc), uint32(0x996262d7),
  5204  		uint32(0xd85379ce), uint32(0x174fe149), uint32(0x567efa50), uint32(0x952dd77b), uint32(0xd41ccc62),
  5205  		uint32(0x138a8d2d), uint32(0x52bb9634), uint32(0x91e8bb1f), uint32(0xd0d9a006), uint32(0xecf37e5e),
  5206  		uint32(0xadc26547), uint32(0x6e91486c), uint32(0x2fa05375), uint32(0xe836123a), uint32(0xa9070923),
  5207  		uint32(0x6a542408), uint32(0x2b653f11), uint32(0xe479a796), uint32(0xa548bc8f), uint32(0x661b91a4),
  5208  		uint32(0x272a8abd), uint32(0xe0bccbf2), uint32(0xa18dd0eb), uint32(0x62defdc0), uint32(0x23efe6d9),
  5209  		uint32(0xbde1bc14), uint32(0xfcd0a70d), uint32(0x3f838a26), uint32(0x7eb2913f), uint32(0xb924d070),
  5210  		uint32(0xf815cb69), uint32(0x3b46e642), uint32(0x7a77fd5b), uint32(0xb56b65dc), uint32(0xf45a7ec5),
  5211  		uint32(0x370953ee), uint32(0x763848f7), uint32(0xb1ae09b8), uint32(0xf09f12a1), uint32(0x33cc3f8a),
  5212  		uint32(0x72fd2493),
  5213  	},
  5214  	{
  5215  		uint32(0x00000000), uint32(0x376ac201), uint32(0x6ed48403), uint32(0x59be4602), uint32(0xdca80907),
  5216  		uint32(0xebc2cb06), uint32(0xb27c8d04), uint32(0x85164f05), uint32(0xb851130e), uint32(0x8f3bd10f),
  5217  		uint32(0xd685970d), uint32(0xe1ef550c), uint32(0x64f91a09), uint32(0x5393d808), uint32(0x0a2d9e0a),
  5218  		uint32(0x3d475c0b), uint32(0x70a3261c), uint32(0x47c9e41d), uint32(0x1e77a21f), uint32(0x291d601e),
  5219  		uint32(0xac0b2f1b), uint32(0x9b61ed1a), uint32(0xc2dfab18), uint32(0xf5b56919), uint32(0xc8f23512),
  5220  		uint32(0xff98f713), uint32(0xa626b111), uint32(0x914c7310), uint32(0x145a3c15), uint32(0x2330fe14),
  5221  		uint32(0x7a8eb816), uint32(0x4de47a17), uint32(0xe0464d38), uint32(0xd72c8f39), uint32(0x8e92c93b),
  5222  		uint32(0xb9f80b3a), uint32(0x3cee443f), uint32(0x0b84863e), uint32(0x523ac03c), uint32(0x6550023d),
  5223  		uint32(0x58175e36), uint32(0x6f7d9c37), uint32(0x36c3da35), uint32(0x01a91834), uint32(0x84bf5731),
  5224  		uint32(0xb3d59530), uint32(0xea6bd332), uint32(0xdd011133), uint32(0x90e56b24), uint32(0xa78fa925),
  5225  		uint32(0xfe31ef27), uint32(0xc95b2d26), uint32(0x4c4d6223), uint32(0x7b27a022), uint32(0x2299e620),
  5226  		uint32(0x15f32421), uint32(0x28b4782a), uint32(0x1fdeba2b), uint32(0x4660fc29), uint32(0x710a3e28),
  5227  		uint32(0xf41c712d), uint32(0xc376b32c), uint32(0x9ac8f52e), uint32(0xada2372f), uint32(0xc08d9a70),
  5228  		uint32(0xf7e75871), uint32(0xae591e73), uint32(0x9933dc72), uint32(0x1c259377), uint32(0x2b4f5176),
  5229  		uint32(0x72f11774), uint32(0x459bd575), uint32(0x78dc897e), uint32(0x4fb64b7f), uint32(0x16080d7d),
  5230  		uint32(0x2162cf7c), uint32(0xa4748079), uint32(0x931e4278), uint32(0xcaa0047a), uint32(0xfdcac67b),
  5231  		uint32(0xb02ebc6c), uint32(0x87447e6d), uint32(0xdefa386f), uint32(0xe990fa6e), uint32(0x6c86b56b),
  5232  		uint32(0x5bec776a), uint32(0x02523168), uint32(0x3538f369), uint32(0x087faf62), uint32(0x3f156d63),
  5233  		uint32(0x66ab2b61), uint32(0x51c1e960), uint32(0xd4d7a665), uint32(0xe3bd6464), uint32(0xba032266),
  5234  		uint32(0x8d69e067), uint32(0x20cbd748), uint32(0x17a11549), uint32(0x4e1f534b), uint32(0x7975914a),
  5235  		uint32(0xfc63de4f), uint32(0xcb091c4e), uint32(0x92b75a4c), uint32(0xa5dd984d), uint32(0x989ac446),
  5236  		uint32(0xaff00647), uint32(0xf64e4045), uint32(0xc1248244), uint32(0x4432cd41), uint32(0x73580f40),
  5237  		uint32(0x2ae64942), uint32(0x1d8c8b43), uint32(0x5068f154), uint32(0x67023355), uint32(0x3ebc7557),
  5238  		uint32(0x09d6b756), uint32(0x8cc0f853), uint32(0xbbaa3a52), uint32(0xe2147c50), uint32(0xd57ebe51),
  5239  		uint32(0xe839e25a), uint32(0xdf53205b), uint32(0x86ed6659), uint32(0xb187a458), uint32(0x3491eb5d),
  5240  		uint32(0x03fb295c), uint32(0x5a456f5e), uint32(0x6d2fad5f), uint32(0x801b35e1), uint32(0xb771f7e0),
  5241  		uint32(0xeecfb1e2), uint32(0xd9a573e3), uint32(0x5cb33ce6), uint32(0x6bd9fee7), uint32(0x3267b8e5),
  5242  		uint32(0x050d7ae4), uint32(0x384a26ef), uint32(0x0f20e4ee), uint32(0x569ea2ec), uint32(0x61f460ed),
  5243  		uint32(0xe4e22fe8), uint32(0xd388ede9), uint32(0x8a36abeb), uint32(0xbd5c69ea), uint32(0xf0b813fd),
  5244  		uint32(0xc7d2d1fc), uint32(0x9e6c97fe), uint32(0xa90655ff), uint32(0x2c101afa), uint32(0x1b7ad8fb),
  5245  		uint32(0x42c49ef9), uint32(0x75ae5cf8), uint32(0x48e900f3), uint32(0x7f83c2f2), uint32(0x263d84f0),
  5246  		uint32(0x115746f1), uint32(0x944109f4), uint32(0xa32bcbf5), uint32(0xfa958df7), uint32(0xcdff4ff6),
  5247  		uint32(0x605d78d9), uint32(0x5737bad8), uint32(0x0e89fcda), uint32(0x39e33edb), uint32(0xbcf571de),
  5248  		uint32(0x8b9fb3df), uint32(0xd221f5dd), uint32(0xe54b37dc), uint32(0xd80c6bd7), uint32(0xef66a9d6),
  5249  		uint32(0xb6d8efd4), uint32(0x81b22dd5), uint32(0x04a462d0), uint32(0x33cea0d1), uint32(0x6a70e6d3),
  5250  		uint32(0x5d1a24d2), uint32(0x10fe5ec5), uint32(0x27949cc4), uint32(0x7e2adac6), uint32(0x494018c7),
  5251  		uint32(0xcc5657c2), uint32(0xfb3c95c3), uint32(0xa282d3c1), uint32(0x95e811c0), uint32(0xa8af4dcb),
  5252  		uint32(0x9fc58fca), uint32(0xc67bc9c8), uint32(0xf1110bc9), uint32(0x740744cc), uint32(0x436d86cd),
  5253  		uint32(0x1ad3c0cf), uint32(0x2db902ce), uint32(0x4096af91), uint32(0x77fc6d90), uint32(0x2e422b92),
  5254  		uint32(0x1928e993), uint32(0x9c3ea696), uint32(0xab546497), uint32(0xf2ea2295), uint32(0xc580e094),
  5255  		uint32(0xf8c7bc9f), uint32(0xcfad7e9e), uint32(0x9613389c), uint32(0xa179fa9d), uint32(0x246fb598),
  5256  		uint32(0x13057799), uint32(0x4abb319b), uint32(0x7dd1f39a), uint32(0x3035898d), uint32(0x075f4b8c),
  5257  		uint32(0x5ee10d8e), uint32(0x698bcf8f), uint32(0xec9d808a), uint32(0xdbf7428b), uint32(0x82490489),
  5258  		uint32(0xb523c688), uint32(0x88649a83), uint32(0xbf0e5882), uint32(0xe6b01e80), uint32(0xd1dadc81),
  5259  		uint32(0x54cc9384), uint32(0x63a65185), uint32(0x3a181787), uint32(0x0d72d586), uint32(0xa0d0e2a9),
  5260  		uint32(0x97ba20a8), uint32(0xce0466aa), uint32(0xf96ea4ab), uint32(0x7c78ebae), uint32(0x4b1229af),
  5261  		uint32(0x12ac6fad), uint32(0x25c6adac), uint32(0x1881f1a7), uint32(0x2feb33a6), uint32(0x765575a4),
  5262  		uint32(0x413fb7a5), uint32(0xc429f8a0), uint32(0xf3433aa1), uint32(0xaafd7ca3), uint32(0x9d97bea2),
  5263  		uint32(0xd073c4b5), uint32(0xe71906b4), uint32(0xbea740b6), uint32(0x89cd82b7), uint32(0x0cdbcdb2),
  5264  		uint32(0x3bb10fb3), uint32(0x620f49b1), uint32(0x55658bb0), uint32(0x6822d7bb), uint32(0x5f4815ba),
  5265  		uint32(0x06f653b8), uint32(0x319c91b9), uint32(0xb48adebc), uint32(0x83e01cbd), uint32(0xda5e5abf),
  5266  		uint32(0xed3498be),
  5267  	},
  5268  	{
  5269  		uint32(0x00000000), uint32(0x6567bcb8), uint32(0x8bc809aa), uint32(0xeeafb512), uint32(0x5797628f),
  5270  		uint32(0x32f0de37), uint32(0xdc5f6b25), uint32(0xb938d79d), uint32(0xef28b4c5), uint32(0x8a4f087d),
  5271  		uint32(0x64e0bd6f), uint32(0x018701d7), uint32(0xb8bfd64a), uint32(0xddd86af2), uint32(0x3377dfe0),
  5272  		uint32(0x56106358), uint32(0x9f571950), uint32(0xfa30a5e8), uint32(0x149f10fa), uint32(0x71f8ac42),
  5273  		uint32(0xc8c07bdf), uint32(0xada7c767), uint32(0x43087275), uint32(0x266fcecd), uint32(0x707fad95),
  5274  		uint32(0x1518112d), uint32(0xfbb7a43f), uint32(0x9ed01887), uint32(0x27e8cf1a), uint32(0x428f73a2),
  5275  		uint32(0xac20c6b0), uint32(0xc9477a08), uint32(0x3eaf32a0), uint32(0x5bc88e18), uint32(0xb5673b0a),
  5276  		uint32(0xd00087b2), uint32(0x6938502f), uint32(0x0c5fec97), uint32(0xe2f05985), uint32(0x8797e53d),
  5277  		uint32(0xd1878665), uint32(0xb4e03add), uint32(0x5a4f8fcf), uint32(0x3f283377), uint32(0x8610e4ea),
  5278  		uint32(0xe3775852), uint32(0x0dd8ed40), uint32(0x68bf51f8), uint32(0xa1f82bf0), uint32(0xc49f9748),
  5279  		uint32(0x2a30225a), uint32(0x4f579ee2), uint32(0xf66f497f), uint32(0x9308f5c7), uint32(0x7da740d5),
  5280  		uint32(0x18c0fc6d), uint32(0x4ed09f35), uint32(0x2bb7238d), uint32(0xc518969f), uint32(0xa07f2a27),
  5281  		uint32(0x1947fdba), uint32(0x7c204102), uint32(0x928ff410), uint32(0xf7e848a8), uint32(0x3d58149b),
  5282  		uint32(0x583fa823), uint32(0xb6901d31), uint32(0xd3f7a189), uint32(0x6acf7614), uint32(0x0fa8caac),
  5283  		uint32(0xe1077fbe), uint32(0x8460c306), uint32(0xd270a05e), uint32(0xb7171ce6), uint32(0x59b8a9f4),
  5284  		uint32(0x3cdf154c), uint32(0x85e7c2d1), uint32(0xe0807e69), uint32(0x0e2fcb7b), uint32(0x6b4877c3),
  5285  		uint32(0xa20f0dcb), uint32(0xc768b173), uint32(0x29c70461), uint32(0x4ca0b8d9), uint32(0xf5986f44),
  5286  		uint32(0x90ffd3fc), uint32(0x7e5066ee), uint32(0x1b37da56), uint32(0x4d27b90e), uint32(0x284005b6),
  5287  		uint32(0xc6efb0a4), uint32(0xa3880c1c), uint32(0x1ab0db81), uint32(0x7fd76739), uint32(0x9178d22b),
  5288  		uint32(0xf41f6e93), uint32(0x03f7263b), uint32(0x66909a83), uint32(0x883f2f91), uint32(0xed589329),
  5289  		uint32(0x546044b4), uint32(0x3107f80c), uint32(0xdfa84d1e), uint32(0xbacff1a6), uint32(0xecdf92fe),
  5290  		uint32(0x89b82e46), uint32(0x67179b54), uint32(0x027027ec), uint32(0xbb48f071), uint32(0xde2f4cc9),
  5291  		uint32(0x3080f9db), uint32(0x55e74563), uint32(0x9ca03f6b), uint32(0xf9c783d3), uint32(0x176836c1),
  5292  		uint32(0x720f8a79), uint32(0xcb375de4), uint32(0xae50e15c), uint32(0x40ff544e), uint32(0x2598e8f6),
  5293  		uint32(0x73888bae), uint32(0x16ef3716), uint32(0xf8408204), uint32(0x9d273ebc), uint32(0x241fe921),
  5294  		uint32(0x41785599), uint32(0xafd7e08b), uint32(0xcab05c33), uint32(0x3bb659ed), uint32(0x5ed1e555),
  5295  		uint32(0xb07e5047), uint32(0xd519ecff), uint32(0x6c213b62), uint32(0x094687da), uint32(0xe7e932c8),
  5296  		uint32(0x828e8e70), uint32(0xd49eed28), uint32(0xb1f95190), uint32(0x5f56e482), uint32(0x3a31583a),
  5297  		uint32(0x83098fa7), uint32(0xe66e331f), uint32(0x08c1860d), uint32(0x6da63ab5), uint32(0xa4e140bd),
  5298  		uint32(0xc186fc05), uint32(0x2f294917), uint32(0x4a4ef5af), uint32(0xf3762232), uint32(0x96119e8a),
  5299  		uint32(0x78be2b98), uint32(0x1dd99720), uint32(0x4bc9f478), uint32(0x2eae48c0), uint32(0xc001fdd2),
  5300  		uint32(0xa566416a), uint32(0x1c5e96f7), uint32(0x79392a4f), uint32(0x97969f5d), uint32(0xf2f123e5),
  5301  		uint32(0x05196b4d), uint32(0x607ed7f5), uint32(0x8ed162e7), uint32(0xebb6de5f), uint32(0x528e09c2),
  5302  		uint32(0x37e9b57a), uint32(0xd9460068), uint32(0xbc21bcd0), uint32(0xea31df88), uint32(0x8f566330),
  5303  		uint32(0x61f9d622), uint32(0x049e6a9a), uint32(0xbda6bd07), uint32(0xd8c101bf), uint32(0x366eb4ad),
  5304  		uint32(0x53090815), uint32(0x9a4e721d), uint32(0xff29cea5), uint32(0x11867bb7), uint32(0x74e1c70f),
  5305  		uint32(0xcdd91092), uint32(0xa8beac2a), uint32(0x46111938), uint32(0x2376a580), uint32(0x7566c6d8),
  5306  		uint32(0x10017a60), uint32(0xfeaecf72), uint32(0x9bc973ca), uint32(0x22f1a457), uint32(0x479618ef),
  5307  		uint32(0xa939adfd), uint32(0xcc5e1145), uint32(0x06ee4d76), uint32(0x6389f1ce), uint32(0x8d2644dc),
  5308  		uint32(0xe841f864), uint32(0x51792ff9), uint32(0x341e9341), uint32(0xdab12653), uint32(0xbfd69aeb),
  5309  		uint32(0xe9c6f9b3), uint32(0x8ca1450b), uint32(0x620ef019), uint32(0x07694ca1), uint32(0xbe519b3c),
  5310  		uint32(0xdb362784), uint32(0x35999296), uint32(0x50fe2e2e), uint32(0x99b95426), uint32(0xfcdee89e),
  5311  		uint32(0x12715d8c), uint32(0x7716e134), uint32(0xce2e36a9), uint32(0xab498a11), uint32(0x45e63f03),
  5312  		uint32(0x208183bb), uint32(0x7691e0e3), uint32(0x13f65c5b), uint32(0xfd59e949), uint32(0x983e55f1),
  5313  		uint32(0x2106826c), uint32(0x44613ed4), uint32(0xaace8bc6), uint32(0xcfa9377e), uint32(0x38417fd6),
  5314  		uint32(0x5d26c36e), uint32(0xb389767c), uint32(0xd6eecac4), uint32(0x6fd61d59), uint32(0x0ab1a1e1),
  5315  		uint32(0xe41e14f3), uint32(0x8179a84b), uint32(0xd769cb13), uint32(0xb20e77ab), uint32(0x5ca1c2b9),
  5316  		uint32(0x39c67e01), uint32(0x80fea99c), uint32(0xe5991524), uint32(0x0b36a036), uint32(0x6e511c8e),
  5317  		uint32(0xa7166686), uint32(0xc271da3e), uint32(0x2cde6f2c), uint32(0x49b9d394), uint32(0xf0810409),
  5318  		uint32(0x95e6b8b1), uint32(0x7b490da3), uint32(0x1e2eb11b), uint32(0x483ed243), uint32(0x2d596efb),
  5319  		uint32(0xc3f6dbe9), uint32(0xa6916751), uint32(0x1fa9b0cc), uint32(0x7ace0c74), uint32(0x9461b966),
  5320  		uint32(0xf10605de),
  5321  	},
  5322  } /* crc32.h:5:25 */
  5323  
  5324  // =========================================================================
  5325  // This function can be used by asm versions of crc32()
  5326  func Xget_crc_table(tls *libc.TLS) uintptr { /* crc32.c:188:19: */
  5327  	return uintptr(uintptr(unsafe.Pointer(&crc_table)))
  5328  }
  5329  
  5330  // =========================================================================
  5331  
  5332  // =========================================================================
  5333  func Xcrc32_z(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:202:23: */
  5334  	bp := tls.Alloc(4)
  5335  	defer tls.Free(4)
  5336  
  5337  	if buf == uintptr(Z_NULL) {
  5338  		return 0
  5339  	}
  5340  
  5341  	if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(Ptrdiff_t(0))) {
  5342  		// var endian Z_crc_t at bp, 4
  5343  
  5344  		*(*Z_crc_t)(unsafe.Pointer(bp /* endian */)) = Z_crc_t(1)
  5345  		if *(*uint8)(unsafe.Pointer(bp /* &endian */)) != 0 {
  5346  			return crc32_little(tls, crc, buf, len)
  5347  		} else {
  5348  			return crc32_big(tls, crc, buf, len)
  5349  		}
  5350  	}
  5351  	crc = (crc ^ 0xffffffff)
  5352  	for len >= uint64(8) {
  5353  		crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8))
  5354  		crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8))
  5355  		crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8))
  5356  		crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8))
  5357  		crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8))
  5358  		crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8))
  5359  		crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8))
  5360  		crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8))
  5361  		len = len - (uint64(8))
  5362  	}
  5363  	if len != 0 {
  5364  		for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 {
  5365  			crc = (uint64(*(*Z_crc_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&crc_table))) + uintptr(((int32(crc)^(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&buf, 1))))))&0xff))*4))) ^ (crc >> 8))
  5366  		}
  5367  	}
  5368  	return (crc ^ 0xffffffff)
  5369  }
  5370  
  5371  // =========================================================================
  5372  func Xcrc32(tls *libc.TLS, crc uint64, buf uintptr, len UInt) uint64 { /* crc32.c:237:23: */
  5373  	return Xcrc32_z(tls, crc, buf, uint64(len))
  5374  }
  5375  
  5376  //
  5377  //    This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit
  5378  //    integer pointer type. This violates the strict aliasing rule, where a
  5379  //    compiler can assume, for optimization purposes, that two pointers to
  5380  //    fundamentally different types won't ever point to the same memory. This can
  5381  //    manifest as a problem only if one of the pointers is written to. This code
  5382  //    only reads from those pointers. So long as this code remains isolated in
  5383  //    this compilation unit, there won't be a problem. For this reason, this code
  5384  //    should not be copied and pasted into a compilation unit in which other code
  5385  //    writes to the buffer that is passed to these routines.
  5386  //
  5387  
  5388  // =========================================================================
  5389  
  5390  // =========================================================================
  5391  func crc32_little(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:266:21: */
  5392  	var c Z_crc_t
  5393  	var buf4 uintptr
  5394  
  5395  	c = Z_crc_t(crc)
  5396  	c = ^c
  5397  	for (len != 0) && ((Ptrdiff_t(buf) & int64(3)) != 0) {
  5398  		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))
  5399  		len--
  5400  	}
  5401  
  5402  	buf4 = buf
  5403  	for len >= uint64(32) {
  5404  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5405  		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)))
  5406  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5407  		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)))
  5408  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5409  		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)))
  5410  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5411  		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)))
  5412  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5413  		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)))
  5414  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5415  		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)))
  5416  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5417  		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)))
  5418  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5419  		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)))
  5420  		len = len - (uint64(32))
  5421  	}
  5422  	for len >= uint64(4) {
  5423  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5424  		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)))
  5425  		len = len - (uint64(4))
  5426  	}
  5427  	buf = buf4
  5428  
  5429  	if len != 0 {
  5430  		for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 {
  5431  			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))
  5432  		}
  5433  	}
  5434  	c = ^c
  5435  	return uint64(c)
  5436  }
  5437  
  5438  // =========================================================================
  5439  
  5440  // =========================================================================
  5441  func crc32_big(tls *libc.TLS, crc uint64, buf uintptr, len Z_size_t) uint64 { /* crc32.c:306:21: */
  5442  	var c Z_crc_t
  5443  	var buf4 uintptr
  5444  
  5445  	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))
  5446  	c = ^c
  5447  	for (len != 0) && ((Ptrdiff_t(buf) & int64(3)) != 0) {
  5448  		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))
  5449  		len--
  5450  	}
  5451  
  5452  	buf4 = buf
  5453  	for len >= uint64(32) {
  5454  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5455  		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)))
  5456  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5457  		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)))
  5458  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5459  		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)))
  5460  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5461  		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)))
  5462  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5463  		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)))
  5464  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5465  		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)))
  5466  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5467  		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)))
  5468  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5469  		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)))
  5470  		len = len - (uint64(32))
  5471  	}
  5472  	for len >= uint64(4) {
  5473  		c = c ^ (*(*Z_crc_t)(unsafe.Pointer(libc.PostIncUintptr(&buf4, 4))))
  5474  		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)))
  5475  		len = len - (uint64(4))
  5476  	}
  5477  	buf = buf4
  5478  
  5479  	if len != 0 {
  5480  		for ok := true; ok; ok = libc.PreDecUint64(&len, 1) != 0 {
  5481  			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))
  5482  		}
  5483  	}
  5484  	c = ^c
  5485  	return (uint64((((((c) >> 24) & Z_crc_t(0xff)) + (((c) >> 8) & Z_crc_t(0xff00))) + (((c) & Z_crc_t(0xff00)) << 8)) + (((c) & Z_crc_t(0xff)) << 24)))
  5486  }
  5487  
  5488  // =========================================================================
  5489  func gf2_matrix_times(tls *libc.TLS, mat uintptr, vec uint64) uint64 { /* crc32.c:344:21: */
  5490  	var sum uint64
  5491  
  5492  	sum = uint64(0)
  5493  	for vec != 0 {
  5494  		if (vec & uint64(1)) != 0 {
  5495  			sum = sum ^ (*(*uint64)(unsafe.Pointer(mat)))
  5496  		}
  5497  		vec >>= 1
  5498  		mat += 8
  5499  	}
  5500  	return sum
  5501  }
  5502  
  5503  // =========================================================================
  5504  func gf2_matrix_square(tls *libc.TLS, square uintptr, mat uintptr) { /* crc32.c:361:12: */
  5505  	var n int32
  5506  
  5507  	for n = 0; n < GF2_DIM; n++ {
  5508  		*(*uint64)(unsafe.Pointer(square + uintptr(n)*8)) = gf2_matrix_times(tls, mat, *(*uint64)(unsafe.Pointer(mat + uintptr(n)*8)))
  5509  	}
  5510  }
  5511  
  5512  // =========================================================================
  5513  func crc32_combine_(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off64_t) ULong { /* crc32.c:372:13: */
  5514  	bp := tls.Alloc(512)
  5515  	defer tls.Free(512)
  5516  
  5517  	var n int32
  5518  	var row uint64
  5519  	// var even [32]uint64 at bp+256, 256
  5520  	// even-power-of-two zeros operator
  5521  	// var odd [32]uint64 at bp, 256
  5522  	// odd-power-of-two zeros operator
  5523  
  5524  	// degenerate case (also disallow negative lengths)
  5525  	if len2 <= int64(0) {
  5526  		return crc1
  5527  	}
  5528  
  5529  	// put operator for one zero bit in odd
  5530  	*(*uint64)(unsafe.Pointer(bp /* &odd[0] */)) = 0xedb88320 // CRC-32 polynomial
  5531  	row = uint64(1)
  5532  	for n = 1; n < GF2_DIM; n++ {
  5533  		*(*uint64)(unsafe.Pointer(bp /* &odd[0] */ + uintptr(n)*8)) = row
  5534  		row <<= 1
  5535  	}
  5536  
  5537  	// put operator for two zero bits in even
  5538  	gf2_matrix_square(tls, bp+256 /* &even[0] */, bp /* &odd[0] */)
  5539  
  5540  	// put operator for four zero bits in odd
  5541  	gf2_matrix_square(tls, bp /* &odd[0] */, bp+256 /* &even[0] */)
  5542  
  5543  	// apply len2 zeros to crc1 (first square will put the operator for one
  5544  	//        zero byte, eight zero bits, in even)
  5545  	for ok := true; ok; ok = (len2 != int64(0)) {
  5546  		// apply zeros operator for this bit of len2
  5547  		gf2_matrix_square(tls, bp+256 /* &even[0] */, bp /* &odd[0] */)
  5548  		if (len2 & int64(1)) != 0 {
  5549  			crc1 = gf2_matrix_times(tls, bp+256 /* &even[0] */, crc1)
  5550  		}
  5551  		len2 >>= 1
  5552  
  5553  		// if no more bits set, then done
  5554  		if len2 == int64(0) {
  5555  			break
  5556  		}
  5557  
  5558  		// another iteration of the loop with odd and even swapped
  5559  		gf2_matrix_square(tls, bp /* &odd[0] */, bp+256 /* &even[0] */)
  5560  		if (len2 & int64(1)) != 0 {
  5561  			crc1 = gf2_matrix_times(tls, bp /* &odd[0] */, crc1)
  5562  		}
  5563  		len2 >>= 1
  5564  
  5565  		// if no more bits set, then done
  5566  	}
  5567  
  5568  	// return combined crc
  5569  	crc1 = crc1 ^ (crc2)
  5570  	return crc1
  5571  }
  5572  
  5573  // =========================================================================
  5574  func Xcrc32_combine(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off_t) ULong { /* crc32.c:428:15: */
  5575  	return crc32_combine_(tls, crc1, crc2, len2)
  5576  }
  5577  
  5578  func Xcrc32_combine64(tls *libc.TLS, crc1 ULong, crc2 ULong, len2 Off64_t) ULong { /* crc32.c:436:15: */
  5579  	return crc32_combine_(tls, crc1, crc2, len2)
  5580  }
  5581  
  5582  // Reverse the bytes in a 32-bit value
  5583  
  5584  // define NO_GZIP when compiling if you want to disable gzip header and
  5585  //    trailer creation by deflate().  NO_GZIP would be used to avoid linking in
  5586  //    the crc code when it is not needed.  For shared libraries, gzip encoding
  5587  //    should be left enabled.
  5588  
  5589  // ===========================================================================
  5590  // Internal compression state.
  5591  
  5592  // number of length codes, not counting the special END_BLOCK code
  5593  
  5594  // number of literal bytes 0..255
  5595  
  5596  // number of Literal or Length codes, including the END_BLOCK code
  5597  
  5598  // number of distance codes
  5599  
  5600  // number of codes used to transfer the bit lengths
  5601  
  5602  // maximum heap size
  5603  
  5604  // All codes must not exceed MAX_BITS bits
  5605  
  5606  // size of bit buffer in bi_buf
  5607  
  5608  // Stream status
  5609  
  5610  // Data structure describing a single value and its code string.
  5611  type Ct_data_s = struct {
  5612  	Ffc struct{ Ffreq Ush }
  5613  	Fdl struct{ Fdad Ush }
  5614  } /* zlib.h:84:1 */
  5615  
  5616  // Reverse the bytes in a 32-bit value
  5617  
  5618  // define NO_GZIP when compiling if you want to disable gzip header and
  5619  //    trailer creation by deflate().  NO_GZIP would be used to avoid linking in
  5620  //    the crc code when it is not needed.  For shared libraries, gzip encoding
  5621  //    should be left enabled.
  5622  
  5623  // ===========================================================================
  5624  // Internal compression state.
  5625  
  5626  // number of length codes, not counting the special END_BLOCK code
  5627  
  5628  // number of literal bytes 0..255
  5629  
  5630  // number of Literal or Length codes, including the END_BLOCK code
  5631  
  5632  // number of distance codes
  5633  
  5634  // number of codes used to transfer the bit lengths
  5635  
  5636  // maximum heap size
  5637  
  5638  // All codes must not exceed MAX_BITS bits
  5639  
  5640  // size of bit buffer in bi_buf
  5641  
  5642  // Stream status
  5643  
  5644  // Data structure describing a single value and its code string.
  5645  type Ct_data = Ct_data_s /* deflate.h:77:7 */
  5646  
  5647  type Static_tree_desc_s = struct {
  5648  	Fstatic_tree uintptr
  5649  	Fextra_bits  uintptr
  5650  	Fextra_base  int32
  5651  	Felems       int32
  5652  	Fmax_length  int32
  5653  	_            [4]byte
  5654  } /* deflate.h:84:9 */
  5655  
  5656  type Tree_desc_s = struct {
  5657  	Fdyn_tree  uintptr
  5658  	Fmax_code  int32
  5659  	_          [4]byte
  5660  	Fstat_desc uintptr
  5661  } /* zlib.h:84:1 */
  5662  
  5663  type Tree_desc = Tree_desc_s /* deflate.h:90:7 */
  5664  
  5665  type Pos = Ush     /* deflate.h:92:13 */
  5666  type Posf = Pos    /* deflate.h:93:17 */
  5667  type IPos = uint32 /* deflate.h:94:18 */
  5668  
  5669  // A Pos is an index in the character window. We use short instead of int to
  5670  // save space in the various tables. IPos is used only for parameter passing.
  5671  
  5672  type Deflate_state = Internal_state /* deflate.h:276:7 */
  5673  
  5674  var Xdeflate_copyright = *(*[69]int8)(unsafe.Pointer(ts + 7 /* " deflate 1.2.11 ..." */)) /* deflate.c:54:12 */
  5675  //
  5676  //   If you use the zlib library in a product, an acknowledgment is welcome
  5677  //   in the documentation of your product. If for some reason you cannot
  5678  //   include such an acknowledgment, I would appreciate that you keep this
  5679  //   copyright string in the executable of your product.
  5680  //
  5681  
  5682  // ===========================================================================
  5683  //  Function prototypes.
  5684  type Block_state = uint32 /* deflate.c:71:3 */
  5685  
  5686  type Compress_func = uintptr /* deflate.c:73:21 */
  5687  
  5688  // ===========================================================================
  5689  // Local data
  5690  
  5691  // Tail of hash chains
  5692  
  5693  // Matches of length 3 are discarded if their distance exceeds TOO_FAR
  5694  
  5695  // Values for max_lazy_match, good_match and max_chain_length, depending on
  5696  // the desired pack level (0..9). The values given below have been tuned to
  5697  // exclude worst case performance for pathological files. Better values may be
  5698  // found for specific files.
  5699  type Config_s = struct {
  5700  	Fgood_length Ush
  5701  	Fmax_lazy    Ush
  5702  	Fnice_length Ush
  5703  	Fmax_chain   Ush
  5704  	Ffunc        Compress_func
  5705  } /* deflate.c:120:9 */
  5706  
  5707  // ===========================================================================
  5708  // Local data
  5709  
  5710  // Tail of hash chains
  5711  
  5712  // Matches of length 3 are discarded if their distance exceeds TOO_FAR
  5713  
  5714  // Values for max_lazy_match, good_match and max_chain_length, depending on
  5715  // the desired pack level (0..9). The values given below have been tuned to
  5716  // exclude worst case performance for pathological files. Better values may be
  5717  // found for specific files.
  5718  type Config = Config_s /* deflate.c:126:3 */
  5719  
  5720  var configuration_table = [10]Config{
  5721  	//      good lazy nice chain
  5722  	/* 0 */ {Ffunc: 0}, // store only
  5723  	/* 1 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(8), Fmax_chain: Ush(4), Ffunc: 0}, // max speed, no lazy matches
  5724  	/* 2 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(5), Fnice_length: Ush(16), Fmax_chain: Ush(8), Ffunc: 0},
  5725  	/* 3 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(6), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0},
  5726  
  5727  	/* 4 */ {Fgood_length: Ush(4), Fmax_lazy: Ush(4), Fnice_length: Ush(16), Fmax_chain: Ush(16), Ffunc: 0}, // lazy matches
  5728  	/* 5 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(32), Fmax_chain: Ush(32), Ffunc: 0},
  5729  	/* 6 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(16), Fnice_length: Ush(128), Fmax_chain: Ush(128), Ffunc: 0},
  5730  	/* 7 */ {Fgood_length: Ush(8), Fmax_lazy: Ush(32), Fnice_length: Ush(128), Fmax_chain: Ush(256), Ffunc: 0},
  5731  	/* 8 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(128), Fnice_length: Ush(258), Fmax_chain: Ush(1024), Ffunc: 0},
  5732  	/* 9 */ {Fgood_length: Ush(32), Fmax_lazy: Ush(258), Fnice_length: Ush(258), Fmax_chain: Ush(4096), Ffunc: 0}} /* deflate.c:134:20 */
  5733  
  5734  // max compression
  5735  
  5736  // Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
  5737  // For deflate_fast() (levels <= 3) good is ignored and lazy has a different
  5738  // meaning.
  5739  
  5740  // rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH
  5741  
  5742  // ===========================================================================
  5743  // Update a hash value with the given input byte
  5744  // IN  assertion: all calls to UPDATE_HASH are made with consecutive input
  5745  //    characters, so that a running hash key can be computed from the previous
  5746  //    key instead of complete recalculation each time.
  5747  
  5748  // ===========================================================================
  5749  // Insert string str in the dictionary and set match_head to the previous head
  5750  // of the hash chain (the most recent string with same hash key). Return
  5751  // the previous length of the hash chain.
  5752  // If this file is compiled with -DFASTEST, the compression level is forced
  5753  // to 1, and no hash chains are maintained.
  5754  // IN  assertion: all calls to INSERT_STRING are made with consecutive input
  5755  //    characters and the first MIN_MATCH bytes of str are valid (except for
  5756  //    the last MIN_MATCH-1 bytes of the input file).
  5757  
  5758  // ===========================================================================
  5759  // Initialize the hash table (avoiding 64K overflow for 16 bit systems).
  5760  // prev[] will be initialized on the fly.
  5761  
  5762  // ===========================================================================
  5763  // Slide the hash table when sliding the window down (could be avoided with 32
  5764  // bit values at the expense of memory usage). We slide even when level == 0 to
  5765  // keep the hash table consistent if we switch back to level > 0 later.
  5766  func slide_hash(tls *libc.TLS, s uintptr) { /* deflate.c:201:12: */
  5767  	var n uint32
  5768  	var m uint32
  5769  	var p uintptr
  5770  	var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5771  
  5772  	n = (*Deflate_state)(unsafe.Pointer(s)).Fhash_size
  5773  	p = ((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2)
  5774  	for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
  5775  		m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2))))
  5776  		*(*Posf)(unsafe.Pointer(p)) = func() uint16 {
  5777  			if m >= wsize {
  5778  				return (uint16(m - wsize))
  5779  			}
  5780  			return uint16(NIL)
  5781  		}()
  5782  	}
  5783  	n = wsize
  5784  	p = ((*Deflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2)
  5785  	for ok1 := true; ok1; ok1 = libc.PreDecUint32(&n, 1) != 0 {
  5786  		m = uint32(*(*Posf)(unsafe.Pointer(libc.PreDecUintptr(&p, 2))))
  5787  		*(*Posf)(unsafe.Pointer(p)) = func() uint16 {
  5788  			if m >= wsize {
  5789  				return (uint16(m - wsize))
  5790  			}
  5791  			return uint16(NIL)
  5792  		}()
  5793  		// If n is not on any hash chain, prev[n] is garbage but
  5794  		// its value will never be used.
  5795  	}
  5796  }
  5797  
  5798  // =========================================================================
  5799  func XdeflateInit_(tls *libc.TLS, strm Z_streamp, level int32, version uintptr, stream_size int32) int32 { /* deflate.c:228:13: */
  5800  	return XdeflateInit2_(tls, strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
  5801  		Z_DEFAULT_STRATEGY, version, stream_size)
  5802  	// To do: ignore strm->next_in if we use it as window
  5803  }
  5804  
  5805  // =========================================================================
  5806  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: */
  5807  	var s uintptr
  5808  	var wrap int32 = 1
  5809  	var overlay uintptr
  5810  	// We overlay pending_buf and d_buf+l_buf. This works since the average
  5811  	// output size for (length,distance) codes is <= 24 bits.
  5812  
  5813  	if ((version == uintptr(Z_NULL)) || (int32(*(*int8)(unsafe.Pointer(version))) != int32(my_version[0]))) || (uint64(stream_size) != uint64(unsafe.Sizeof(Z_stream{}))) {
  5814  		return -6
  5815  	}
  5816  	if strm == uintptr(Z_NULL) {
  5817  		return -2
  5818  	}
  5819  
  5820  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
  5821  	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
  5822  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
  5823  			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
  5824  		}{Xzcalloc}))
  5825  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
  5826  	}
  5827  	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
  5828  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
  5829  			f func(*libc.TLS, Voidpf, Voidpf)
  5830  		}{Xzcfree}))
  5831  	}
  5832  
  5833  	if level == (-1) {
  5834  		level = 6
  5835  	}
  5836  
  5837  	if windowBits < 0 { // suppress zlib wrapper
  5838  		wrap = 0
  5839  		windowBits = -windowBits
  5840  	} else if windowBits > 15 {
  5841  		wrap = 2 // write gzip wrapper instead
  5842  		windowBits = windowBits - (16)
  5843  	}
  5844  	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)) {
  5845  		return -2
  5846  	}
  5847  	if windowBits == 8 {
  5848  		windowBits = 9
  5849  	} // until 256-byte window bug fixed
  5850  	s = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((strm + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Deflate_state{})))
  5851  	if s == uintptr(Z_NULL) {
  5852  		return -4
  5853  	}
  5854  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = s
  5855  	(*Deflate_state)(unsafe.Pointer(s)).Fstrm = strm
  5856  	(*Deflate_state)(unsafe.Pointer(s)).Fstatus = INIT_STATE // to pass state test in deflateReset()
  5857  
  5858  	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap
  5859  	(*Deflate_state)(unsafe.Pointer(s)).Fgzhead = Gz_headerp(Z_NULL)
  5860  	(*Deflate_state)(unsafe.Pointer(s)).Fw_bits = UInt(windowBits)
  5861  	(*Deflate_state)(unsafe.Pointer(s)).Fw_size = (UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fw_bits))
  5862  	(*Deflate_state)(unsafe.Pointer(s)).Fw_mask = ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - UInt(1))
  5863  
  5864  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_bits = (UInt(memLevel) + UInt(7))
  5865  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_size = (UInt(int32(1) << (*Deflate_state)(unsafe.Pointer(s)).Fhash_bits))
  5866  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_mask = ((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1))
  5867  	(*Deflate_state)(unsafe.Pointer(s)).Fhash_shift = ((((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits + UInt(MIN_MATCH)) - UInt(1)) / UInt(MIN_MATCH))
  5868  
  5869  	(*Deflate_state)(unsafe.Pointer(s)).Fwindow = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((strm + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fw_size, (uint32(uint64(2) * uint64(unsafe.Sizeof(Byte(0))))))
  5870  	(*Deflate_state)(unsafe.Pointer(s)).Fprev = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((strm + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fw_size, uint32(unsafe.Sizeof(Pos(0))))
  5871  	(*Deflate_state)(unsafe.Pointer(s)).Fhead = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((strm + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Fhash_size, uint32(unsafe.Sizeof(Pos(0))))
  5872  
  5873  	(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = uint64(0) // nothing written to s->window yet
  5874  
  5875  	(*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize = (UInt(int32(1) << (memLevel + 6))) // 16K elements by default
  5876  
  5877  	overlay = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((strm + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize, (uint32(uint64(unsafe.Sizeof(Ush(0))) + uint64(2))))
  5878  	(*Deflate_state)(unsafe.Pointer(s)).Fpending_buf = overlay
  5879  	(*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size = (Ulg((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize) * (uint64(unsafe.Sizeof(Ush(0))) + uint64(2)))
  5880  
  5881  	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)) {
  5882  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE
  5883  		(*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-4))]
  5884  		XdeflateEnd(tls, strm)
  5885  		return -4
  5886  	}
  5887  	(*Deflate_state)(unsafe.Pointer(s)).Fd_buf = (overlay + uintptr((uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0)))))*2)
  5888  	(*Deflate_state)(unsafe.Pointer(s)).Fl_buf = ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((uint64(1) + uint64(unsafe.Sizeof(Ush(0)))) * uint64((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize))))
  5889  
  5890  	(*Deflate_state)(unsafe.Pointer(s)).Flevel = level
  5891  	(*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy
  5892  	(*Deflate_state)(unsafe.Pointer(s)).Fmethod = Byte(method)
  5893  
  5894  	return XdeflateReset(tls, strm)
  5895  }
  5896  
  5897  var my_version = *(*[7]int8)(unsafe.Pointer(ts /* "1.2.11" */)) /* deflate.c:253:23 */
  5898  
  5899  // =========================================================================
  5900  // Check for a valid deflate stream state. Return 0 if ok, 1 if not.
  5901  func deflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:353:11: */
  5902  	var s uintptr
  5903  	if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) {
  5904  		return 1
  5905  	}
  5906  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  5907  	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)) {
  5908  		return 1
  5909  	}
  5910  	return 0
  5911  }
  5912  
  5913  // =========================================================================
  5914  func XdeflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* deflate.c:376:13: */
  5915  	var s uintptr
  5916  	var str UInt
  5917  	var n UInt
  5918  	var wrap int32
  5919  	var avail uint32
  5920  	var next uintptr
  5921  
  5922  	if (deflateStateCheck(tls, strm) != 0) || (dictionary == uintptr(Z_NULL)) {
  5923  		return -2
  5924  	}
  5925  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  5926  	wrap = (*Deflate_state)(unsafe.Pointer(s)).Fwrap
  5927  	if ((wrap == 2) || ((wrap == 1) && ((*Deflate_state)(unsafe.Pointer(s)).Fstatus != INIT_STATE))) || ((*Deflate_state)(unsafe.Pointer(s)).Flookahead != 0) {
  5928  		return -2
  5929  	}
  5930  
  5931  	// when using zlib wrappers, compute Adler-32 for provided dictionary
  5932  	if wrap == 1 {
  5933  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength)
  5934  	}
  5935  	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = 0 // avoid computing Adler-32 in read_buf
  5936  
  5937  	// if dictionary would fill window, just replace the history
  5938  	if dictLength >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
  5939  		if wrap == 0 { // already empty otherwise
  5940  			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL)
  5941  			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (uint64(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1))) * uint64(unsafe.Sizeof(Posf(0)))))
  5942  
  5943  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
  5944  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
  5945  			(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  5946  		}
  5947  		dictionary += (uintptr(dictLength - (*Deflate_state)(unsafe.Pointer(s)).Fw_size)) // use the tail
  5948  		dictLength = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5949  	}
  5950  
  5951  	// insert dictionary into window and hash
  5952  	avail = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  5953  	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
  5954  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = dictLength
  5955  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary
  5956  	fill_window(tls, s)
  5957  	for (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
  5958  		str = (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
  5959  		n = ((*Deflate_state)(unsafe.Pointer(s)).Flookahead - (UInt(MIN_MATCH - 1)))
  5960  		for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
  5961  			(*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)
  5962  			*(*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))
  5963  			*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str)
  5964  			str++
  5965  		}
  5966  		(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = str
  5967  		(*Deflate_state)(unsafe.Pointer(s)).Flookahead = (UInt(MIN_MATCH - 1))
  5968  		fill_window(tls, s)
  5969  	}
  5970  	*(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Flookahead)
  5971  	(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  5972  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  5973  	(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0)
  5974  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+184 /* &.prev_length */, (UInt(MIN_MATCH - 1)))
  5975  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  5976  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
  5977  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = avail
  5978  	(*Deflate_state)(unsafe.Pointer(s)).Fwrap = wrap
  5979  	return Z_OK
  5980  }
  5981  
  5982  // =========================================================================
  5983  func XdeflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* deflate.c:445:13: */
  5984  	var s uintptr
  5985  	var len UInt
  5986  
  5987  	if deflateStateCheck(tls, strm) != 0 {
  5988  		return -2
  5989  	}
  5990  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  5991  	len = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead)
  5992  	if len > (*Deflate_state)(unsafe.Pointer(s)).Fw_size {
  5993  		len = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  5994  	}
  5995  	if (dictionary != uintptr(Z_NULL)) && (len != 0) {
  5996  		libc.Xmemcpy(tls, dictionary, ((((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flookahead)) - uintptr(len)), uint64(len))
  5997  	}
  5998  	if dictLength != uintptr(Z_NULL) {
  5999  		*(*UInt)(unsafe.Pointer(dictLength)) = len
  6000  	}
  6001  	return Z_OK
  6002  }
  6003  
  6004  // =========================================================================
  6005  func XdeflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:467:13: */
  6006  	var s uintptr
  6007  
  6008  	if deflateStateCheck(tls, strm) != 0 {
  6009  		return -2
  6010  	}
  6011  
  6012  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint64(strm+40 /* &.total_out */, uint64(0))
  6013  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // use zfree if we ever allocate msg dynamically
  6014  	(*Z_stream)(unsafe.Pointer(strm)).Fdata_type = Z_UNKNOWN
  6015  
  6016  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  6017  	(*Deflate_state)(unsafe.Pointer(s)).Fpending = uint64(0)
  6018  	(*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf
  6019  
  6020  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap < 0 {
  6021  		(*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap // was made negative by deflate(..., Z_FINISH);
  6022  	}
  6023  	(*Deflate_state)(unsafe.Pointer(s)).Fstatus = func() int32 {
  6024  		if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
  6025  			return GZIP_STATE
  6026  		}
  6027  		return func() int32 {
  6028  			if (*Deflate_state)(unsafe.Pointer(s)).Fwrap != 0 {
  6029  				return INIT_STATE
  6030  			}
  6031  			return BUSY_STATE
  6032  		}()
  6033  	}()
  6034  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = func() uint64 {
  6035  		if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
  6036  			return Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0))
  6037  		}
  6038  		return Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))
  6039  	}()
  6040  	(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = Z_NO_FLUSH
  6041  
  6042  	X_tr_init(tls, s)
  6043  
  6044  	return Z_OK
  6045  }
  6046  
  6047  // =========================================================================
  6048  func XdeflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:505:13: */
  6049  	var ret int32
  6050  
  6051  	ret = XdeflateResetKeep(tls, strm)
  6052  	if ret == Z_OK {
  6053  		lm_init(tls, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
  6054  	}
  6055  	return ret
  6056  }
  6057  
  6058  // =========================================================================
  6059  func XdeflateSetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* deflate.c:517:13: */
  6060  	if (deflateStateCheck(tls, strm) != 0) || ((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != 2) {
  6061  		return -2
  6062  	}
  6063  	(*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head
  6064  	return Z_OK
  6065  }
  6066  
  6067  // =========================================================================
  6068  func XdeflatePending(tls *libc.TLS, strm Z_streamp, pending uintptr, bits uintptr) int32 { /* deflate.c:528:13: */
  6069  	if deflateStateCheck(tls, strm) != 0 {
  6070  		return -2
  6071  	}
  6072  	if pending != uintptr(Z_NULL) {
  6073  		*(*uint32)(unsafe.Pointer(pending)) = uint32((*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending)
  6074  	}
  6075  	if bits != uintptr(Z_NULL) {
  6076  		*(*int32)(unsafe.Pointer(bits)) = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid
  6077  	}
  6078  	return Z_OK
  6079  }
  6080  
  6081  // =========================================================================
  6082  func XdeflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* deflate.c:542:13: */
  6083  	var s uintptr
  6084  	var put int32
  6085  
  6086  	if deflateStateCheck(tls, strm) != 0 {
  6087  		return -2
  6088  	}
  6089  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  6090  	if ((*Deflate_state)(unsafe.Pointer(s)).Fd_buf) < ((*Deflate_state)(unsafe.Pointer(s)).Fpending_out + uintptr((int32((Buf_size + 7)) >> 3))) {
  6091  		return -5
  6092  	}
  6093  	for ok := true; ok; ok = bits != 0 {
  6094  		put = (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)
  6095  		if put > bits {
  6096  			put = bits
  6097  		}
  6098  		*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((value & ((int32(1) << put) - 1)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))))
  6099  		*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (put)
  6100  		X_tr_flush_bits(tls, s)
  6101  		value >>= put
  6102  		bits = bits - (put)
  6103  	}
  6104  	return Z_OK
  6105  }
  6106  
  6107  // =========================================================================
  6108  func XdeflateParams(tls *libc.TLS, strm Z_streamp, level int32, strategy int32) int32 { /* deflate.c:568:13: */
  6109  	var s uintptr
  6110  	var func1 Compress_func
  6111  
  6112  	if deflateStateCheck(tls, strm) != 0 {
  6113  		return -2
  6114  	}
  6115  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  6116  
  6117  	if level == (-1) {
  6118  		level = 6
  6119  	}
  6120  	if (((level < 0) || (level > 9)) || (strategy < 0)) || (strategy > Z_FIXED) {
  6121  		return -2
  6122  	}
  6123  	func1 = configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Ffunc
  6124  
  6125  	if ((strategy != (*Deflate_state)(unsafe.Pointer(s)).Fstrategy) || (func1 != configuration_table[level].Ffunc)) && ((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water != 0) {
  6126  		// Flush the last buffer:
  6127  		var err int32 = Xdeflate(tls, strm, Z_BLOCK)
  6128  		if err == (-2) {
  6129  			return err
  6130  		}
  6131  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  6132  			return -5
  6133  		}
  6134  	}
  6135  	if (*Deflate_state)(unsafe.Pointer(s)).Flevel != level {
  6136  		if ((*Deflate_state)(unsafe.Pointer(s)).Flevel == 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fmatches != UInt(0)) {
  6137  			if (*Deflate_state)(unsafe.Pointer(s)).Fmatches == UInt(1) {
  6138  				slide_hash(tls, s)
  6139  			} else {
  6140  				*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL)
  6141  			}
  6142  			libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (uint64(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1))) * uint64(unsafe.Sizeof(Posf(0)))))
  6143  
  6144  			(*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(0)
  6145  		}
  6146  		(*Deflate_state)(unsafe.Pointer(s)).Flevel = level
  6147  		(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[level].Fmax_lazy)
  6148  		(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[level].Fgood_length)
  6149  		(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[level].Fnice_length)
  6150  		(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[level].Fmax_chain)
  6151  	}
  6152  	(*Deflate_state)(unsafe.Pointer(s)).Fstrategy = strategy
  6153  	return Z_OK
  6154  }
  6155  
  6156  // =========================================================================
  6157  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: */
  6158  	var s uintptr
  6159  
  6160  	if deflateStateCheck(tls, strm) != 0 {
  6161  		return -2
  6162  	}
  6163  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  6164  	(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(good_length)
  6165  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(max_lazy)
  6166  	(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length
  6167  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(max_chain)
  6168  	return Z_OK
  6169  }
  6170  
  6171  // =========================================================================
  6172  // For the default windowBits of 15 and memLevel of 8, this function returns
  6173  // a close to exact, as well as small, upper bound on the compressed size.
  6174  // They are coded as constants here for a reason--if the #define's are
  6175  // changed, then this function needs to be changed as well.  The return
  6176  // value for 15 and 8 only works for those exact settings.
  6177  //
  6178  // For any setting other than those defaults for windowBits and memLevel,
  6179  // the value returned is a conservative worst case for the maximum expansion
  6180  // resulting from using fixed blocks instead of stored blocks, which deflate
  6181  // can emit on compressed data for some combinations of the parameters.
  6182  //
  6183  // This function could be more sophisticated to provide closer upper bounds for
  6184  // every combination of windowBits and memLevel.  But even the conservative
  6185  // upper bound of about 14% expansion does not seem onerous for output buffer
  6186  // allocation.
  6187  func XdeflateBound(tls *libc.TLS, strm Z_streamp, sourceLen ULong) ULong { /* deflate.c:652:15: */
  6188  	var s uintptr
  6189  	var complen ULong
  6190  	var wraplen ULong
  6191  
  6192  	// conservative upper bound for compressed data
  6193  	complen = (((sourceLen + ((sourceLen + uint64(7)) >> 3)) + ((sourceLen + uint64(63)) >> 6)) + uint64(5))
  6194  
  6195  	// if can't get parameters, return conservative bound plus zlib wrapper
  6196  	if deflateStateCheck(tls, strm) != 0 {
  6197  		return (complen + uint64(6))
  6198  	}
  6199  
  6200  	// compute wrapper length
  6201  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  6202  	switch (*Deflate_state)(unsafe.Pointer(s)).Fwrap {
  6203  	case 0: // raw deflate
  6204  		wraplen = uint64(0)
  6205  		break
  6206  	case 1: // zlib wrapper
  6207  		wraplen = (ULong(6 + (func() int32 {
  6208  			if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != 0 {
  6209  				return 4
  6210  			}
  6211  			return 0
  6212  		}())))
  6213  		break
  6214  	case 2: // gzip wrapper
  6215  		wraplen = uint64(18)
  6216  		if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(Z_NULL) { // user-supplied gzip header
  6217  			var str uintptr
  6218  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
  6219  				wraplen = wraplen + (ULong(UInt(2) + (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len))
  6220  			}
  6221  			str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname
  6222  			if str != uintptr(Z_NULL) {
  6223  				for ok := true; ok; ok = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 {
  6224  					wraplen++
  6225  				}
  6226  			}
  6227  			str = (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment
  6228  			if str != uintptr(Z_NULL) {
  6229  				for ok1 := true; ok1; ok1 = *(*Bytef)(unsafe.Pointer(libc.PostIncUintptr(&str, 1))) != 0 {
  6230  					wraplen++
  6231  				}
  6232  			}
  6233  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  6234  				wraplen = wraplen + (uint64(2))
  6235  			}
  6236  		}
  6237  		break
  6238  	default: // for compiler happiness
  6239  		wraplen = uint64(6)
  6240  	}
  6241  
  6242  	// if not default parameters, return conservative bound
  6243  	if ((*Deflate_state)(unsafe.Pointer(s)).Fw_bits != UInt(15)) || ((*Deflate_state)(unsafe.Pointer(s)).Fhash_bits != (UInt(8 + 7))) {
  6244  		return (complen + wraplen)
  6245  	}
  6246  
  6247  	// default settings: return tight bound for that case
  6248  	return ((((((sourceLen + (sourceLen >> 12)) + (sourceLen >> 14)) + (sourceLen >> 25)) + uint64(13)) - uint64(6)) + wraplen)
  6249  }
  6250  
  6251  // =========================================================================
  6252  // Put a short in the pending buffer. The 16-bit value is put in MSB order.
  6253  // IN assertion: the stream state is correct and there is enough room in
  6254  // pending_buf.
  6255  func putShortMSB(tls *libc.TLS, s uintptr, b UInt) { /* deflate.c:716:12: */
  6256  	{
  6257  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(b >> 8))
  6258  	}
  6259  
  6260  	{
  6261  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(b & UInt(0xff)))
  6262  	}
  6263  
  6264  }
  6265  
  6266  // =========================================================================
  6267  // Flush as much pending output as possible. All deflate() output, except for
  6268  // some deflate_stored() output, goes through this function so some
  6269  // applications may wish to modify it to avoid allocating a large
  6270  // strm->next_out buffer and copying into it. (See also read_buf()).
  6271  func flush_pending(tls *libc.TLS, strm Z_streamp) { /* deflate.c:730:12: */
  6272  	var len uint32
  6273  	var s uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  6274  
  6275  	X_tr_flush_bits(tls, s)
  6276  	len = uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending)
  6277  	if len > (*Z_stream)(unsafe.Pointer(strm)).Favail_out {
  6278  		len = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  6279  	}
  6280  	if len == uint32(0) {
  6281  		return
  6282  	}
  6283  
  6284  	libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (*Deflate_state)(unsafe.Pointer(s)).Fpending_out, uint64(len))
  6285  	*(*uintptr)(unsafe.Pointer(strm + 24 /* &.next_out */)) += (uintptr(len))
  6286  	*(*uintptr)(unsafe.Pointer(s + 32 /* &.pending_out */)) += (uintptr(len))
  6287  	*(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(len))
  6288  	*(*UInt)(unsafe.Pointer(strm + 32 /* &.avail_out */)) -= (len)
  6289  	*(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) -= (Ulg(len))
  6290  	if (*Deflate_state)(unsafe.Pointer(s)).Fpending == uint64(0) {
  6291  		(*Deflate_state)(unsafe.Pointer(s)).Fpending_out = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf
  6292  	}
  6293  }
  6294  
  6295  // ===========================================================================
  6296  // Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1].
  6297  
  6298  // =========================================================================
  6299  func Xdeflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* deflate.c:763:13: */
  6300  	var old_flush int32 // value of flush param for previous deflate call
  6301  	var s uintptr
  6302  
  6303  	if ((deflateStateCheck(tls, strm) != 0) || (flush > Z_BLOCK)) || (flush < 0) {
  6304  		return -2
  6305  	}
  6306  	s = (*Z_stream)(unsafe.Pointer(strm)).Fstate
  6307  
  6308  	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)) {
  6309  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-2))]; return -2 }()
  6310  	}
  6311  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  6312  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }()
  6313  	}
  6314  
  6315  	old_flush = (*Deflate_state)(unsafe.Pointer(s)).Flast_flush
  6316  	(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = flush
  6317  
  6318  	// Flush as much pending output as possible
  6319  	if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) {
  6320  		flush_pending(tls, strm)
  6321  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  6322  			// Since avail_out is 0, deflate will be called again with
  6323  			// more output space, but possibly with both pending and
  6324  			// avail_in equal to zero. There won't be anything to do,
  6325  			// but this is not an error situation so make sure we
  6326  			// return OK instead of BUF_ERROR at next call of deflate:
  6327  			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  6328  			return Z_OK
  6329  		}
  6330  
  6331  		// Make sure there is something to do and avoid duplicate consecutive
  6332  		// flushes. For repeated and useless calls with Z_FINISH, we keep
  6333  		// returning Z_STREAM_END instead of Z_BUF_ERROR.
  6334  	} else if (((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && ((((flush) * 2) - (func() int32 {
  6335  		if (flush) > 4 {
  6336  			return 9
  6337  		}
  6338  		return 0
  6339  	}())) <= (((old_flush) * 2) - (func() int32 {
  6340  		if (old_flush) > 4 {
  6341  			return 9
  6342  		}
  6343  		return 0
  6344  	}())))) && (flush != Z_FINISH) {
  6345  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }()
  6346  	}
  6347  
  6348  	// User must not provide more input after the first FINISH:
  6349  	if ((*Deflate_state)(unsafe.Pointer(s)).Fstatus == FINISH_STATE) && ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != UInt(0)) {
  6350  		return func() int32 { (*Z_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[(Z_NEED_DICT - (-5))]; return -5 }()
  6351  	}
  6352  
  6353  	// Write the header
  6354  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == INIT_STATE {
  6355  		// zlib header
  6356  		var header UInt = ((UInt(Z_DEFLATED) + (((*Deflate_state)(unsafe.Pointer(s)).Fw_bits - UInt(8)) << 4)) << 8)
  6357  		var level_flags UInt
  6358  
  6359  		if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) {
  6360  			level_flags = UInt(0)
  6361  		} else if (*Deflate_state)(unsafe.Pointer(s)).Flevel < 6 {
  6362  			level_flags = UInt(1)
  6363  		} else if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 6 {
  6364  			level_flags = UInt(2)
  6365  		} else {
  6366  			level_flags = UInt(3)
  6367  		}
  6368  		header = header | (level_flags << 6)
  6369  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) {
  6370  			header = header | (UInt(PRESET_DICT))
  6371  		}
  6372  		header = header + (UInt(31) - (header % UInt(31)))
  6373  
  6374  		putShortMSB(tls, s, header)
  6375  
  6376  		// Save the adler32 of the preset dictionary:
  6377  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart != UInt(0) {
  6378  			putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16)))
  6379  			putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xffff))))
  6380  		}
  6381  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))
  6382  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE
  6383  
  6384  		// Compression must start with an empty pending buffer
  6385  		flush_pending(tls, strm)
  6386  		if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) {
  6387  			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  6388  			return Z_OK
  6389  		}
  6390  	}
  6391  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == GZIP_STATE {
  6392  		// gzip header
  6393  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0))
  6394  		{
  6395  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(31)
  6396  		}
  6397  
  6398  		{
  6399  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(139)
  6400  		}
  6401  
  6402  		{
  6403  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(8)
  6404  		}
  6405  
  6406  		if (*Deflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(Z_NULL) {
  6407  			{
  6408  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  6409  			}
  6410  
  6411  			{
  6412  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  6413  			}
  6414  
  6415  			{
  6416  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  6417  			}
  6418  
  6419  			{
  6420  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  6421  			}
  6422  
  6423  			{
  6424  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(0)
  6425  			}
  6426  
  6427  			{
  6428  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 {
  6429  					if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 {
  6430  						return uint8(2)
  6431  					}
  6432  					return func() uint8 {
  6433  						if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) {
  6434  							return uint8(4)
  6435  						}
  6436  						return uint8(0)
  6437  					}()
  6438  				}()
  6439  			}
  6440  
  6441  			{
  6442  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(OS_CODE)
  6443  			}
  6444  
  6445  			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE
  6446  
  6447  			// Compression must start with an empty pending buffer
  6448  			flush_pending(tls, strm)
  6449  			if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) {
  6450  				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  6451  				return Z_OK
  6452  			}
  6453  		} else {
  6454  			{
  6455  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef(((((func() int32 {
  6456  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 {
  6457  						return 1
  6458  					}
  6459  					return 0
  6460  				}()) + (func() int32 {
  6461  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  6462  						return 2
  6463  					}
  6464  					return 0
  6465  				}())) + (func() int32 {
  6466  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(Z_NULL) {
  6467  						return 0
  6468  					}
  6469  					return 4
  6470  				}())) + (func() int32 {
  6471  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(Z_NULL) {
  6472  						return 0
  6473  					}
  6474  					return 8
  6475  				}())) + (func() int32 {
  6476  					if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(Z_NULL) {
  6477  						return 0
  6478  					}
  6479  					return 16
  6480  				}())))
  6481  			}
  6482  
  6483  			{
  6484  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime & uint64(0xff)))
  6485  			}
  6486  
  6487  			{
  6488  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 8) & uint64(0xff)))
  6489  			}
  6490  
  6491  			{
  6492  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 16) & uint64(0xff)))
  6493  			}
  6494  
  6495  			{
  6496  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> 24) & uint64(0xff)))
  6497  			}
  6498  
  6499  			{
  6500  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = func() uint8 {
  6501  					if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 9 {
  6502  						return uint8(2)
  6503  					}
  6504  					return func() uint8 {
  6505  						if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy >= Z_HUFFMAN_ONLY) || ((*Deflate_state)(unsafe.Pointer(s)).Flevel < 2) {
  6506  							return uint8(4)
  6507  						}
  6508  						return uint8(0)
  6509  					}()
  6510  				}()
  6511  			}
  6512  
  6513  			{
  6514  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fos & 0xff))
  6515  			}
  6516  
  6517  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
  6518  				{
  6519  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len & UInt(0xff)))
  6520  				}
  6521  
  6522  				{
  6523  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Bytef(((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len >> 8) & UInt(0xff)))
  6524  				}
  6525  
  6526  			}
  6527  			if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  6528  				(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf,
  6529  					uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending))
  6530  			}
  6531  			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0)
  6532  			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = EXTRA_STATE
  6533  		}
  6534  	}
  6535  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == EXTRA_STATE {
  6536  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(Z_NULL) {
  6537  			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
  6538  			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))
  6539  			for ((*Deflate_state)(unsafe.Pointer(s)).Fpending + Ulg(left)) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  6540  				var copy UInt = (UInt((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fpending))
  6541  				libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)),
  6542  					((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex)), uint64(copy))
  6543  				(*Deflate_state)(unsafe.Pointer(s)).Fpending = (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size
  6544  				for ok := true; ok; ok = 0 != 0 {
  6545  					if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) {
  6546  						(*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))))
  6547  					}
  6548  				}
  6549  				*(*Ulg)(unsafe.Pointer(s + 64 /* &.gzindex */)) += (Ulg(copy))
  6550  				flush_pending(tls, strm)
  6551  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) {
  6552  					(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  6553  					return Z_OK
  6554  				}
  6555  				beg = uint64(0)
  6556  				left = left - (copy)
  6557  			}
  6558  			libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)),
  6559  				((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fgzindex)), uint64(left))
  6560  			*(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) += (Ulg(left))
  6561  			for ok1 := true; ok1; ok1 = 0 != 0 {
  6562  				if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) {
  6563  					(*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))))
  6564  				}
  6565  			}
  6566  			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0)
  6567  		}
  6568  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = NAME_STATE
  6569  	}
  6570  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == NAME_STATE {
  6571  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(Z_NULL) {
  6572  			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
  6573  			var val int32
  6574  			for ok2 := true; ok2; ok2 = (val != 0) {
  6575  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  6576  					for ok3 := true; ok3; ok3 = 0 != 0 {
  6577  						if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) {
  6578  							(*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))))
  6579  						}
  6580  					}
  6581  					flush_pending(tls, strm)
  6582  					if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) {
  6583  						(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  6584  						return Z_OK
  6585  					}
  6586  					beg = uint64(0)
  6587  				}
  6588  				val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1)))))
  6589  				{
  6590  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val)
  6591  				}
  6592  
  6593  			}
  6594  			for ok4 := true; ok4; ok4 = 0 != 0 {
  6595  				if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) {
  6596  					(*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))))
  6597  				}
  6598  			}
  6599  			(*Deflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0)
  6600  		}
  6601  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = COMMENT_STATE
  6602  	}
  6603  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == COMMENT_STATE {
  6604  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(Z_NULL) {
  6605  			var beg Ulg = (*Deflate_state)(unsafe.Pointer(s)).Fpending // start of bytes to update crc
  6606  			var val int32
  6607  			for ok5 := true; ok5; ok5 = (val != 0) {
  6608  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending == (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  6609  					for ok6 := true; ok6; ok6 = 0 != 0 {
  6610  						if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) {
  6611  							(*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))))
  6612  						}
  6613  					}
  6614  					flush_pending(tls, strm)
  6615  					if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) {
  6616  						(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  6617  						return Z_OK
  6618  					}
  6619  					beg = uint64(0)
  6620  				}
  6621  				val = int32(*(*Bytef)(unsafe.Pointer((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fgzindex, 1)))))
  6622  				{
  6623  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Bytef(val)
  6624  				}
  6625  
  6626  			}
  6627  			for ok7 := true; ok7; ok7 = 0 != 0 {
  6628  				if ((*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0) && ((*Deflate_state)(unsafe.Pointer(s)).Fpending > (beg)) {
  6629  					(*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))))
  6630  				}
  6631  			}
  6632  		}
  6633  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = HCRC_STATE
  6634  	}
  6635  	if (*Deflate_state)(unsafe.Pointer(s)).Fstatus == HCRC_STATE {
  6636  		if (*Gz_header)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 {
  6637  			if ((*Deflate_state)(unsafe.Pointer(s)).Fpending + uint64(2)) > (*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size {
  6638  				flush_pending(tls, strm)
  6639  				if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) {
  6640  					(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  6641  					return Z_OK
  6642  				}
  6643  			}
  6644  			{
  6645  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xff)))
  6646  			}
  6647  
  6648  			{
  6649  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8) & uint64(0xff)))
  6650  			}
  6651  
  6652  			(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0))
  6653  		}
  6654  		(*Deflate_state)(unsafe.Pointer(s)).Fstatus = BUSY_STATE
  6655  
  6656  		// Compression must start with an empty pending buffer
  6657  		flush_pending(tls, strm)
  6658  		if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) {
  6659  			(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1
  6660  			return Z_OK
  6661  		}
  6662  	}
  6663  
  6664  	// Start a new block or continue the current one.
  6665  	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)) {
  6666  		var bstate Block_state
  6667  
  6668  		if (*Deflate_state)(unsafe.Pointer(s)).Flevel == 0 {
  6669  			bstate = deflate_stored(tls, s, flush)
  6670  		} else {
  6671  			if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_HUFFMAN_ONLY {
  6672  				bstate = deflate_huff(tls, s, flush)
  6673  			} else {
  6674  				if (*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_RLE {
  6675  					bstate = deflate_rle(tls, s, flush)
  6676  				} else {
  6677  					bstate = (*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer((uintptr(unsafe.Pointer(&configuration_table)) + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flevel)*16 + 8 /* &.func */))))(tls, s, flush)
  6678  				}
  6679  			}
  6680  		}
  6681  
  6682  		if (bstate == Finish_started) || (bstate == Finish_done) {
  6683  			(*Deflate_state)(unsafe.Pointer(s)).Fstatus = FINISH_STATE
  6684  		}
  6685  		if (bstate == Need_more) || (bstate == Finish_started) {
  6686  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  6687  				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR next call, see above
  6688  			}
  6689  			return Z_OK
  6690  			// If flush != Z_NO_FLUSH && avail_out == 0, the next call
  6691  			// of deflate should use the same flush parameter to make sure
  6692  			// that the flush is complete. So we don't have to output an
  6693  			// empty block here, this will be done at next call. This also
  6694  			// ensures that for a very small output buffer, we emit at most
  6695  			// one empty block.
  6696  		}
  6697  		if bstate == Block_done {
  6698  			if flush == Z_PARTIAL_FLUSH {
  6699  				X_tr_align(tls, s)
  6700  			} else if flush != Z_BLOCK { // FULL_FLUSH or SYNC_FLUSH
  6701  				X_tr_stored_block(tls, s, uintptr(0), uint64(0), 0)
  6702  				// For a full flush, this empty block will be recognized
  6703  				// as a special marker by inflate_sync().
  6704  				if flush == Z_FULL_FLUSH {
  6705  					*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL)
  6706  					libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (uint64(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1))) * uint64(unsafe.Sizeof(Posf(0)))))
  6707  					// forget history
  6708  					if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  6709  						(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
  6710  						(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
  6711  						(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  6712  					}
  6713  				}
  6714  			}
  6715  			flush_pending(tls, strm)
  6716  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  6717  				(*Deflate_state)(unsafe.Pointer(s)).Flast_flush = -1 // avoid BUF_ERROR at next call, see above
  6718  				return Z_OK
  6719  			}
  6720  		}
  6721  	}
  6722  
  6723  	if flush != Z_FINISH {
  6724  		return Z_OK
  6725  	}
  6726  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap <= 0 {
  6727  		return Z_STREAM_END
  6728  	}
  6729  
  6730  	// Write the trailer
  6731  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap == 2 {
  6732  		{
  6733  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xff)))
  6734  		}
  6735  
  6736  		{
  6737  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 8) & uint64(0xff)))
  6738  		}
  6739  
  6740  		{
  6741  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16) & uint64(0xff)))
  6742  		}
  6743  
  6744  		{
  6745  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 24) & uint64(0xff)))
  6746  		}
  6747  
  6748  		{
  6749  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in & uint64(0xff)))
  6750  		}
  6751  
  6752  		{
  6753  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 8) & uint64(0xff)))
  6754  		}
  6755  
  6756  		{
  6757  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 16) & uint64(0xff)))
  6758  		}
  6759  
  6760  		{
  6761  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Byte(((*Z_stream)(unsafe.Pointer(strm)).Ftotal_in >> 24) & uint64(0xff)))
  6762  		}
  6763  
  6764  	} else {
  6765  		putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler >> 16)))
  6766  		putShortMSB(tls, s, (UInt((*Z_stream)(unsafe.Pointer(strm)).Fadler & uint64(0xffff))))
  6767  	}
  6768  	flush_pending(tls, strm)
  6769  	// If avail_out is zero, the application will call deflate again
  6770  	// to flush the rest.
  6771  	if (*Deflate_state)(unsafe.Pointer(s)).Fwrap > 0 {
  6772  		(*Deflate_state)(unsafe.Pointer(s)).Fwrap = -(*Deflate_state)(unsafe.Pointer(s)).Fwrap
  6773  	} // write the trailer only once!
  6774  	if (*Deflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) {
  6775  		return Z_OK
  6776  	}
  6777  	return Z_STREAM_END
  6778  }
  6779  
  6780  // =========================================================================
  6781  func XdeflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* deflate.c:1076:13: */
  6782  	var status int32
  6783  
  6784  	if deflateStateCheck(tls, strm) != 0 {
  6785  		return -2
  6786  	}
  6787  
  6788  	status = (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus
  6789  
  6790  	/* Deallocate in reverse order of allocations: */
  6791  	{
  6792  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 {
  6793  			(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((strm + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf)
  6794  		}
  6795  	}
  6796  
  6797  	{
  6798  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 {
  6799  			(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((strm + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fhead)
  6800  		}
  6801  	}
  6802  
  6803  	{
  6804  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 {
  6805  			(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((strm + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fprev)
  6806  		}
  6807  	}
  6808  
  6809  	{
  6810  		if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 {
  6811  			(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((strm + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow)
  6812  		}
  6813  	}
  6814  
  6815  	(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((strm + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
  6816  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
  6817  
  6818  	if status == BUSY_STATE {
  6819  		return -3
  6820  	}
  6821  	return Z_OK
  6822  }
  6823  
  6824  // =========================================================================
  6825  // Copy the source state to the destination state.
  6826  // To simplify the source, this is not supported for 16-bit MSDOS (which
  6827  // doesn't have enough memory anyway to duplicate compression states).
  6828  func XdeflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* deflate.c:1102:13: */
  6829  	var ds uintptr
  6830  	var ss uintptr
  6831  	var overlay uintptr
  6832  
  6833  	if (deflateStateCheck(tls, source) != 0) || (dest == uintptr(Z_NULL)) {
  6834  		return -2
  6835  	}
  6836  
  6837  	ss = (*Z_stream)(unsafe.Pointer(source)).Fstate
  6838  
  6839  	libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{})))
  6840  
  6841  	ds = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((dest + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Deflate_state{})))
  6842  	if ds == uintptr(Z_NULL) {
  6843  		return -4
  6844  	}
  6845  	(*Z_stream)(unsafe.Pointer(dest)).Fstate = ds
  6846  	libc.Xmemcpy(tls, ds, ss, uint64(unsafe.Sizeof(Deflate_state{})))
  6847  	(*Deflate_state)(unsafe.Pointer(ds)).Fstrm = dest
  6848  
  6849  	(*Deflate_state)(unsafe.Pointer(ds)).Fwindow = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((dest + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fw_size, (uint32(uint64(2) * uint64(unsafe.Sizeof(Byte(0))))))
  6850  	(*Deflate_state)(unsafe.Pointer(ds)).Fprev = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((dest + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fw_size, uint32(unsafe.Sizeof(Pos(0))))
  6851  	(*Deflate_state)(unsafe.Pointer(ds)).Fhead = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((dest + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Fhash_size, uint32(unsafe.Sizeof(Pos(0))))
  6852  	overlay = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((dest + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(dest)).Fopaque, (*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize, (uint32(uint64(unsafe.Sizeof(Ush(0))) + uint64(2))))
  6853  	(*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf = overlay
  6854  
  6855  	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)) {
  6856  		XdeflateEnd(tls, dest)
  6857  		return -4
  6858  	}
  6859  	// following zmemcpy do not work for 16-bit MSDOS
  6860  	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fwindow, (*Deflate_state)(unsafe.Pointer(ss)).Fwindow, ((uint64((*Deflate_state)(unsafe.Pointer(ds)).Fw_size * UInt(2))) * uint64(unsafe.Sizeof(Byte(0)))))
  6861  	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fprev, (*Deflate_state)(unsafe.Pointer(ss)).Fprev, (uint64((*Deflate_state)(unsafe.Pointer(ds)).Fw_size) * uint64(unsafe.Sizeof(Pos(0)))))
  6862  	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fhead, (*Deflate_state)(unsafe.Pointer(ss)).Fhead, (uint64((*Deflate_state)(unsafe.Pointer(ds)).Fhash_size) * uint64(unsafe.Sizeof(Pos(0)))))
  6863  	libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf, (*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf, uint64(UInt((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf_size)))
  6864  
  6865  	(*Deflate_state)(unsafe.Pointer(ds)).Fpending_out = ((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr(((int64((*Deflate_state)(unsafe.Pointer(ss)).Fpending_out) - int64((*Deflate_state)(unsafe.Pointer(ss)).Fpending_buf)) / 1)))
  6866  	(*Deflate_state)(unsafe.Pointer(ds)).Fd_buf = (overlay + uintptr((uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize)/uint64(unsafe.Sizeof(Ush(0)))))*2)
  6867  	(*Deflate_state)(unsafe.Pointer(ds)).Fl_buf = ((*Deflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr(((uint64(1) + uint64(unsafe.Sizeof(Ush(0)))) * uint64((*Deflate_state)(unsafe.Pointer(ds)).Flit_bufsize))))
  6868  
  6869  	(*Deflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 212   /* &.dyn_ltree */
  6870  	(*Deflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2504  /* &.dyn_dtree */
  6871  	(*Deflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2748 /* &.bl_tree */
  6872  
  6873  	return Z_OK
  6874  }
  6875  
  6876  // ===========================================================================
  6877  // Read a new buffer from the current input stream, update the adler32
  6878  // and total number of bytes read.  All deflate() input goes through
  6879  // this function so some applications may wish to modify it to avoid
  6880  // allocating a large strm->next_in buffer and copying from it.
  6881  // (See also flush_pending()).
  6882  func read_buf(tls *libc.TLS, strm Z_streamp, buf uintptr, size uint32) uint32 { /* deflate.c:1164:16: */
  6883  	var len uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  6884  
  6885  	if len > size {
  6886  		len = size
  6887  	}
  6888  	if len == uint32(0) {
  6889  		return uint32(0)
  6890  	}
  6891  
  6892  	*(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (len)
  6893  
  6894  	libc.Xmemcpy(tls, buf, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(len))
  6895  	if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 1 {
  6896  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len)
  6897  	} else if (*Internal_state)(unsafe.Pointer((*Z_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == 2 {
  6898  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Z_stream)(unsafe.Pointer(strm)).Fadler, buf, len)
  6899  	}
  6900  	*(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(len))
  6901  	*(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(len))
  6902  
  6903  	return len
  6904  }
  6905  
  6906  // ===========================================================================
  6907  // Initialize the "longest match" routines for a new zlib stream
  6908  func lm_init(tls *libc.TLS, s uintptr) { /* deflate.c:1194:12: */
  6909  	(*Deflate_state)(unsafe.Pointer(s)).Fwindow_size = (uint64(2) * Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size))
  6910  
  6911  	*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size-UInt(1)))*2)) = Posf(NIL)
  6912  	libc.Xmemset(tls, (*Deflate_state)(unsafe.Pointer(s)).Fhead, 0, (uint64(((*Deflate_state)(unsafe.Pointer(s)).Fhash_size - UInt(1))) * uint64(unsafe.Sizeof(Posf(0)))))
  6913  
  6914  	// Set the default configuration parameters:
  6915  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy)
  6916  	(*Deflate_state)(unsafe.Pointer(s)).Fgood_match = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length)
  6917  	(*Deflate_state)(unsafe.Pointer(s)).Fnice_match = int32(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length)
  6918  	(*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length = UInt(configuration_table[(*Deflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain)
  6919  
  6920  	(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = UInt(0)
  6921  	(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = 0
  6922  	(*Deflate_state)(unsafe.Pointer(s)).Flookahead = UInt(0)
  6923  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  6924  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.AssignPtrUint32(s+184 /* &.prev_length */, (UInt(MIN_MATCH - 1)))
  6925  	(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  6926  	(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(0)
  6927  }
  6928  
  6929  // ===========================================================================
  6930  // Set match_start to the longest match starting at the given string and
  6931  // return its length. Matches shorter or equal to prev_length are discarded,
  6932  // in which case the result is equal to prev_length and match_start is
  6933  // garbage.
  6934  // IN assertions: cur_match is the head of the hash chain for the current
  6935  //   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
  6936  // OUT assertion: the match length is not greater than s->lookahead.
  6937  // For 80x86 and 680x0, an optimized version will be provided in match.asm or
  6938  // match.S. The code will be functionally equivalent.
  6939  func longest_match(tls *libc.TLS, s uintptr, cur_match IPos) UInt { /* deflate.c:1236:12: */
  6940  	var chain_length uint32 = (*Deflate_state)(unsafe.Pointer(s)).Fmax_chain_length                                           // max hash chain length
  6941  	var scan uintptr = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) // current string
  6942  	var match uintptr                                                                                                         // matched string
  6943  	var len int32                                                                                                             // length of current match
  6944  	var best_len int32 = int32((*Deflate_state)(unsafe.Pointer(s)).Fprev_length)                                              // best match length so far
  6945  	var nice_match int32 = (*Deflate_state)(unsafe.Pointer(s)).Fnice_match                                                    // stop if match long enough
  6946  	var limit IPos
  6947  	if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart > ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1))) {
  6948  		limit = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1))))
  6949  	} else {
  6950  		limit = uint32(NIL)
  6951  	}
  6952  	// Stop when cur_match becomes <= limit. To simplify the code,
  6953  	// we prevent matches with the string of window index 0.
  6954  	var prev uintptr = (*Deflate_state)(unsafe.Pointer(s)).Fprev
  6955  	var wmask UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_mask
  6956  
  6957  	var strend uintptr = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr(MAX_MATCH))
  6958  	var scan_end1 Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr((best_len - 1))))
  6959  	var scan_end Byte = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len)))
  6960  
  6961  	// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
  6962  	// It is easy to get rid of this optimization if necessary.
  6963  
  6964  	// Do not waste too much time if we already have a good match:
  6965  	if (*Deflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Deflate_state)(unsafe.Pointer(s)).Fgood_match {
  6966  		chain_length >>= 2
  6967  	}
  6968  	// Do not look for matches beyond the end of the input. This is necessary
  6969  	// to make deflate deterministic.
  6970  	if UInt(nice_match) > (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
  6971  		nice_match = int32((*Deflate_state)(unsafe.Pointer(s)).Flookahead)
  6972  	}
  6973  
  6974  	for ok := true; ok; ok = (((libc.AssignUint32(&cur_match, IPos(*(*Posf)(unsafe.Pointer(prev + uintptr((cur_match&wmask))*2))))) > limit) &&
  6975  		(libc.PreDecUint32(&chain_length, 1) != uint32(0))) {
  6976  
  6977  		match = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(cur_match))
  6978  
  6979  		// Skip to next match if the match length cannot increase
  6980  		// or if the match length is less than 2.  Note that the checks below
  6981  		// for insufficient lookahead only occur occasionally for performance
  6982  		// reasons.  Therefore uninitialized memory will be accessed, and
  6983  		// conditional jumps will be made that depend on those values.
  6984  		// However the length of the match is limited to the lookahead, so
  6985  		// the output of deflate is not affected by the uninitialized values.
  6986  
  6987  		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)))) {
  6988  			continue
  6989  		}
  6990  
  6991  		// The check at best_len-1 can be removed because it will be made
  6992  		// again later. (This heuristic is not always a win.)
  6993  		// It is not necessary to compare scan[2] and match[2] since they
  6994  		// are always equal when the other bytes match, given that
  6995  		// the hash keys are equal and that HASH_BITS >= 8.
  6996  		scan += uintptr(2)
  6997  		match++
  6998  
  6999  		// We check for insufficient lookahead only every 8th comparison;
  7000  		// the 256th check will be made at strstart+258.
  7001  		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)) {
  7002  		}
  7003  
  7004  		len = (MAX_MATCH - (int32((int64(strend) - int64(scan)) / 1)))
  7005  		scan = (strend - uintptr(MAX_MATCH))
  7006  
  7007  		if len > best_len {
  7008  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match
  7009  			best_len = len
  7010  			if len >= nice_match {
  7011  				break
  7012  			}
  7013  			scan_end1 = *(*Bytef)(unsafe.Pointer(scan + uintptr((best_len - 1))))
  7014  			scan_end = *(*Bytef)(unsafe.Pointer(scan + uintptr(best_len)))
  7015  		}
  7016  	}
  7017  
  7018  	if UInt(best_len) <= (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
  7019  		return UInt(best_len)
  7020  	}
  7021  	return (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  7022  }
  7023  
  7024  // ===========================================================================
  7025  // Fill the window when the lookahead becomes insufficient.
  7026  // Updates strstart and lookahead.
  7027  //
  7028  // IN assertion: lookahead < MIN_LOOKAHEAD
  7029  // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
  7030  //    At least one byte has been read, or avail_in == 0; reads are
  7031  //    performed for at least two bytes (required for the zip translate_eol
  7032  //    option -- not supported here).
  7033  func fill_window(tls *libc.TLS, s uintptr) { /* deflate.c:1482:12: */
  7034  	var n uint32
  7035  	var more uint32 // Amount of free space at the end of the window.
  7036  	var wsize UInt = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  7037  
  7038  	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))) {
  7039  		more = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead)) - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
  7040  
  7041  		// Deal with !@#$% 64K limit:
  7042  		if uint64(unsafe.Sizeof(int32(0))) <= uint64(2) {
  7043  			if ((more == uint32(0)) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart == UInt(0))) && ((*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0)) {
  7044  				more = wsize
  7045  
  7046  			} else if more == libc.Uint32(libc.Uint32FromInt32(-1)) {
  7047  				// Very unlikely, but possible on 16 bit machine if
  7048  				// strstart == 0 && lookahead == 1 (input done a byte at time)
  7049  				more--
  7050  			}
  7051  		}
  7052  
  7053  		// If the window is almost full and there is insufficient lookahead,
  7054  		// move the upper half to the lower one to make room in the upper half.
  7055  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart >= (wsize + ((*Deflate_state)(unsafe.Pointer((s))).Fw_size - (UInt((MAX_MATCH + MIN_MATCH) + 1)))) {
  7056  
  7057  			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(wsize)), (uint64(wsize - more)))
  7058  			*(*UInt)(unsafe.Pointer(s + 176 /* &.match_start */)) -= (wsize)
  7059  			*(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= (wsize) // we now have strstart >= MAX_DIST
  7060  			*(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) -= (int64(wsize))
  7061  			slide_hash(tls, s)
  7062  			more = more + (wsize)
  7063  		}
  7064  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0) {
  7065  			break
  7066  		}
  7067  
  7068  		// If there was no sliding:
  7069  		//    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
  7070  		//    more == window_size - lookahead - strstart
  7071  		// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
  7072  		// => more >= window_size - 2*WSIZE + 2
  7073  		// In the BIG_MEM or MMAP case (not yet supported),
  7074  		//   window_size == input_size + MIN_LOOKAHEAD  &&
  7075  		//   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
  7076  		// Otherwise, window_size == 2*WSIZE so more >= 2.
  7077  		// If there was sliding, more >= WSIZE. So in all cases, more >= 2.
  7078  
  7079  		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)
  7080  		*(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) += (n)
  7081  
  7082  		// Initialize the hash value now that we have some input:
  7083  		if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead + (*Deflate_state)(unsafe.Pointer(s)).Finsert) >= UInt(MIN_MATCH) {
  7084  			var str UInt = ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Finsert)
  7085  			(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str))))
  7086  			(*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)
  7087  			for (*Deflate_state)(unsafe.Pointer(s)).Finsert != 0 {
  7088  				(*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)
  7089  				*(*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))
  7090  				*(*Posf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = Pos(str)
  7091  				str++
  7092  				(*Deflate_state)(unsafe.Pointer(s)).Finsert--
  7093  				if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead + (*Deflate_state)(unsafe.Pointer(s)).Finsert) < UInt(MIN_MATCH) {
  7094  					break
  7095  				}
  7096  			}
  7097  		}
  7098  		// If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
  7099  		// but this is not important since only literal bytes will be emitted.
  7100  
  7101  	}
  7102  
  7103  	// If the WIN_INIT bytes after the end of the current data have never been
  7104  	// written, then zero those bytes in order to avoid memory check reports of
  7105  	// the use of uninitialized (or uninitialised as Julian writes) bytes by
  7106  	// the longest match routines.  Update the high water mark for the next
  7107  	// time through here.  WIN_INIT is set to MAX_MATCH since the longest match
  7108  	// routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
  7109  	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Deflate_state)(unsafe.Pointer(s)).Fwindow_size {
  7110  		var curr Ulg = (Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) + (Ulg((*Deflate_state)(unsafe.Pointer(s)).Flookahead)))
  7111  		var init1 Ulg
  7112  
  7113  		if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < curr {
  7114  			// Previous high water mark below current data -- zero WIN_INIT
  7115  			// bytes or up to end of window, whichever is less.
  7116  			init1 = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - curr)
  7117  			if init1 > uint64(MAX_MATCH) {
  7118  				init1 = uint64(MAX_MATCH)
  7119  			}
  7120  			libc.Xmemset(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(curr)), 0, uint64(uint32(init1)))
  7121  			(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = (curr + init1)
  7122  		} else if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < (curr + uint64(MAX_MATCH)) {
  7123  			// High water mark at or above current data, but below current data
  7124  			// plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
  7125  			// to end of window, whichever is less.
  7126  			init1 = ((curr + uint64(MAX_MATCH)) - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water)
  7127  			if init1 > ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water) {
  7128  				init1 = ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water)
  7129  			}
  7130  			libc.Xmemset(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fhigh_water)), 0, uint64(uint32(init1)))
  7131  			*(*Ulg)(unsafe.Pointer(s + 5944 /* &.high_water */)) += (init1)
  7132  		}
  7133  	}
  7134  
  7135  }
  7136  
  7137  // ===========================================================================
  7138  // Flush the current block, with given end-of-file flag.
  7139  // IN assertion: strstart is set to the end of the current match.
  7140  
  7141  // Same but force premature exit if necessary.
  7142  
  7143  // Maximum stored block length in deflate format (not including header).
  7144  
  7145  // Minimum of a and b.
  7146  
  7147  // ===========================================================================
  7148  // Copy without compression as much as possible from the input stream, return
  7149  // the current block state.
  7150  //
  7151  // In case deflateParams() is used to later switch to a non-zero compression
  7152  // level, s->matches (otherwise unused when storing) keeps track of the number
  7153  // of hash table slides to perform. If s->matches is 1, then one hash table
  7154  // slide will be done when switching. If s->matches is 2, the maximum value
  7155  // allowed here, then the hash table will be cleared, since two or more slides
  7156  // is the same as a clear.
  7157  //
  7158  // deflate_stored() is written to minimize the number of times an input byte is
  7159  // copied. It is most efficient with large input and output buffers, which
  7160  // maximizes the opportunites to have a single copy from next_in to next_out.
  7161  func deflate_stored(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1643:19: */
  7162  	// Smallest worthy block size when not flushing or finishing. By default
  7163  	// this is 32K. This can be as small as 507 bytes for memLevel == 1. For
  7164  	// large input and output buffers, the stored block size will be larger.
  7165  	var min_block uint32 = func() uint32 {
  7166  		if ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(5)) > (Ulg((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) {
  7167  			return (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  7168  		}
  7169  		return (uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(5)))
  7170  	}()
  7171  
  7172  	// Copy as many min_block or larger stored blocks directly to next_out as
  7173  	// possible. If flushing, copy the remaining available input to next_out as
  7174  	// stored blocks, if there is enough space.
  7175  	var len uint32
  7176  	var left uint32
  7177  	var have uint32
  7178  	var last uint32 = uint32(0)
  7179  	var used uint32 = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
  7180  	for ok := true; ok; ok = (last == uint32(0)) {
  7181  		// Set len to the maximum size block that we can copy directly with the
  7182  		// available input data and output space. Set left to how much of that
  7183  		// would be copied from what's left in the window.
  7184  		len = uint32(MAX_STORED)                                                                      // maximum deflate stored block length
  7185  		have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3))                    // number of header bytes
  7186  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { // need room for header
  7187  			break
  7188  		}
  7189  		// maximum stored block length that will fit in avail_out:
  7190  		have = ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have)
  7191  		left = (uint32(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)) // bytes left in window
  7192  		if Ulg(len) > (Ulg(left) + Ulg((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)) {
  7193  			len = (left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)
  7194  		} // limit len to the input
  7195  		if len > have {
  7196  			len = have
  7197  		} // limit len to the output
  7198  
  7199  		// If the stored block would be less than min_block in length, or if
  7200  		// unable to copy all of the available input when flushing, then try
  7201  		// copying to the window and the pending buffer instead. Also don't
  7202  		// write an empty block when flushing -- deflate() does that.
  7203  		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))) {
  7204  			break
  7205  		}
  7206  
  7207  		// Make a dummy stored block in pending to get the header bytes,
  7208  		// including any pending bits. This also updates the debugging counts.
  7209  		if (flush == Z_FINISH) && (len == (left + (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in)) {
  7210  			last = uint32(1)
  7211  		} else {
  7212  			last = uint32(0)
  7213  		}
  7214  		X_tr_stored_block(tls, s, uintptr(0), uint64(0), int32(last))
  7215  
  7216  		// Replace the lengths in the dummy stored block with len.
  7217  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(4))))) = Bytef(len)
  7218  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(3))))) = (Bytef(len >> 8))
  7219  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(2))))) = Bytef(^len)
  7220  		*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fpending - uint64(1))))) = (Bytef(^len >> 8))
  7221  
  7222  		// Write the stored block header bytes.
  7223  		flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7224  
  7225  		// Copy uncompressed bytes from the window to next_out.
  7226  		if left != 0 {
  7227  			if left > len {
  7228  				left = len
  7229  			}
  7230  			libc.Xmemcpy(tls, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), uint64(left))
  7231  			*(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24 /* &.next_out */)) += (uintptr(left))
  7232  			*(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 32 /* &.avail_out */)) -= (left)
  7233  			*(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 40 /* &.total_out */)) += (ULong(left))
  7234  			*(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) += (int64(left))
  7235  			len = len - (left)
  7236  		}
  7237  
  7238  		// Copy uncompressed bytes directly from next_in to next_out, updating
  7239  		// the check value.
  7240  		if len != 0 {
  7241  			read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len)
  7242  			*(*uintptr)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 24 /* &.next_out */)) += (uintptr(len))
  7243  			*(*UInt)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 32 /* &.avail_out */)) -= (len)
  7244  			*(*ULong)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm + 40 /* &.total_out */)) += (ULong(len))
  7245  		}
  7246  	}
  7247  
  7248  	// Update the sliding window with the last s->w_size bytes of the copied
  7249  	// data, or append all of the copied data to the existing window if less
  7250  	// than s->w_size bytes were copied. Also update the number of bytes to
  7251  	// insert in the hash tables, in the event that deflateParams() switches to
  7252  	// a non-zero compression level.
  7253  	used = used - ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) // number of input bytes directly copied
  7254  	if used != 0 {
  7255  		// If any input was used, then no unused input remains in the window,
  7256  		// therefore s->block_start == s->strstart.
  7257  		if used >= (*Deflate_state)(unsafe.Pointer(s)).Fw_size { // supplant the previous history
  7258  			(*Deflate_state)(unsafe.Pointer(s)).Fmatches = UInt(2) // clear hash
  7259  			libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in - uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size)), uint64((*Deflate_state)(unsafe.Pointer(s)).Fw_size))
  7260  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart = (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  7261  		} else {
  7262  			if ((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) <= Ulg(used) {
  7263  				// Slide the window down.
  7264  				*(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fw_size)
  7265  				libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size)), uint64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))
  7266  				if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) {
  7267  					(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
  7268  				} // add a pending slide_hash()
  7269  			}
  7270  			libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)), ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in - uintptr(used)), uint64(used))
  7271  			*(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += (used)
  7272  		}
  7273  		(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7274  		*(*UInt)(unsafe.Pointer(s + 5932 /* &.insert */)) += (func() uint32 {
  7275  			if (used) > ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert) {
  7276  				return ((*Deflate_state)(unsafe.Pointer(s)).Fw_size - (*Deflate_state)(unsafe.Pointer(s)).Finsert)
  7277  			}
  7278  			return used
  7279  		}())
  7280  	}
  7281  	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) {
  7282  		(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7283  	}
  7284  
  7285  	// If the last block was written to next_out, then done.
  7286  	if last != 0 {
  7287  		return Finish_done
  7288  	}
  7289  
  7290  	// If flushing and all input has been consumed, then done.
  7291  	if (((flush != Z_NO_FLUSH) && (flush != Z_FINISH)) && ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0))) && (int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) == (*Deflate_state)(unsafe.Pointer(s)).Fblock_start) {
  7292  		return Block_done
  7293  	}
  7294  
  7295  	// Fill the window with any remaining input.
  7296  	have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fwindow_size - Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) - uint64(1)))
  7297  	if ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in > have) && ((*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= int64((*Deflate_state)(unsafe.Pointer(s)).Fw_size)) {
  7298  		// Slide the window down.
  7299  		*(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) -= (int64((*Deflate_state)(unsafe.Pointer(s)).Fw_size))
  7300  		*(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fw_size)
  7301  		libc.Xmemcpy(tls, (*Deflate_state)(unsafe.Pointer(s)).Fwindow, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fw_size)), uint64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))
  7302  		if (*Deflate_state)(unsafe.Pointer(s)).Fmatches < UInt(2) {
  7303  			(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
  7304  		} // add a pending slide_hash()
  7305  		have = have + ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) // more space now
  7306  	}
  7307  	if have > (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in {
  7308  		have = (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in
  7309  	}
  7310  	if have != 0 {
  7311  		read_buf(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)), have)
  7312  		*(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += (have)
  7313  	}
  7314  	if (*Deflate_state)(unsafe.Pointer(s)).Fhigh_water < Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) {
  7315  		(*Deflate_state)(unsafe.Pointer(s)).Fhigh_water = Ulg((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7316  	}
  7317  
  7318  	// There was not enough avail_out to write a complete worthy or flushed
  7319  	// stored block to next_out. Write a stored block to pending instead, if we
  7320  	// have enough input for a worthy block, or if flushing and there is enough
  7321  	// room for the remaining input as a stored block in the pending buffer.
  7322  	have = (uint32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_valid + 42) >> 3)) // number of header bytes
  7323  	// maximum stored block length that will fit in pending:
  7324  	have = func() uint32 {
  7325  		if ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have)) > (uint64(MAX_STORED)) {
  7326  			return uint32(MAX_STORED)
  7327  		}
  7328  		return (uint32((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf_size - Ulg(have)))
  7329  	}()
  7330  	min_block = func() uint32 {
  7331  		if (have) > ((*Deflate_state)(unsafe.Pointer(s)).Fw_size) {
  7332  			return (*Deflate_state)(unsafe.Pointer(s)).Fw_size
  7333  		}
  7334  		return have
  7335  	}()
  7336  	left = (uint32(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start))
  7337  	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)) {
  7338  		len = func() uint32 {
  7339  			if (left) > (have) {
  7340  				return have
  7341  			}
  7342  			return left
  7343  		}()
  7344  		if ((flush == Z_FINISH) && ((*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == UInt(0))) && (len == left) {
  7345  			last = uint32(1)
  7346  		} else {
  7347  			last = uint32(0)
  7348  		}
  7349  		X_tr_stored_block(tls, s, ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), uint64(len), int32(last))
  7350  		*(*int64)(unsafe.Pointer(s + 152 /* &.block_start */)) += (int64(len))
  7351  		flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7352  	}
  7353  
  7354  	// We've done all we can with the available input and output.
  7355  	if last != 0 {
  7356  		return Finish_started
  7357  	}
  7358  	return Need_more
  7359  }
  7360  
  7361  // ===========================================================================
  7362  // Compress as much as possible from the input stream, return the current
  7363  // block state.
  7364  // This function does not perform lazy evaluation of matches and inserts
  7365  // new strings in the dictionary only for unmatched strings or for short
  7366  // matches. It is used only for the fast compression options.
  7367  func deflate_fast(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1824:19: */
  7368  	var hash_head IPos // head of the hash chain
  7369  	var bflush int32   // set if current block must be flushed
  7370  
  7371  	for {
  7372  		// Make sure that we always have enough lookahead, except
  7373  		// at the end of the input file. We need MAX_MATCH bytes
  7374  		// for the next match, plus MIN_MATCH bytes to insert the
  7375  		// string following the next match.
  7376  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1)) {
  7377  			fill_window(tls, s)
  7378  			if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1))) && (flush == Z_NO_FLUSH) {
  7379  				return Need_more
  7380  			}
  7381  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  7382  				break
  7383  			} // flush the current block
  7384  		}
  7385  
  7386  		// Insert the string window[strstart .. strstart+2] in the
  7387  		// dictionary, and set hash_head to the head of the hash chain:
  7388  		hash_head = IPos(NIL)
  7389  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
  7390  			(*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)
  7391  			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))))
  7392  			*(*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)
  7393  		}
  7394  
  7395  		// Find the longest match, discarding those <= prev_length.
  7396  		// At this point we have always match_length < MIN_MATCH
  7397  		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)))) {
  7398  			// To simplify the code, we prevent matches with the string
  7399  			// of window index 0 (in particular we have to avoid a match
  7400  			// of the string with itself at the start of the input file).
  7401  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head)
  7402  			// longest_match() sets match_start
  7403  		}
  7404  		if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) {
  7405  
  7406  			{
  7407  				var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH)))
  7408  				var dist Ush = (Ush((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start))
  7409  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
  7410  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
  7411  				dist--
  7412  				*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++
  7413  				*(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 {
  7414  					if (int32(dist)) < 256 {
  7415  						return int32(X_dist_code[dist])
  7416  					}
  7417  					return int32(X_dist_code[(256 + ((int32(dist)) >> 7))])
  7418  				}()))*4 /* &.fc */))++
  7419  				bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1))))
  7420  			}
  7421  
  7422  			*(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length)
  7423  
  7424  			// Insert new strings in the hash table only if the match length
  7425  			// is not too large. This saves time but degrades compression.
  7426  			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)) {
  7427  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length-- // string at strstart already in table
  7428  				for ok := true; ok; ok = (libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length, 1) != UInt(0)) {
  7429  					(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  7430  					(*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)
  7431  					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))))
  7432  					*(*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)
  7433  					// strstart never exceeds WSIZE-MAX_MATCH, so there are
  7434  					// always MIN_MATCH bytes ahead.
  7435  				}
  7436  				(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  7437  			} else {
  7438  				*(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length)
  7439  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  7440  				(*Deflate_state)(unsafe.Pointer(s)).Fins_h = UInt(*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart))))
  7441  				(*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)
  7442  				// If lookahead < MIN_MATCH, ins_h is garbage, but it does not
  7443  				// matter since it will be recomputed at next deflate call.
  7444  			}
  7445  		} else {
  7446  			// No match, output a literal byte
  7447  
  7448  			{
  7449  				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
  7450  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  7451  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  7452  				*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++
  7453  				bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1))))
  7454  			}
  7455  
  7456  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  7457  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  7458  		}
  7459  		if bflush != 0 {
  7460  			{
  7461  				X_tr_flush_block(tls, s, func() uintptr {
  7462  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7463  						return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7464  					}
  7465  					return uintptr(Z_NULL)
  7466  				}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0)
  7467  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7468  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7469  			}
  7470  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7471  				if 0 != 0 {
  7472  					return Finish_started
  7473  				}
  7474  				return Need_more
  7475  			}
  7476  		}
  7477  
  7478  	}
  7479  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 {
  7480  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < (UInt(MIN_MATCH - 1)) {
  7481  			return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
  7482  		}
  7483  		return (uint32(MIN_MATCH - 1))
  7484  	}()
  7485  	if flush == Z_FINISH {
  7486  		{
  7487  			{
  7488  				X_tr_flush_block(tls, s, func() uintptr {
  7489  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7490  						return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7491  					}
  7492  					return uintptr(Z_NULL)
  7493  				}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1)
  7494  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7495  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7496  			}
  7497  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7498  				if 1 != 0 {
  7499  					return Finish_started
  7500  				}
  7501  				return Need_more
  7502  			}
  7503  		}
  7504  
  7505  		return Finish_done
  7506  	}
  7507  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  7508  		{
  7509  			X_tr_flush_block(tls, s, func() uintptr {
  7510  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7511  					return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7512  				}
  7513  				return uintptr(Z_NULL)
  7514  			}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0)
  7515  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7516  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7517  		}
  7518  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7519  			if 0 != 0 {
  7520  				return Finish_started
  7521  			}
  7522  			return Need_more
  7523  		}
  7524  	}
  7525  
  7526  	return Block_done
  7527  }
  7528  
  7529  // ===========================================================================
  7530  // Same as above, but achieves better compression. We use a lazy
  7531  // evaluation for matches: a match is finally adopted only if there is
  7532  // no better match at the next window position.
  7533  func deflate_slow(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:1926:19: */
  7534  	var hash_head IPos // head of hash chain
  7535  	var bflush int32   // set if current block must be flushed
  7536  
  7537  	// Process the input block.
  7538  	for {
  7539  		// Make sure that we always have enough lookahead, except
  7540  		// at the end of the input file. We need MAX_MATCH bytes
  7541  		// for the next match, plus MIN_MATCH bytes to insert the
  7542  		// string following the next match.
  7543  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1)) {
  7544  			fill_window(tls, s)
  7545  			if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead < (UInt((MAX_MATCH + MIN_MATCH) + 1))) && (flush == Z_NO_FLUSH) {
  7546  				return Need_more
  7547  			}
  7548  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  7549  				break
  7550  			} // flush the current block
  7551  		}
  7552  
  7553  		// Insert the string window[strstart .. strstart+2] in the
  7554  		// dictionary, and set hash_head to the head of the hash chain:
  7555  		hash_head = IPos(NIL)
  7556  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH) {
  7557  			(*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)
  7558  			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))))
  7559  			*(*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)
  7560  		}
  7561  
  7562  		// Find the longest match, discarding those <= prev_length.
  7563  		(*Deflate_state)(unsafe.Pointer(s)).Fprev_length = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length
  7564  		(*Deflate_state)(unsafe.Pointer(s)).Fprev_match = (*Deflate_state)(unsafe.Pointer(s)).Fmatch_start
  7565  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1))
  7566  
  7567  		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)))) {
  7568  			// To simplify the code, we prevent matches with the string
  7569  			// of window index 0 (in particular we have to avoid a match
  7570  			// of the string with itself at the start of the input file).
  7571  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = longest_match(tls, s, hash_head)
  7572  			// longest_match() sets match_start
  7573  
  7574  			if ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length <= UInt(5)) && (((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FILTERED) ||
  7575  				(((*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)))) {
  7576  
  7577  				// If prev_match is also MIN_MATCH, match_start is garbage
  7578  				// but we will ignore the current match anyway.
  7579  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1))
  7580  			}
  7581  		}
  7582  		// If there was a match at the previous step and the current
  7583  		// match is not better, output the previous match:
  7584  		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) {
  7585  			var max_insert UInt = (((*Deflate_state)(unsafe.Pointer(s)).Fstrstart + (*Deflate_state)(unsafe.Pointer(s)).Flookahead) - UInt(MIN_MATCH))
  7586  			// Do not insert strings in hash table beyond this.
  7587  
  7588  			{
  7589  				var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(MIN_MATCH)))
  7590  				var dist Ush = (Ush(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1)) - (*Deflate_state)(unsafe.Pointer(s)).Fprev_match))
  7591  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
  7592  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
  7593  				dist--
  7594  				*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++
  7595  				*(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 {
  7596  					if (int32(dist)) < 256 {
  7597  						return int32(X_dist_code[dist])
  7598  					}
  7599  					return int32(X_dist_code[(256 + ((int32(dist)) >> 7))])
  7600  				}()))*4 /* &.fc */))++
  7601  				bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1))))
  7602  			}
  7603  
  7604  			// Insert in hash table all strings up to the end of the match.
  7605  			// strstart-1 and strstart are already inserted. If there is not
  7606  			// enough lookahead, the last two strings are not inserted in
  7607  			// the hash table.
  7608  			*(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fprev_length - UInt(1))
  7609  			*(*UInt)(unsafe.Pointer(s + 184 /* &.prev_length */)) -= (UInt(2))
  7610  			for ok := true; ok; ok = (libc.PreDecUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fprev_length, 1) != UInt(0)) {
  7611  				if libc.PreIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fstrstart, 1) <= max_insert {
  7612  					(*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)
  7613  					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))))
  7614  					*(*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)
  7615  				}
  7616  			}
  7617  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  7618  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MIN_MATCH - 1))
  7619  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  7620  
  7621  			if bflush != 0 {
  7622  				{
  7623  					X_tr_flush_block(tls, s, func() uintptr {
  7624  						if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7625  							return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7626  						}
  7627  						return uintptr(Z_NULL)
  7628  					}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0)
  7629  					(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7630  					flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7631  				}
  7632  				if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7633  					if 0 != 0 {
  7634  						return Finish_started
  7635  					}
  7636  					return Need_more
  7637  				}
  7638  			}
  7639  
  7640  		} else if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 {
  7641  			// If there was no match at the previous position, output a
  7642  			// single literal. If there was a match but the current match
  7643  			// is longer, truncate the previous match to a single literal.
  7644  
  7645  			{
  7646  				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1)))))
  7647  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  7648  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  7649  				*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++
  7650  				bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1))))
  7651  			}
  7652  
  7653  			if bflush != 0 {
  7654  				{
  7655  					X_tr_flush_block(tls, s, func() uintptr {
  7656  						if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7657  							return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7658  						}
  7659  						return uintptr(Z_NULL)
  7660  					}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0)
  7661  					(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7662  					flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7663  				}
  7664  
  7665  			}
  7666  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  7667  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  7668  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7669  				return Need_more
  7670  			}
  7671  		} else {
  7672  			// There is no previous match to compare with, wait for
  7673  			// the next step to decide.
  7674  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 1
  7675  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  7676  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  7677  		}
  7678  	}
  7679  
  7680  	if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 {
  7681  
  7682  		{
  7683  			var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(((*Deflate_state)(unsafe.Pointer(s)).Fstrstart - UInt(1)))))
  7684  			*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  7685  			*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  7686  			*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++
  7687  			bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1))))
  7688  		}
  7689  
  7690  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_available = 0
  7691  	}
  7692  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = func() uint32 {
  7693  		if (*Deflate_state)(unsafe.Pointer(s)).Fstrstart < (UInt(MIN_MATCH - 1)) {
  7694  			return (*Deflate_state)(unsafe.Pointer(s)).Fstrstart
  7695  		}
  7696  		return (uint32(MIN_MATCH - 1))
  7697  	}()
  7698  	if flush == Z_FINISH {
  7699  		{
  7700  			{
  7701  				X_tr_flush_block(tls, s, func() uintptr {
  7702  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7703  						return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7704  					}
  7705  					return uintptr(Z_NULL)
  7706  				}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1)
  7707  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7708  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7709  			}
  7710  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7711  				if 1 != 0 {
  7712  					return Finish_started
  7713  				}
  7714  				return Need_more
  7715  			}
  7716  		}
  7717  
  7718  		return Finish_done
  7719  	}
  7720  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  7721  		{
  7722  			X_tr_flush_block(tls, s, func() uintptr {
  7723  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7724  					return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7725  				}
  7726  				return uintptr(Z_NULL)
  7727  			}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0)
  7728  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7729  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7730  		}
  7731  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7732  			if 0 != 0 {
  7733  				return Finish_started
  7734  			}
  7735  			return Need_more
  7736  		}
  7737  	}
  7738  
  7739  	return Block_done
  7740  }
  7741  
  7742  // ===========================================================================
  7743  // For Z_RLE, simply look for runs of bytes, generate matches only of distance
  7744  // one.  Do not maintain a hash table.  (It will be regenerated if this run of
  7745  // deflate switches away from Z_RLE.)
  7746  func deflate_rle(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2057:19: */
  7747  	var bflush int32 // set if current block must be flushed
  7748  	var prev UInt    // byte at distance one to match
  7749  	var scan uintptr
  7750  	var strend uintptr // scan goes up to strend for length of run
  7751  
  7752  	for {
  7753  		// Make sure that we always have enough lookahead, except
  7754  		// at the end of the input file. We need MAX_MATCH bytes
  7755  		// for the longest run, plus one for the unrolled loop.
  7756  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH) {
  7757  			fill_window(tls, s)
  7758  			if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead <= UInt(MAX_MATCH)) && (flush == Z_NO_FLUSH) {
  7759  				return Need_more
  7760  			}
  7761  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  7762  				break
  7763  			} // flush the current block
  7764  		}
  7765  
  7766  		// See how many times the previous byte repeats
  7767  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  7768  		if ((*Deflate_state)(unsafe.Pointer(s)).Flookahead >= UInt(MIN_MATCH)) && ((*Deflate_state)(unsafe.Pointer(s)).Fstrstart > UInt(0)) {
  7769  			scan = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) - uintptr(1))
  7770  			prev = UInt(*(*Bytef)(unsafe.Pointer(scan)))
  7771  			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))))) {
  7772  				strend = (((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)) + uintptr(MAX_MATCH))
  7773  				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)) {
  7774  				}
  7775  				(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (UInt(MAX_MATCH) - (UInt((int64(strend) - int64(scan)) / 1)))
  7776  				if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Deflate_state)(unsafe.Pointer(s)).Flookahead {
  7777  					(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Deflate_state)(unsafe.Pointer(s)).Flookahead
  7778  				}
  7779  			}
  7780  
  7781  		}
  7782  
  7783  		// Emit match if have run of MIN_MATCH or longer, else emit literal
  7784  		if (*Deflate_state)(unsafe.Pointer(s)).Fmatch_length >= UInt(MIN_MATCH) {
  7785  
  7786  			{
  7787  				var len Uch = (Uch((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length - UInt(MIN_MATCH)))
  7788  				var dist Ush = Ush(1)
  7789  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = dist
  7790  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = len
  7791  				dist--
  7792  				*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[len])+LITERALS)+1))*4 /* &.fc */))++
  7793  				*(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 {
  7794  					if (int32(dist)) < 256 {
  7795  						return int32(X_dist_code[dist])
  7796  					}
  7797  					return int32(X_dist_code[(256 + ((int32(dist)) >> 7))])
  7798  				}()))*4 /* &.fc */))++
  7799  				bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1))))
  7800  			}
  7801  
  7802  			*(*UInt)(unsafe.Pointer(s + 180 /* &.lookahead */)) -= ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length)
  7803  			*(*UInt)(unsafe.Pointer(s + 172 /* &.strstart */)) += ((*Deflate_state)(unsafe.Pointer(s)).Fmatch_length)
  7804  			(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  7805  		} else {
  7806  			// No match, output a literal byte
  7807  
  7808  			{
  7809  				var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
  7810  				*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  7811  				*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  7812  				*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++
  7813  				bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1))))
  7814  			}
  7815  
  7816  			(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  7817  			(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  7818  		}
  7819  		if bflush != 0 {
  7820  			{
  7821  				X_tr_flush_block(tls, s, func() uintptr {
  7822  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7823  						return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7824  					}
  7825  					return uintptr(Z_NULL)
  7826  				}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0)
  7827  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7828  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7829  			}
  7830  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7831  				if 0 != 0 {
  7832  					return Finish_started
  7833  				}
  7834  				return Need_more
  7835  			}
  7836  		}
  7837  
  7838  	}
  7839  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  7840  	if flush == Z_FINISH {
  7841  		{
  7842  			{
  7843  				X_tr_flush_block(tls, s, func() uintptr {
  7844  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7845  						return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7846  					}
  7847  					return uintptr(Z_NULL)
  7848  				}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1)
  7849  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7850  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7851  			}
  7852  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7853  				if 1 != 0 {
  7854  					return Finish_started
  7855  				}
  7856  				return Need_more
  7857  			}
  7858  		}
  7859  
  7860  		return Finish_done
  7861  	}
  7862  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  7863  		{
  7864  			X_tr_flush_block(tls, s, func() uintptr {
  7865  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7866  					return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7867  				}
  7868  				return uintptr(Z_NULL)
  7869  			}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0)
  7870  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7871  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7872  		}
  7873  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7874  			if 0 != 0 {
  7875  				return Finish_started
  7876  			}
  7877  			return Need_more
  7878  		}
  7879  	}
  7880  
  7881  	return Block_done
  7882  }
  7883  
  7884  // ===========================================================================
  7885  // For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.
  7886  // (It will be regenerated if this run of deflate switches away from Huffman.)
  7887  func deflate_huff(tls *libc.TLS, s uintptr, flush int32) Block_state { /* deflate.c:2130:19: */
  7888  	var bflush int32 // set if current block must be flushed
  7889  
  7890  	for {
  7891  		// Make sure that we have a literal to write.
  7892  		if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  7893  			fill_window(tls, s)
  7894  			if (*Deflate_state)(unsafe.Pointer(s)).Flookahead == UInt(0) {
  7895  				if flush == Z_NO_FLUSH {
  7896  					return Need_more
  7897  				}
  7898  				break // flush the current block
  7899  			}
  7900  		}
  7901  
  7902  		// Output a literal byte
  7903  		(*Deflate_state)(unsafe.Pointer(s)).Fmatch_length = UInt(0)
  7904  
  7905  		{
  7906  			var cc Uch = *(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)))
  7907  			*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ushf(0)
  7908  			*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = cc
  7909  			*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(cc)*4 /* &.fc */))++
  7910  			bflush = (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1))))
  7911  		}
  7912  
  7913  		(*Deflate_state)(unsafe.Pointer(s)).Flookahead--
  7914  		(*Deflate_state)(unsafe.Pointer(s)).Fstrstart++
  7915  		if bflush != 0 {
  7916  			{
  7917  				X_tr_flush_block(tls, s, func() uintptr {
  7918  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7919  						return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7920  					}
  7921  					return uintptr(Z_NULL)
  7922  				}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0)
  7923  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7924  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7925  			}
  7926  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7927  				if 0 != 0 {
  7928  					return Finish_started
  7929  				}
  7930  				return Need_more
  7931  			}
  7932  		}
  7933  
  7934  	}
  7935  	(*Deflate_state)(unsafe.Pointer(s)).Finsert = UInt(0)
  7936  	if flush == Z_FINISH {
  7937  		{
  7938  			{
  7939  				X_tr_flush_block(tls, s, func() uintptr {
  7940  					if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7941  						return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7942  					}
  7943  					return uintptr(Z_NULL)
  7944  				}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 1)
  7945  				(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7946  				flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7947  			}
  7948  			if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7949  				if 1 != 0 {
  7950  					return Finish_started
  7951  				}
  7952  				return Need_more
  7953  			}
  7954  		}
  7955  
  7956  		return Finish_done
  7957  	}
  7958  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != 0 {
  7959  		{
  7960  			X_tr_flush_block(tls, s, func() uintptr {
  7961  				if (*Deflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 {
  7962  					return ((*Deflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(uint32((*Deflate_state)(unsafe.Pointer(s)).Fblock_start)))
  7963  				}
  7964  				return uintptr(Z_NULL)
  7965  			}(), (Ulg(int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Deflate_state)(unsafe.Pointer(s)).Fblock_start)), 0)
  7966  			(*Deflate_state)(unsafe.Pointer(s)).Fblock_start = int64((*Deflate_state)(unsafe.Pointer(s)).Fstrstart)
  7967  			flush_pending(tls, (*Deflate_state)(unsafe.Pointer(s)).Fstrm)
  7968  		}
  7969  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == UInt(0) {
  7970  			if 0 != 0 {
  7971  				return Finish_started
  7972  			}
  7973  			return Need_more
  7974  		}
  7975  	}
  7976  
  7977  	return Block_done
  7978  }
  7979  
  7980  // bits/types.h -- definitions of __*_t types underlying *_t types.
  7981  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  7982  //    This file is part of the GNU C Library.
  7983  //
  7984  //    The GNU C Library is free software; you can redistribute it and/or
  7985  //    modify it under the terms of the GNU Lesser General Public
  7986  //    License as published by the Free Software Foundation; either
  7987  //    version 2.1 of the License, or (at your option) any later version.
  7988  //
  7989  //    The GNU C Library is distributed in the hope that it will be useful,
  7990  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  7991  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  7992  //    Lesser General Public License for more details.
  7993  //
  7994  //    You should have received a copy of the GNU Lesser General Public
  7995  //    License along with the GNU C Library; if not, see
  7996  //    <http://www.gnu.org/licenses/>.
  7997  
  7998  // Never include this file directly; use <sys/types.h> instead.
  7999  
  8000  // Integral type unchanged by default argument promotions that can
  8001  //    hold any value corresponding to members of the extended character
  8002  //    set, as well as at least one value that does not correspond to any
  8003  //    member of the extended character set.
  8004  
  8005  // Conversion state information.
  8006  type X__mbstate_t = struct {
  8007  	F__count int32
  8008  	F__value struct{ F__wch uint32 }
  8009  } /* __mbstate_t.h:21:3 */
  8010  
  8011  // The tag name of this struct is _G_fpos_t to preserve historic
  8012  //    C++ mangled names for functions taking fpos_t arguments.
  8013  //    That name should not be used in new code.
  8014  type X_G_fpos_t = struct {
  8015  	F__pos   X__off_t
  8016  	F__state X__mbstate_t
  8017  } /* __fpos_t.h:10:9 */
  8018  
  8019  // The tag name of this struct is _G_fpos_t to preserve historic
  8020  //    C++ mangled names for functions taking fpos_t arguments.
  8021  //    That name should not be used in new code.
  8022  type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */
  8023  
  8024  // bits/types.h -- definitions of __*_t types underlying *_t types.
  8025  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  8026  //    This file is part of the GNU C Library.
  8027  //
  8028  //    The GNU C Library is free software; you can redistribute it and/or
  8029  //    modify it under the terms of the GNU Lesser General Public
  8030  //    License as published by the Free Software Foundation; either
  8031  //    version 2.1 of the License, or (at your option) any later version.
  8032  //
  8033  //    The GNU C Library is distributed in the hope that it will be useful,
  8034  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8035  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8036  //    Lesser General Public License for more details.
  8037  //
  8038  //    You should have received a copy of the GNU Lesser General Public
  8039  //    License along with the GNU C Library; if not, see
  8040  //    <http://www.gnu.org/licenses/>.
  8041  
  8042  // Never include this file directly; use <sys/types.h> instead.
  8043  
  8044  // The tag name of this struct is _G_fpos64_t to preserve historic
  8045  //    C++ mangled names for functions taking fpos_t and/or fpos64_t
  8046  //    arguments.  That name should not be used in new code.
  8047  type X_G_fpos64_t = struct {
  8048  	F__pos   X__off64_t
  8049  	F__state X__mbstate_t
  8050  } /* __fpos64_t.h:10:9 */
  8051  
  8052  // bits/types.h -- definitions of __*_t types underlying *_t types.
  8053  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  8054  //    This file is part of the GNU C Library.
  8055  //
  8056  //    The GNU C Library is free software; you can redistribute it and/or
  8057  //    modify it under the terms of the GNU Lesser General Public
  8058  //    License as published by the Free Software Foundation; either
  8059  //    version 2.1 of the License, or (at your option) any later version.
  8060  //
  8061  //    The GNU C Library is distributed in the hope that it will be useful,
  8062  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8063  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8064  //    Lesser General Public License for more details.
  8065  //
  8066  //    You should have received a copy of the GNU Lesser General Public
  8067  //    License along with the GNU C Library; if not, see
  8068  //    <http://www.gnu.org/licenses/>.
  8069  
  8070  // Never include this file directly; use <sys/types.h> instead.
  8071  
  8072  // The tag name of this struct is _G_fpos64_t to preserve historic
  8073  //    C++ mangled names for functions taking fpos_t and/or fpos64_t
  8074  //    arguments.  That name should not be used in new code.
  8075  type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */
  8076  
  8077  type X_IO_FILE = struct {
  8078  	F_flags          int32
  8079  	_                [4]byte
  8080  	F_IO_read_ptr    uintptr
  8081  	F_IO_read_end    uintptr
  8082  	F_IO_read_base   uintptr
  8083  	F_IO_write_base  uintptr
  8084  	F_IO_write_ptr   uintptr
  8085  	F_IO_write_end   uintptr
  8086  	F_IO_buf_base    uintptr
  8087  	F_IO_buf_end     uintptr
  8088  	F_IO_save_base   uintptr
  8089  	F_IO_backup_base uintptr
  8090  	F_IO_save_end    uintptr
  8091  	F_markers        uintptr
  8092  	F_chain          uintptr
  8093  	F_fileno         int32
  8094  	F_flags2         int32
  8095  	F_old_offset     X__off_t
  8096  	F_cur_column     uint16
  8097  	F_vtable_offset  int8
  8098  	F_shortbuf       [1]int8
  8099  	_                [4]byte
  8100  	F_lock           uintptr
  8101  	F_offset         X__off64_t
  8102  	F_codecvt        uintptr
  8103  	F_wide_data      uintptr
  8104  	F_freeres_list   uintptr
  8105  	F_freeres_buf    uintptr
  8106  	F__pad5          Size_t
  8107  	F_mode           int32
  8108  	F_unused2        [20]int8
  8109  } /* __FILE.h:4:1 */
  8110  
  8111  type X__FILE = X_IO_FILE /* __FILE.h:5:25 */
  8112  
  8113  // The opaque type of streams.  This is the definition used elsewhere.
  8114  type FILE = X_IO_FILE /* FILE.h:7:25 */
  8115  
  8116  // The type of the second argument to `fgetpos' and `fsetpos'.
  8117  type Fpos_t = X__fpos_t     /* stdio.h:84:18 */
  8118  type Fpos64_t = X__fpos64_t /* stdio.h:89:20 */
  8119  
  8120  // Floating-point inline functions for stdlib.h.
  8121  //    Copyright (C) 2012-2018 Free Software Foundation, Inc.
  8122  //    This file is part of the GNU C Library.
  8123  //
  8124  //    The GNU C Library is free software; you can redistribute it and/or
  8125  //    modify it under the terms of the GNU Lesser General Public
  8126  //    License as published by the Free Software Foundation; either
  8127  //    version 2.1 of the License, or (at your option) any later version.
  8128  //
  8129  //    The GNU C Library is distributed in the hope that it will be useful,
  8130  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8131  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8132  //    Lesser General Public License for more details.
  8133  //
  8134  //    You should have received a copy of the GNU Lesser General Public
  8135  //    License along with the GNU C Library; if not, see
  8136  //    <http://www.gnu.org/licenses/>.
  8137  
  8138  // Define some macros helping to catch buffer overflows.
  8139  
  8140  // Copyright (C) 1992-2018 Free Software Foundation, Inc.
  8141  //
  8142  // This file is part of GCC.
  8143  //
  8144  // GCC is free software; you can redistribute it and/or modify it under
  8145  // the terms of the GNU General Public License as published by the Free
  8146  // Software Foundation; either version 3, or (at your option) any later
  8147  // version.
  8148  //
  8149  // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  8150  // WARRANTY; without even the implied warranty of MERCHANTABILITY or
  8151  // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  8152  // for more details.
  8153  //
  8154  // Under Section 7 of GPL version 3, you are granted additional
  8155  // permissions described in the GCC Runtime Library Exception, version
  8156  // 3.1, as published by the Free Software Foundation.
  8157  //
  8158  // You should have received a copy of the GNU General Public License and
  8159  // a copy of the GCC Runtime Library Exception along with this program;
  8160  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  8161  // <http://www.gnu.org/licenses/>.
  8162  
  8163  // This administrivia gets added to the beginning of limits.h
  8164  //    if the system has its own version of limits.h.
  8165  
  8166  // We use _GCC_LIMITS_H_ because we want this not to match
  8167  //    any macros that the system's limits.h uses for its own purposes.
  8168  
  8169  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  8170  //    This file is part of the GNU C Library.
  8171  //
  8172  //    The GNU C Library is free software; you can redistribute it and/or
  8173  //    modify it under the terms of the GNU Lesser General Public
  8174  //    License as published by the Free Software Foundation; either
  8175  //    version 2.1 of the License, or (at your option) any later version.
  8176  //
  8177  //    The GNU C Library is distributed in the hope that it will be useful,
  8178  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8179  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8180  //    Lesser General Public License for more details.
  8181  //
  8182  //    You should have received a copy of the GNU Lesser General Public
  8183  //    License along with the GNU C Library; if not, see
  8184  //    <http://www.gnu.org/licenses/>.
  8185  
  8186  //	POSIX Standard: 6.5 File Control Operations	<fcntl.h>
  8187  
  8188  // Copyright (C) 1991-2018 Free Software Foundation, Inc.
  8189  //    This file is part of the GNU C Library.
  8190  //
  8191  //    The GNU C Library is free software; you can redistribute it and/or
  8192  //    modify it under the terms of the GNU Lesser General Public
  8193  //    License as published by the Free Software Foundation; either
  8194  //    version 2.1 of the License, or (at your option) any later version.
  8195  //
  8196  //    The GNU C Library is distributed in the hope that it will be useful,
  8197  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8198  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8199  //    Lesser General Public License for more details.
  8200  //
  8201  //    You should have received a copy of the GNU Lesser General Public
  8202  //    License along with the GNU C Library; if not, see
  8203  //    <http://www.gnu.org/licenses/>.
  8204  
  8205  // This must be early so <bits/fcntl.h> can define types winningly.
  8206  
  8207  // Get __mode_t, __dev_t and __off_t  .
  8208  // bits/types.h -- definitions of __*_t types underlying *_t types.
  8209  //    Copyright (C) 2002-2018 Free Software Foundation, Inc.
  8210  //    This file is part of the GNU C Library.
  8211  //
  8212  //    The GNU C Library is free software; you can redistribute it and/or
  8213  //    modify it under the terms of the GNU Lesser General Public
  8214  //    License as published by the Free Software Foundation; either
  8215  //    version 2.1 of the License, or (at your option) any later version.
  8216  //
  8217  //    The GNU C Library is distributed in the hope that it will be useful,
  8218  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8219  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8220  //    Lesser General Public License for more details.
  8221  //
  8222  //    You should have received a copy of the GNU Lesser General Public
  8223  //    License along with the GNU C Library; if not, see
  8224  //    <http://www.gnu.org/licenses/>.
  8225  
  8226  // Never include this file directly; use <sys/types.h> instead.
  8227  
  8228  // Get the definitions of O_*, F_*, FD_*: all the
  8229  //    numbers and flag bits for `open', `fcntl', et al.
  8230  // O_*, F_*, FD_* bit values for the AArch64 Linux ABI.
  8231  //    Copyright (C) 2011-2018 Free Software Foundation, Inc.
  8232  //
  8233  //    This file is part of the GNU C Library.
  8234  //
  8235  //    The GNU C Library is free software; you can redistribute it and/or
  8236  //    modify it under the terms of the GNU Lesser General Public
  8237  //    License as published by the Free Software Foundation; either
  8238  //    version 2.1 of the License, or (at your option) any later version.
  8239  //
  8240  //    The GNU C Library is distributed in the hope that it will be useful,
  8241  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8242  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8243  //    Lesser General Public License for more details.
  8244  //
  8245  //    You should have received a copy of the GNU Lesser General Public
  8246  //    License along with the GNU C Library.  If not, see
  8247  //    <http://www.gnu.org/licenses/>.
  8248  
  8249  type Flock = struct {
  8250  	Fl_type   int16
  8251  	Fl_whence int16
  8252  	_         [4]byte
  8253  	Fl_start  X__off_t
  8254  	Fl_len    X__off_t
  8255  	Fl_pid    X__pid_t
  8256  	_         [4]byte
  8257  } /* fcntl.h:40:1 */
  8258  
  8259  type Flock64 = struct {
  8260  	Fl_type   int16
  8261  	Fl_whence int16
  8262  	_         [4]byte
  8263  	Fl_start  X__off64_t
  8264  	Fl_len    X__off64_t
  8265  	Fl_pid    X__pid_t
  8266  	_         [4]byte
  8267  } /* fcntl.h:50:1 */
  8268  
  8269  // Include generic Linux declarations.
  8270  // O_*, F_*, FD_* bit values for Linux.
  8271  //    Copyright (C) 2001-2018 Free Software Foundation, Inc.
  8272  //    This file is part of the GNU C Library.
  8273  //
  8274  //    The GNU C Library is free software; you can redistribute it and/or
  8275  //    modify it under the terms of the GNU Lesser General Public
  8276  //    License as published by the Free Software Foundation; either
  8277  //    version 2.1 of the License, or (at your option) any later version.
  8278  //
  8279  //    The GNU C Library is distributed in the hope that it will be useful,
  8280  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8281  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8282  //    Lesser General Public License for more details.
  8283  //
  8284  //    You should have received a copy of the GNU Lesser General Public
  8285  //    License along with the GNU C Library; if not, see
  8286  //    <http://www.gnu.org/licenses/>.
  8287  
  8288  // This file contains shared definitions between Linux architectures
  8289  //    and is included by <bits/fcntl.h> to declare them.  The various
  8290  //    #ifndef cases allow the architecture specific file to define those
  8291  //    values with different values.
  8292  //
  8293  //    A minimal <bits/fcntl.h> contains just:
  8294  //
  8295  //    struct flock {...}
  8296  //    #ifdef __USE_LARGEFILE64
  8297  //    struct flock64 {...}
  8298  //    #endif
  8299  //    #include <bits/fcntl-linux.h>
  8300  
  8301  // open/fcntl.
  8302  
  8303  // open file description locks.
  8304  //
  8305  //    Usually record locks held by a process are released on *any* close and are
  8306  //    not inherited across a fork.
  8307  //
  8308  //    These cmd values will set locks that conflict with process-associated record
  8309  //    locks, but are "owned" by the opened file description, not the process.
  8310  //    This means that they are inherited across fork or clone with CLONE_FILES
  8311  //    like BSD (flock) locks, and they are only released automatically when the
  8312  //    last reference to the the file description against which they were acquired
  8313  //    is put.
  8314  
  8315  // For now, Linux has no separate synchronicity options for read
  8316  //    operations.  We define O_RSYNC therefore as the same as O_SYNC
  8317  //    since this is a superset.
  8318  
  8319  // Values for the second argument to `fcntl'.
  8320  
  8321  // For F_[GET|SET]FD.
  8322  
  8323  // For posix fcntl() and `l_type' field of a `struct flock' for lockf().
  8324  
  8325  // For old implementation of BSD flock.
  8326  
  8327  // Operations for BSD flock, also used by the kernel implementation.
  8328  
  8329  // Define some more compatibility macros to be backward compatible with
  8330  //    BSD systems which did not managed to hide these kernel macros.
  8331  
  8332  // Advise to `posix_fadvise'.
  8333  
  8334  // Values for `*at' functions.
  8335  
  8336  // Detect if open needs mode as a third argument (or for openat as a fourth
  8337  //    argument).
  8338  
  8339  // POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
  8340  //    Earlier POSIX standards permitted any type ending in `_t' to be defined
  8341  //    by any POSIX header, so we don't conditionalize the definitions here.
  8342  
  8343  // For XPG all symbols from <sys/stat.h> should also be available.
  8344  // NB: Include guard matches what <linux/time.h> uses.
  8345  // Copyright (C) 2011-2018 Free Software Foundation, Inc.
  8346  //    This file is part of the GNU C Library.
  8347  //    Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
  8348  //
  8349  //    The GNU C Library is free software; you can redistribute it and/or
  8350  //    modify it under the terms of the GNU Lesser General Public
  8351  //    License as published by the Free Software Foundation; either
  8352  //    version 2.1 of the License, or (at your option) any later version.
  8353  //
  8354  //    The GNU C Library is distributed in the hope that it will be useful,
  8355  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8356  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8357  //    Lesser General Public License for more details.
  8358  //
  8359  //    You should have received a copy of the GNU Lesser General Public
  8360  //    License along with the GNU C Library.  If not, see
  8361  //    <http://www.gnu.org/licenses/>.
  8362  
  8363  // Copyright (C) 1992-2018 Free Software Foundation, Inc.
  8364  //    This file is part of the GNU C Library.
  8365  //
  8366  //    The GNU C Library is free software; you can redistribute it and/or
  8367  //    modify it under the terms of the GNU Lesser General Public
  8368  //    License as published by the Free Software Foundation; either
  8369  //    version 2.1 of the License, or (at your option) any later version.
  8370  //
  8371  //    The GNU C Library is distributed in the hope that it will be useful,
  8372  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8373  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8374  //    Lesser General Public License for more details.
  8375  //
  8376  //    You should have received a copy of the GNU Lesser General Public
  8377  //    License along with the GNU C Library; if not, see
  8378  //    <http://www.gnu.org/licenses/>.
  8379  
  8380  // Determine the wordsize from the preprocessor defines.
  8381  //
  8382  //    Copyright (C) 2016-2018 Free Software Foundation, Inc.
  8383  //    This file is part of the GNU C Library.
  8384  //
  8385  //    The GNU C Library is free software; you can redistribute it and/or
  8386  //    modify it under the terms of the GNU Lesser General Public
  8387  //    License as published by the Free Software Foundation; either
  8388  //    version 2.1 of the License, or (at your option) any later version.
  8389  //
  8390  //    The GNU C Library is distributed in the hope that it will be useful,
  8391  //    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8392  //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  8393  //    Lesser General Public License for more details.
  8394  //
  8395  //    You should have received a copy of the GNU Lesser General Public
  8396  //    License along with the GNU C Library; if not, see
  8397  //    <http://www.gnu.org/licenses/>.
  8398  
  8399  // 64-bit libc uses the kernel's 'struct stat', accessed via the
  8400  //    stat() syscall; 32-bit libc uses the kernel's 'struct stat64'
  8401  //    and accesses it via the stat64() syscall.  All the various
  8402  //    APIs offered by libc use the kernel shape for their struct stat
  8403  //    structure; the only difference is that 32-bit programs not
  8404  //    using __USE_FILE_OFFSET64 only see the low 32 bits of some
  8405  //    of the fields (specifically st_ino, st_size, and st_blocks).
  8406  
  8407  // Versions of the `xmknod' interface.
  8408  
  8409  type Stat = struct {
  8410  	Fst_dev     X__dev_t
  8411  	Fst_ino     X__ino_t
  8412  	Fst_mode    X__mode_t
  8413  	Fst_nlink   X__nlink_t
  8414  	Fst_uid     X__uid_t
  8415  	Fst_gid     X__gid_t
  8416  	Fst_rdev    X__dev_t
  8417  	F__pad1     X__dev_t
  8418  	Fst_size    X__off_t
  8419  	Fst_blksize X__blksize_t
  8420  	F__pad2     int32
  8421  	Fst_blocks  X__blkcnt_t
  8422  	Fst_atim    struct {
  8423  		Ftv_sec  X__time_t
  8424  		Ftv_nsec X__syscall_slong_t
  8425  	}
  8426  	Fst_mtim struct {
  8427  		Ftv_sec  X__time_t
  8428  		Ftv_nsec X__syscall_slong_t
  8429  	}
  8430  	Fst_ctim struct {
  8431  		Ftv_sec  X__time_t
  8432  		Ftv_nsec X__syscall_slong_t
  8433  	}
  8434  	F__glibc_reserved [2]int32
  8435  } /* stat.h:55:1 */
  8436  
  8437  type Stat64 = struct {
  8438  	Fst_dev     X__dev_t
  8439  	Fst_ino     X__ino64_t
  8440  	Fst_mode    X__mode_t
  8441  	Fst_nlink   X__nlink_t
  8442  	Fst_uid     X__uid_t
  8443  	Fst_gid     X__gid_t
  8444  	Fst_rdev    X__dev_t
  8445  	F__pad1     X__dev_t
  8446  	Fst_size    X__off64_t
  8447  	Fst_blksize X__blksize_t
  8448  	F__pad2     int32
  8449  	Fst_blocks  X__blkcnt64_t
  8450  	Fst_atim    struct {
  8451  		Ftv_sec  X__time_t
  8452  		Ftv_nsec X__syscall_slong_t
  8453  	}
  8454  	Fst_mtim struct {
  8455  		Ftv_sec  X__time_t
  8456  		Ftv_nsec X__syscall_slong_t
  8457  	}
  8458  	Fst_ctim struct {
  8459  		Ftv_sec  X__time_t
  8460  		Ftv_nsec X__syscall_slong_t
  8461  	}
  8462  	F__glibc_reserved [2]int32
  8463  } /* stat.h:96:1 */
  8464  
  8465  // provide prototypes for these when building zlib without LFS
  8466  
  8467  // default memLevel
  8468  
  8469  // default i/o buffer size -- double this for output when reading (this and
  8470  //    twice this must be able to fit in an unsigned type)
  8471  
  8472  // gzip modes, also provide a little integrity check on the passed structure
  8473  
  8474  // values for gz_state how
  8475  
  8476  // internal gzip file state data structure
  8477  type Gz_state = struct {
  8478  	Fx        GzFile_s
  8479  	Fmode     int32
  8480  	Ffd       int32
  8481  	Fpath     uintptr
  8482  	Fsize     uint32
  8483  	Fwant     uint32
  8484  	Fin       uintptr
  8485  	Fout      uintptr
  8486  	Fdirect   int32
  8487  	Fhow      int32
  8488  	Fstart    Off64_t
  8489  	Feof      int32
  8490  	Fpast     int32
  8491  	Flevel    int32
  8492  	Fstrategy int32
  8493  	Fskip     Off64_t
  8494  	Fseek     int32
  8495  	Ferr      int32
  8496  	Fmsg      uintptr
  8497  	Fstrm     Z_stream
  8498  }                        /* gzguts.h:201:3 */
  8499  type Gz_statep = uintptr /* gzguts.h:202:22 */
  8500  
  8501  // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
  8502  //    value -- needed when comparing unsigned to z_off64_t, which is signed
  8503  //    (possible z_off64_t types off_t, off64_t, and long are all signed)
  8504  
  8505  // gzclose() is in a separate file so that it is linked in only if it is used.
  8506  //    That way the other gzclose functions can be used instead to avoid linking in
  8507  //    unneeded compression or decompression routines.
  8508  func Xgzclose(tls *libc.TLS, file GzFile) int32 { /* gzclose.c:11:13: */
  8509  	var state Gz_statep
  8510  
  8511  	if file == (uintptr(0)) {
  8512  		return -2
  8513  	}
  8514  	state = file
  8515  
  8516  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  8517  		return Xgzclose_r(tls, file)
  8518  	}
  8519  	return Xgzclose_w(tls, file)
  8520  }
  8521  
  8522  // Reset gzip file state
  8523  func gz_reset(tls *libc.TLS, state Gz_statep) { /* gzlib.c:75:12: */
  8524  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)  // no output data available
  8525  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // for reading ...
  8526  		(*Gz_state)(unsafe.Pointer(state)).Feof = 0    // not at end of file
  8527  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0   // have not read past end yet
  8528  		(*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK // look for gzip header
  8529  	}
  8530  	(*Gz_state)(unsafe.Pointer(state)).Fseek = 0                 // no seek request pending
  8531  	Xgz_error(tls, state, Z_OK, uintptr(0))                      // clear error
  8532  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos = int64(0)        // no uncompressed data yet
  8533  	(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0) // no input data yet
  8534  }
  8535  
  8536  // Open a gzip file either by name or file descriptor.
  8537  func gz_open(tls *libc.TLS, path uintptr, fd int32, mode uintptr) GzFile { /* gzlib.c:91:14: */
  8538  	bp := tls.Alloc(16)
  8539  	defer tls.Free(16)
  8540  
  8541  	var state Gz_statep
  8542  	var len Z_size_t
  8543  	var oflag int32
  8544  	var cloexec int32 = 0
  8545  	var exclusive int32 = 0
  8546  
  8547  	// check input
  8548  	if path == (uintptr(0)) {
  8549  		return uintptr(0)
  8550  	}
  8551  
  8552  	// allocate gzFile structure to return
  8553  	state = libc.Xmalloc(tls, uint64(unsafe.Sizeof(Gz_state{})))
  8554  	if state == (uintptr(0)) {
  8555  		return uintptr(0)
  8556  	}
  8557  	(*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0)         // no buffers allocated yet
  8558  	(*Gz_state)(unsafe.Pointer(state)).Fwant = uint32(GZBUFSIZE) // requested buffer size
  8559  	(*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0)         // no error message yet
  8560  
  8561  	// interpret mode
  8562  	(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_NONE
  8563  	(*Gz_state)(unsafe.Pointer(state)).Flevel = -1
  8564  	(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_DEFAULT_STRATEGY
  8565  	(*Gz_state)(unsafe.Pointer(state)).Fdirect = 0
  8566  	for *(*int8)(unsafe.Pointer(mode)) != 0 {
  8567  		if (int32(*(*int8)(unsafe.Pointer(mode))) >= '0') && (int32(*(*int8)(unsafe.Pointer(mode))) <= '9') {
  8568  			(*Gz_state)(unsafe.Pointer(state)).Flevel = (int32(*(*int8)(unsafe.Pointer(mode))) - '0')
  8569  		} else {
  8570  			switch int32(*(*int8)(unsafe.Pointer(mode))) {
  8571  			case 'r':
  8572  				(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_READ
  8573  				break
  8574  				fallthrough
  8575  			case 'w':
  8576  				(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE
  8577  				break
  8578  				fallthrough
  8579  			case 'a':
  8580  				(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_APPEND
  8581  				break
  8582  				fallthrough
  8583  			case '+': // can't read and write at the same time
  8584  				libc.Xfree(tls, state)
  8585  				return uintptr(0)
  8586  				fallthrough
  8587  			case 'b': // ignore -- will request binary anyway
  8588  				break
  8589  				fallthrough
  8590  			case 'e':
  8591  				cloexec = 1
  8592  				break
  8593  				fallthrough
  8594  			case 'x':
  8595  				exclusive = 1
  8596  				break
  8597  				fallthrough
  8598  			case 'f':
  8599  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FILTERED
  8600  				break
  8601  				fallthrough
  8602  			case 'h':
  8603  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_HUFFMAN_ONLY
  8604  				break
  8605  				fallthrough
  8606  			case 'R':
  8607  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_RLE
  8608  				break
  8609  				fallthrough
  8610  			case 'F':
  8611  				(*Gz_state)(unsafe.Pointer(state)).Fstrategy = Z_FIXED
  8612  				break
  8613  				fallthrough
  8614  			case 'T':
  8615  				(*Gz_state)(unsafe.Pointer(state)).Fdirect = 1
  8616  				break
  8617  				fallthrough
  8618  			default: // could consider as an error, but just ignore
  8619  
  8620  			}
  8621  		}
  8622  		mode++
  8623  	}
  8624  
  8625  	// must provide an "r", "w", or "a"
  8626  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_NONE {
  8627  		libc.Xfree(tls, state)
  8628  		return uintptr(0)
  8629  	}
  8630  
  8631  	// can't force transparent read
  8632  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  8633  		if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 {
  8634  			libc.Xfree(tls, state)
  8635  			return uintptr(0)
  8636  		}
  8637  		(*Gz_state)(unsafe.Pointer(state)).Fdirect = 1 // for empty file
  8638  	}
  8639  
  8640  	// save the path name for error messages
  8641  	len = libc.Xstrlen(tls, path)
  8642  	(*Gz_state)(unsafe.Pointer(state)).Fpath = libc.Xmalloc(tls, (len + uint64(1)))
  8643  	if (*Gz_state)(unsafe.Pointer(state)).Fpath == (uintptr(0)) {
  8644  		libc.Xfree(tls, state)
  8645  		return uintptr(0)
  8646  	}
  8647  	libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath, (len + uint64(1)), ts+76 /* "%s" */, libc.VaList(bp, path))
  8648  
  8649  	// compute the flags for open()
  8650  	oflag = ((0 | (func() int32 {
  8651  		if cloexec != 0 {
  8652  			return 02000000
  8653  		}
  8654  		return 0
  8655  	}())) | (func() int32 {
  8656  		if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  8657  			return O_RDONLY
  8658  		}
  8659  		return (((O_WRONLY | O_CREAT) | (func() int32 {
  8660  			if exclusive != 0 {
  8661  				return O_EXCL
  8662  			}
  8663  			return 0
  8664  		}())) | (func() int32 {
  8665  			if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_WRITE {
  8666  				return O_TRUNC
  8667  			}
  8668  			return O_APPEND
  8669  		}()))
  8670  	}()))
  8671  
  8672  	// open the file with the appropriate flags (or just use fd)
  8673  	(*Gz_state)(unsafe.Pointer(state)).Ffd = func() int32 {
  8674  		if fd > -1 {
  8675  			return fd
  8676  		}
  8677  		return libc.Xopen(tls, path, oflag, libc.VaList(bp+8, 0666))
  8678  	}()
  8679  	if (*Gz_state)(unsafe.Pointer(state)).Ffd == -1 {
  8680  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)
  8681  		libc.Xfree(tls, state)
  8682  		return uintptr(0)
  8683  	}
  8684  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_APPEND {
  8685  		libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_END) // so gzoffset() is correct
  8686  		(*Gz_state)(unsafe.Pointer(state)).Fmode = GZ_WRITE                            // simplify later checks
  8687  	}
  8688  
  8689  	// save the current position for rewinding (only if reading)
  8690  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  8691  		(*Gz_state)(unsafe.Pointer(state)).Fstart = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR)
  8692  		if (*Gz_state)(unsafe.Pointer(state)).Fstart == int64(-1) {
  8693  			(*Gz_state)(unsafe.Pointer(state)).Fstart = int64(0)
  8694  		}
  8695  	}
  8696  
  8697  	// initialize stream
  8698  	gz_reset(tls, state)
  8699  
  8700  	// return stream
  8701  	return state
  8702  }
  8703  
  8704  // -- see zlib.h --
  8705  func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:270:16: */
  8706  	return gz_open(tls, path, -1, mode)
  8707  }
  8708  
  8709  // -- see zlib.h --
  8710  func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) GzFile { /* gzlib.c:278:16: */
  8711  	return gz_open(tls, path, -1, mode)
  8712  }
  8713  
  8714  // -- see zlib.h --
  8715  func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) GzFile { /* gzlib.c:286:16: */
  8716  	bp := tls.Alloc(8)
  8717  	defer tls.Free(8)
  8718  
  8719  	var path uintptr // identifier for error messages
  8720  	var gz GzFile
  8721  
  8722  	if (fd == -1) || ((libc.AssignUintptr(&path, libc.Xmalloc(tls, (uint64(7)+(uint64(3)*uint64(unsafe.Sizeof(int32(0)))))))) == (uintptr(0))) {
  8723  		return uintptr(0)
  8724  	}
  8725  	libc.Xsnprintf(tls, path, (uint64(7) + (uint64(3) * uint64(unsafe.Sizeof(int32(0))))), ts+79 /* "<fd:%d>" */, libc.VaList(bp, fd))
  8726  	gz = gz_open(tls, path, fd, mode)
  8727  	libc.Xfree(tls, path)
  8728  	return gz
  8729  }
  8730  
  8731  // -- see zlib.h --
  8732  
  8733  // -- see zlib.h --
  8734  func Xgzbuffer(tls *libc.TLS, file GzFile, size uint32) int32 { /* gzlib.c:316:13: */
  8735  	var state Gz_statep
  8736  
  8737  	// get internal structure and check integrity
  8738  	if file == (uintptr(0)) {
  8739  		return -1
  8740  	}
  8741  	state = file
  8742  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) {
  8743  		return -1
  8744  	}
  8745  
  8746  	// make sure we haven't already allocated memory
  8747  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != uint32(0) {
  8748  		return -1
  8749  	}
  8750  
  8751  	// check and set requested size
  8752  	if (size << 1) < size {
  8753  		return -1
  8754  	} // need to be able to double it
  8755  	if size < uint32(2) {
  8756  		size = uint32(2)
  8757  	} // need two bytes to check magic header
  8758  	(*Gz_state)(unsafe.Pointer(state)).Fwant = size
  8759  	return 0
  8760  }
  8761  
  8762  // -- see zlib.h --
  8763  func Xgzrewind(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:343:13: */
  8764  	var state Gz_statep
  8765  
  8766  	// get internal structure
  8767  	if file == (uintptr(0)) {
  8768  		return -1
  8769  	}
  8770  	state = file
  8771  
  8772  	// check that we're reading and that there's no error
  8773  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) {
  8774  		return -1
  8775  	}
  8776  
  8777  	// back up and start over
  8778  	if libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fstart, SEEK_SET) == int64(-1) {
  8779  		return -1
  8780  	}
  8781  	gz_reset(tls, state)
  8782  	return 0
  8783  }
  8784  
  8785  // -- see zlib.h --
  8786  func Xgzseek64(tls *libc.TLS, file GzFile, offset Off64_t, whence int32) Off64_t { /* gzlib.c:366:19: */
  8787  	var n uint32
  8788  	var ret Off64_t
  8789  	var state Gz_statep
  8790  
  8791  	// get internal structure and check integrity
  8792  	if file == (uintptr(0)) {
  8793  		return int64(-1)
  8794  	}
  8795  	state = file
  8796  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) {
  8797  		return int64(-1)
  8798  	}
  8799  
  8800  	// check that there's no error
  8801  	if ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) {
  8802  		return int64(-1)
  8803  	}
  8804  
  8805  	// can only seek from start or relative to current position
  8806  	if (whence != SEEK_SET) && (whence != SEEK_CUR) {
  8807  		return int64(-1)
  8808  	}
  8809  
  8810  	// normalize offset to a SEEK_CUR specification
  8811  	if whence == SEEK_SET {
  8812  		offset = offset - ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos)
  8813  	} else if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8814  		offset = offset + ((*Gz_state)(unsafe.Pointer(state)).Fskip)
  8815  	}
  8816  	(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8817  
  8818  	// if within raw area while reading, just go there
  8819  	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)) {
  8820  		ret = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (offset - Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave)), SEEK_CUR)
  8821  		if ret == int64(-1) {
  8822  			return int64(-1)
  8823  		}
  8824  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  8825  		(*Gz_state)(unsafe.Pointer(state)).Feof = 0
  8826  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  8827  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  8828  		Xgz_error(tls, state, Z_OK, uintptr(0))
  8829  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0)
  8830  		*(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (offset)
  8831  		return (*Gz_state)(unsafe.Pointer(state)).Fx.Fpos
  8832  	}
  8833  
  8834  	// calculate skip amount, rewinding if needed for back seek when reading
  8835  	if offset < int64(0) {
  8836  		if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ { // writing -- can't go backwards
  8837  			return int64(-1)
  8838  		}
  8839  		offset = offset + ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos)
  8840  		if offset < int64(0) { // before start of file!
  8841  			return int64(-1)
  8842  		}
  8843  		if Xgzrewind(tls, file) == -1 { // rewind, then skip to offset
  8844  			return int64(-1)
  8845  		}
  8846  	}
  8847  
  8848  	// if reading, skip what's in output buffer (one less gzgetc() check)
  8849  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  8850  		if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > offset) {
  8851  			n = uint32(offset)
  8852  		} else {
  8853  			n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  8854  		}
  8855  		*(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n)
  8856  		*(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n))
  8857  		*(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n))
  8858  		offset = offset - (Off64_t(n))
  8859  	}
  8860  
  8861  	// request skip (if not zero)
  8862  	if offset != 0 {
  8863  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 1
  8864  		(*Gz_state)(unsafe.Pointer(state)).Fskip = offset
  8865  	}
  8866  	return ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + offset)
  8867  }
  8868  
  8869  // -- see zlib.h --
  8870  func Xgzseek(tls *libc.TLS, file GzFile, offset Off_t, whence int32) Off_t { /* gzlib.c:443:17: */
  8871  	var ret Off64_t
  8872  
  8873  	ret = Xgzseek64(tls, file, offset, whence)
  8874  	if ret == ret {
  8875  		return ret
  8876  	}
  8877  	return int64(-1)
  8878  }
  8879  
  8880  // -- see zlib.h --
  8881  func Xgztell64(tls *libc.TLS, file GzFile) Off64_t { /* gzlib.c:455:19: */
  8882  	var state Gz_statep
  8883  
  8884  	// get internal structure and check integrity
  8885  	if file == (uintptr(0)) {
  8886  		return int64(-1)
  8887  	}
  8888  	state = file
  8889  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) {
  8890  		return int64(-1)
  8891  	}
  8892  
  8893  	// return position
  8894  	return ((*Gz_state)(unsafe.Pointer(state)).Fx.Fpos + (func() int64 {
  8895  		if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  8896  			return (*Gz_state)(unsafe.Pointer(state)).Fskip
  8897  		}
  8898  		return int64(0)
  8899  	}()))
  8900  }
  8901  
  8902  // -- see zlib.h --
  8903  func Xgztell(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:472:17: */
  8904  	var ret Off64_t
  8905  
  8906  	ret = Xgztell64(tls, file)
  8907  	if ret == ret {
  8908  		return ret
  8909  	}
  8910  	return int64(-1)
  8911  }
  8912  
  8913  // -- see zlib.h --
  8914  func Xgzoffset64(tls *libc.TLS, file GzFile) Off64_t { /* gzlib.c:482:19: */
  8915  	var offset Off64_t
  8916  	var state Gz_statep
  8917  
  8918  	// get internal structure and check integrity
  8919  	if file == (uintptr(0)) {
  8920  		return int64(-1)
  8921  	}
  8922  	state = file
  8923  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) {
  8924  		return int64(-1)
  8925  	}
  8926  
  8927  	// compute and return effective offset in file
  8928  	offset = libc.Xlseek64(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, int64(0), SEEK_CUR)
  8929  	if offset == int64(-1) {
  8930  		return int64(-1)
  8931  	}
  8932  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ { // reading
  8933  		offset = offset - (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in))
  8934  	} // don't count buffered input
  8935  	return offset
  8936  }
  8937  
  8938  // -- see zlib.h --
  8939  func Xgzoffset(tls *libc.TLS, file GzFile) Off_t { /* gzlib.c:505:17: */
  8940  	var ret Off64_t
  8941  
  8942  	ret = Xgzoffset64(tls, file)
  8943  	if ret == ret {
  8944  		return ret
  8945  	}
  8946  	return int64(-1)
  8947  }
  8948  
  8949  // -- see zlib.h --
  8950  func Xgzeof(tls *libc.TLS, file GzFile) int32 { /* gzlib.c:515:13: */
  8951  	var state Gz_statep
  8952  
  8953  	// get internal structure and check integrity
  8954  	if file == (uintptr(0)) {
  8955  		return 0
  8956  	}
  8957  	state = file
  8958  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) {
  8959  		return 0
  8960  	}
  8961  
  8962  	// return end-of-file state
  8963  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  8964  		return (*Gz_state)(unsafe.Pointer(state)).Fpast
  8965  	}
  8966  	return 0
  8967  }
  8968  
  8969  // -- see zlib.h --
  8970  func Xgzerror(tls *libc.TLS, file GzFile, errnum uintptr) uintptr { /* gzlib.c:532:12: */
  8971  	var state Gz_statep
  8972  
  8973  	// get internal structure and check integrity
  8974  	if file == (uintptr(0)) {
  8975  		return uintptr(0)
  8976  	}
  8977  	state = file
  8978  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) {
  8979  		return uintptr(0)
  8980  	}
  8981  
  8982  	// return error information
  8983  	if errnum != (uintptr(0)) {
  8984  		*(*int32)(unsafe.Pointer(errnum)) = (*Gz_state)(unsafe.Pointer(state)).Ferr
  8985  	}
  8986  	if (*Gz_state)(unsafe.Pointer(state)).Ferr == (-4) {
  8987  		return ts + 87 /* "out of memory" */
  8988  	}
  8989  	return func() uintptr {
  8990  		if (*Gz_state)(unsafe.Pointer(state)).Fmsg == (uintptr(0)) {
  8991  			return ts + 101 /* "" */
  8992  		}
  8993  		return (*Gz_state)(unsafe.Pointer(state)).Fmsg
  8994  	}()
  8995  }
  8996  
  8997  // -- see zlib.h --
  8998  func Xgzclearerr(tls *libc.TLS, file GzFile) { /* gzlib.c:553:14: */
  8999  	var state Gz_statep
  9000  
  9001  	// get internal structure and check integrity
  9002  	if file == (uintptr(0)) {
  9003  		return
  9004  	}
  9005  	state = file
  9006  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) && ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) {
  9007  		return
  9008  	}
  9009  
  9010  	// clear error and end-of-file
  9011  	if (*Gz_state)(unsafe.Pointer(state)).Fmode == GZ_READ {
  9012  		(*Gz_state)(unsafe.Pointer(state)).Feof = 0
  9013  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  9014  	}
  9015  	Xgz_error(tls, state, Z_OK, uintptr(0))
  9016  }
  9017  
  9018  // Create an error message in allocated memory and set state->err and
  9019  //    state->msg accordingly.  Free any previous error message already there.  Do
  9020  //    not try to free or allocate space if the error is Z_MEM_ERROR (out of
  9021  //    memory).  Simply save the error message as a static string.  If there is an
  9022  //    allocation failure constructing the error message, then convert the error to
  9023  //    out of memory.
  9024  func Xgz_error(tls *libc.TLS, state Gz_statep, err int32, msg uintptr) { /* gzlib.c:579:20: */
  9025  	bp := tls.Alloc(24)
  9026  	defer tls.Free(24)
  9027  
  9028  	// free previously allocated message and clear
  9029  	if (*Gz_state)(unsafe.Pointer(state)).Fmsg != (uintptr(0)) {
  9030  		if (*Gz_state)(unsafe.Pointer(state)).Ferr != (-4) {
  9031  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg)
  9032  		}
  9033  		(*Gz_state)(unsafe.Pointer(state)).Fmsg = uintptr(0)
  9034  	}
  9035  
  9036  	// if fatal, set state->x.have to 0 so that the gzgetc() macro fails
  9037  	if (err != Z_OK) && (err != (-5)) {
  9038  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  9039  	}
  9040  
  9041  	// set error code, and if no message, then done
  9042  	(*Gz_state)(unsafe.Pointer(state)).Ferr = err
  9043  	if msg == (uintptr(0)) {
  9044  		return
  9045  	}
  9046  
  9047  	// for an out of memory error, return literal string when requested
  9048  	if err == (-4) {
  9049  		return
  9050  	}
  9051  
  9052  	// construct error message with path
  9053  	if (libc.AssignPtrUintptr(state+112 /* &.msg */, libc.Xmalloc(tls, ((libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg))+uint64(3))))) == (uintptr(0)) {
  9054  		(*Gz_state)(unsafe.Pointer(state)).Ferr = -4
  9055  		return
  9056  	}
  9057  	libc.Xsnprintf(tls, (*Gz_state)(unsafe.Pointer(state)).Fmsg, ((libc.Xstrlen(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath) + libc.Xstrlen(tls, msg)) + uint64(3)),
  9058  		ts+102 /* "%s%s%s" */, libc.VaList(bp, (*Gz_state)(unsafe.Pointer(state)).Fpath, ts+109 /* ": " */, msg))
  9059  }
  9060  
  9061  // Use read() to load a buffer -- return -1 on error, otherwise 0.  Read from
  9062  //    state->fd, and update state->eof, state->err, and state->msg as appropriate.
  9063  //    This function needs to loop on read(), since read() is not guaranteed to
  9064  //    read the number of bytes requested, depending on the type of descriptor.
  9065  func gz_load(tls *libc.TLS, state Gz_statep, buf uintptr, len uint32, have uintptr) int32 { /* gzread.c:21:11: */
  9066  	var ret int32
  9067  	var get uint32
  9068  	var max uint32 = ((uint32(libc.Uint32(libc.Uint32FromInt32(-1))) >> 2) + uint32(1))
  9069  
  9070  	*(*uint32)(unsafe.Pointer(have)) = uint32(0)
  9071  	for ok := true; ok; ok = (*(*uint32)(unsafe.Pointer(have)) < len) {
  9072  		get = (len - *(*uint32)(unsafe.Pointer(have)))
  9073  		if get > max {
  9074  			get = max
  9075  		}
  9076  		ret = int32(libc.Xread(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (buf + uintptr(*(*uint32)(unsafe.Pointer(have)))), uint64(get)))
  9077  		if ret <= 0 {
  9078  			break
  9079  		}
  9080  		*(*uint32)(unsafe.Pointer(have)) += (uint32(ret))
  9081  	}
  9082  	if ret < 0 {
  9083  		Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))))
  9084  		return -1
  9085  	}
  9086  	if ret == 0 {
  9087  		(*Gz_state)(unsafe.Pointer(state)).Feof = 1
  9088  	}
  9089  	return 0
  9090  }
  9091  
  9092  // Load up input buffer and set eof flag if last data loaded -- return -1 on
  9093  //    error, 0 otherwise.  Note that the eof flag is set when the end of the input
  9094  //    file is reached, even though there may be unused data in the buffer.  Once
  9095  //    that data has been used, no more attempts will be made to read the file.
  9096  //    If strm->avail_in != 0, then the current data is moved to the beginning of
  9097  //    the input buffer, and then the remainder of the buffer is loaded with the
  9098  //    available data from the input file.
  9099  func gz_avail(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:56:11: */
  9100  	bp := tls.Alloc(4)
  9101  	defer tls.Free(4)
  9102  
  9103  	// var got uint32 at bp, 4
  9104  
  9105  	var strm Z_streamp = (state + 120 /* &.strm */)
  9106  
  9107  	if ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) {
  9108  		return -1
  9109  	}
  9110  	if (*Gz_state)(unsafe.Pointer(state)).Feof == 0 {
  9111  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 { // copy what's there to the start
  9112  			var p uintptr = (*Gz_state)(unsafe.Pointer(state)).Fin
  9113  			var q uintptr = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
  9114  			var n uint32 = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  9115  			for ok := true; ok; ok = libc.PreDecUint32(&n, 1) != 0 {
  9116  				*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&q, 1)))
  9117  			}
  9118  		}
  9119  		if gz_load(tls, state, ((*Gz_state)(unsafe.Pointer(state)).Fin+uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in)),
  9120  			((*Gz_state)(unsafe.Pointer(state)).Fsize-(*Z_stream)(unsafe.Pointer(strm)).Favail_in), bp /* &got */) == -1 {
  9121  			return -1
  9122  		}
  9123  		*(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) += (*(*uint32)(unsafe.Pointer(bp /* got */)))
  9124  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  9125  	}
  9126  	return 0
  9127  }
  9128  
  9129  // Look for gzip header, set up for inflate or copy.  state->x.have must be 0.
  9130  //    If this is the first time in, allocate required memory.  state->how will be
  9131  //    left unchanged if there is no more input data available, will be set to COPY
  9132  //    if there is no gzip header and direct copying will be performed, or it will
  9133  //    be set to GZIP for decompression.  If direct copying, then leftover input
  9134  //    data from the input buffer will be copied to the output buffer.  In that
  9135  //    case, all further file reads will be directly to either the output buffer or
  9136  //    a user buffer.  If decompressing, the inflate state will be initialized.
  9137  //    gz_look() will return 0 on success or -1 on failure.
  9138  func gz_look(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:91:11: */
  9139  	var strm Z_streamp = (state + 120 /* &.strm */)
  9140  
  9141  	// allocate read buffers and inflate memory
  9142  	if (*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0) {
  9143  		// allocate buffers
  9144  		(*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant))
  9145  		(*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, (uint64((*Gz_state)(unsafe.Pointer(state)).Fwant << 1)))
  9146  		if ((*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0))) || ((*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0))) {
  9147  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  9148  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  9149  			Xgz_error(tls, state, -4, ts+87 /* "out of memory" */)
  9150  			return -1
  9151  		}
  9152  		(*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant
  9153  
  9154  		// allocate inflate memory
  9155  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzalloc = Alloc_func(Z_NULL)
  9156  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fzfree = Free_func(Z_NULL)
  9157  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fopaque = Voidpf(Z_NULL)
  9158  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = UInt(0)
  9159  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = uintptr(Z_NULL)
  9160  		if (XinflateInit2_(tls, (state+120 /* &.strm */), (15+16), ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{}))) != Z_OK) { // gunzip
  9161  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  9162  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  9163  			(*Gz_state)(unsafe.Pointer(state)).Fsize = uint32(0)
  9164  			Xgz_error(tls, state, -4, ts+87 /* "out of memory" */)
  9165  			return -1
  9166  		}
  9167  	}
  9168  
  9169  	// get at least the magic bytes in the input buffer
  9170  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in < UInt(2) {
  9171  		if gz_avail(tls, state) == -1 {
  9172  			return -1
  9173  		}
  9174  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
  9175  			return 0
  9176  		}
  9177  	}
  9178  
  9179  	// look for gzip magic bytes -- if there, do gzip decoding (note: there is
  9180  	//        a logical dilemma here when considering the case of a partially written
  9181  	//        gzip file, to wit, if a single 31 byte is written, then we cannot tell
  9182  	//        whether this is a single-byte file, or just a partially written gzip
  9183  	//        file -- for here we assume that if a gzip file is being written, then
  9184  	//        the header will be written in a single operation, so that reading a
  9185  	//        single byte is sufficient indication that it is not a gzip file)
  9186  	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) {
  9187  		XinflateReset(tls, strm)
  9188  		(*Gz_state)(unsafe.Pointer(state)).Fhow = /* GZIP */ 2
  9189  		(*Gz_state)(unsafe.Pointer(state)).Fdirect = 0
  9190  		return 0
  9191  	}
  9192  
  9193  	// no gzip header -- if we were decoding gzip before, then this is trailing
  9194  	//        garbage.  Ignore the trailing garbage and finish.
  9195  	if (*Gz_state)(unsafe.Pointer(state)).Fdirect == 0 {
  9196  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0)
  9197  		(*Gz_state)(unsafe.Pointer(state)).Feof = 1
  9198  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  9199  		return 0
  9200  	}
  9201  
  9202  	// doing raw i/o, copy any leftover input to output -- this assumes that
  9203  	//        the output buffer is larger than the input buffer, which also assures
  9204  	//        space for gzungetc()
  9205  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout
  9206  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 {
  9207  		libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64((*Z_stream)(unsafe.Pointer(strm)).Favail_in))
  9208  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  9209  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = UInt(0)
  9210  	}
  9211  	(*Gz_state)(unsafe.Pointer(state)).Fhow = COPY1
  9212  	(*Gz_state)(unsafe.Pointer(state)).Fdirect = 1
  9213  	return 0
  9214  }
  9215  
  9216  // Decompress from input to the provided next_out and avail_out in the state.
  9217  //    On return, state->x.have and state->x.next point to the just decompressed
  9218  //    data.  If the gzip stream completes, state->how is reset to LOOK to look for
  9219  //    the next gzip stream or raw data, once state->x.have is depleted.  Returns 0
  9220  //    on success, -1 on failure.
  9221  func gz_decomp(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:175:11: */
  9222  	var ret int32 = Z_OK
  9223  	var had uint32
  9224  	var strm Z_streamp = (state + 120 /* &.strm */)
  9225  
  9226  	// fill output buffer up to end of deflate stream
  9227  	had = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  9228  	for ok := true; ok; ok = (((*Z_stream)(unsafe.Pointer(strm)).Favail_out != 0) && (ret != Z_STREAM_END)) {
  9229  		// get more input for inflate()
  9230  		if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && (gz_avail(tls, state) == -1) {
  9231  			return -1
  9232  		}
  9233  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
  9234  			Xgz_error(tls, state, -5, ts+112 /* "unexpected end o..." */)
  9235  			break
  9236  		}
  9237  
  9238  		// decompress and handle errors
  9239  		ret = Xinflate(tls, strm, Z_NO_FLUSH)
  9240  		if (ret == (-2)) || (ret == Z_NEED_DICT) {
  9241  			Xgz_error(tls, state, -2,
  9242  				ts+135 /* "internal error: ..." */)
  9243  			return -1
  9244  		}
  9245  		if ret == (-4) {
  9246  			Xgz_error(tls, state, -4, ts+87 /* "out of memory" */)
  9247  			return -1
  9248  		}
  9249  		if ret == (-3) { // deflate stream invalid
  9250  			Xgz_error(tls, state, -3,
  9251  				func() uintptr {
  9252  					if (*Z_stream)(unsafe.Pointer(strm)).Fmsg == (uintptr(0)) {
  9253  						return ts + 174 /* "compressed data ..." */
  9254  					}
  9255  					return (*Z_stream)(unsafe.Pointer(strm)).Fmsg
  9256  				}())
  9257  			return -1
  9258  		}
  9259  	}
  9260  
  9261  	// update available output
  9262  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = (had - (*Z_stream)(unsafe.Pointer(strm)).Favail_out)
  9263  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave))
  9264  
  9265  	// if the gzip stream completed successfully, look for another
  9266  	if ret == Z_STREAM_END {
  9267  		(*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK
  9268  	}
  9269  
  9270  	// good decompression
  9271  	return 0
  9272  }
  9273  
  9274  // Fetch data and put it in the output buffer.  Assumes state->x.have is 0.
  9275  //    Data is either copied from the input file or decompressed from the input
  9276  //    file depending on state->how.  If state->how is LOOK, then a gzip header is
  9277  //    looked for to determine whether to copy or decompress.  Returns -1 on error,
  9278  //    otherwise 0.  gz_fetch() will leave state->how as COPY or GZIP unless the
  9279  //    end of the input file has been reached and all data has been processed.
  9280  func gz_fetch(tls *libc.TLS, state Gz_statep) int32 { /* gzread.c:229:11: */
  9281  	var strm Z_streamp = (state + 120 /* &.strm */)
  9282  
  9283  	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))) {
  9284  		switch (*Gz_state)(unsafe.Pointer(state)).Fhow {
  9285  		case LOOK: // -> LOOK, COPY (only if never GZIP), or GZIP
  9286  			if gz_look(tls, state) == -1 {
  9287  				return -1
  9288  			}
  9289  			if (*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK {
  9290  				return 0
  9291  			}
  9292  			break
  9293  		case COPY1: // -> COPY
  9294  			if gz_load(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fout, ((*Gz_state)(unsafe.Pointer(state)).Fsize<<1), (state /* &.x */ /* &.have */)) ==
  9295  				-1 {
  9296  				return -1
  9297  			}
  9298  			(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout
  9299  			return 0
  9300  		case /* GZIP */ 2: // -> GZIP or LOOK (if end of gzip stream)
  9301  			(*Z_stream)(unsafe.Pointer(strm)).Favail_out = ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1)
  9302  			(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout
  9303  			if gz_decomp(tls, state) == -1 {
  9304  				return -1
  9305  			}
  9306  		}
  9307  	}
  9308  	return 0
  9309  }
  9310  
  9311  // Skip len uncompressed bytes of output.  Return -1 on error, 0 on success.
  9312  func gz_skip(tls *libc.TLS, state Gz_statep, len Off64_t) int32 { /* gzread.c:259:11: */
  9313  	var n uint32
  9314  
  9315  	// skip over len bytes or reach end-of-file, whichever comes first
  9316  	for len != 0 {
  9317  		// skip over whatever is in output buffer
  9318  		if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 {
  9319  			if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave) > len) {
  9320  				n = uint32(len)
  9321  			} else {
  9322  				n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  9323  			}
  9324  			*(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n)
  9325  			*(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n))
  9326  			*(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n))
  9327  			len = len - (Off64_t(n))
  9328  		} else if ((*Gz_state)(unsafe.Pointer(state)).Feof != 0) && ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0)) {
  9329  			break
  9330  		} else {
  9331  			// get more output, looking for header if required
  9332  			if gz_fetch(tls, state) == -1 {
  9333  				return -1
  9334  			}
  9335  		}
  9336  	}
  9337  	return 0
  9338  }
  9339  
  9340  // Read len bytes into buf from file, or less than len up to the end of the
  9341  //    input.  Return the number of bytes read.  If zero is returned, either the
  9342  //    end of file was reached, or there was an error.  state->err must be
  9343  //    consulted in that case to determine which.
  9344  func gz_read(tls *libc.TLS, state Gz_statep, buf Voidp, len Z_size_t) Z_size_t { /* gzread.c:294:16: */
  9345  	bp := tls.Alloc(4)
  9346  	defer tls.Free(4)
  9347  
  9348  	var got Z_size_t
  9349  	// var n uint32 at bp, 4
  9350  
  9351  	// if len is zero, avoid unnecessary operations
  9352  	if len == uint64(0) {
  9353  		return uint64(0)
  9354  	}
  9355  
  9356  	// process a skip request
  9357  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  9358  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  9359  		if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  9360  			return uint64(0)
  9361  		}
  9362  	}
  9363  
  9364  	// get len bytes to buf, or less than len if at the end
  9365  	got = uint64(0)
  9366  	for ok := true; ok; ok = len != 0 {
  9367  		// set n to the maximum amount of len that fits in an unsigned int
  9368  		*(*uint32)(unsafe.Pointer(bp /* n */)) = libc.Uint32FromInt32(-1)
  9369  		if Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */))) > len {
  9370  			*(*uint32)(unsafe.Pointer(bp /* n */)) = uint32(len)
  9371  		}
  9372  
  9373  		// first just try copying data from the output buffer
  9374  		if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 {
  9375  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave < *(*uint32)(unsafe.Pointer(bp /* n */)) {
  9376  				*(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  9377  			}
  9378  			libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(*(*uint32)(unsafe.Pointer(bp /* n */))))
  9379  			*(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(*(*uint32)(unsafe.Pointer(bp /* n */))))
  9380  			*(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (*(*uint32)(unsafe.Pointer(bp /* n */)))
  9381  		} else if ((*Gz_state)(unsafe.Pointer(state)).Feof != 0) && ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0)) {
  9382  			(*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // tried to read past end
  9383  			break
  9384  		} else if ((*Gz_state)(unsafe.Pointer(state)).Fhow == LOOK) || (*(*uint32)(unsafe.Pointer(bp /* n */)) < ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1)) {
  9385  			// get more output, looking for header if required
  9386  			if gz_fetch(tls, state) == -1 {
  9387  				return uint64(0)
  9388  			}
  9389  			continue // no progress yet -- go back to copy above
  9390  			// the copy above assures that we will leave with space in the
  9391  			//                output buffer, allowing at least one gzungetc() to succeed
  9392  		} else if (*Gz_state)(unsafe.Pointer(state)).Fhow == COPY1 { // read directly
  9393  			if gz_load(tls, state, buf, *(*uint32)(unsafe.Pointer(bp /* n */)), bp /* &n */) == -1 {
  9394  				return uint64(0)
  9395  			}
  9396  		} else { // state->how == GZIP
  9397  			(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_out = *(*uint32)(unsafe.Pointer(bp /* n */))
  9398  			(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_out = buf
  9399  			if gz_decomp(tls, state) == -1 {
  9400  				return uint64(0)
  9401  			}
  9402  			*(*uint32)(unsafe.Pointer(bp /* n */)) = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  9403  			(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0)
  9404  		}
  9405  
  9406  		// update progress
  9407  		len = len - (Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */))))
  9408  		buf = (buf + uintptr(*(*uint32)(unsafe.Pointer(bp /* n */))))
  9409  		got = got + (Z_size_t(*(*uint32)(unsafe.Pointer(bp /* n */))))
  9410  		*(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(*(*uint32)(unsafe.Pointer(bp /* n */))))
  9411  	}
  9412  
  9413  	// return number of bytes read into user buffer
  9414  	return got
  9415  }
  9416  
  9417  // -- see zlib.h --
  9418  func Xgzread(tls *libc.TLS, file GzFile, buf Voidp, len uint32) int32 { /* gzread.c:375:13: */
  9419  	var state Gz_statep
  9420  
  9421  	// get internal structure
  9422  	if file == (uintptr(0)) {
  9423  		return -1
  9424  	}
  9425  	state = file
  9426  
  9427  	// check that we're reading and that there's no (serious) error
  9428  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) {
  9429  		return -1
  9430  	}
  9431  
  9432  	// since an int is returned, make sure len fits in one, otherwise return
  9433  	//        with an error (this avoids a flaw in the interface)
  9434  	if int32(len) < 0 {
  9435  		Xgz_error(tls, state, -2, ts+196 /* "request does not..." */)
  9436  		return -1
  9437  	}
  9438  
  9439  	// read len or fewer bytes to buf
  9440  	len = uint32(gz_read(tls, state, buf, uint64(len)))
  9441  
  9442  	// check for an error
  9443  	if ((len == uint32(0)) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK)) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5)) {
  9444  		return -1
  9445  	}
  9446  
  9447  	// return the number of bytes read (this is assured to fit in an int)
  9448  	return int32(len)
  9449  }
  9450  
  9451  // -- see zlib.h --
  9452  func Xgzfread(tls *libc.TLS, buf Voidp, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzread.c:411:18: */
  9453  	var len Z_size_t
  9454  	var state Gz_statep
  9455  
  9456  	// get internal structure
  9457  	if file == (uintptr(0)) {
  9458  		return uint64(0)
  9459  	}
  9460  	state = file
  9461  
  9462  	// check that we're reading and that there's no (serious) error
  9463  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) {
  9464  		return uint64(0)
  9465  	}
  9466  
  9467  	// compute bytes to read -- error on overflow
  9468  	len = (nitems * size)
  9469  	if (size != 0) && ((len / size) != nitems) {
  9470  		Xgz_error(tls, state, -2, ts+227 /* "request does not..." */)
  9471  		return uint64(0)
  9472  	}
  9473  
  9474  	// read len or fewer bytes to buf, return the number of full items read
  9475  	if len != 0 {
  9476  		return (gz_read(tls, state, buf, len) / size)
  9477  	}
  9478  	return uint64(0)
  9479  }
  9480  
  9481  // -- see zlib.h --
  9482  func Xgzgetc(tls *libc.TLS, file GzFile) int32 { /* gzread.c:447:13: */
  9483  	bp := tls.Alloc(1)
  9484  	defer tls.Free(1)
  9485  
  9486  	var ret int32
  9487  	// var buf [1]uint8 at bp, 1
  9488  
  9489  	var state Gz_statep
  9490  
  9491  	// get internal structure
  9492  	if file == (uintptr(0)) {
  9493  		return -1
  9494  	}
  9495  	state = file
  9496  
  9497  	// check that we're reading and that there's no (serious) error
  9498  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) {
  9499  		return -1
  9500  	}
  9501  
  9502  	// try output buffer (no need to check for skip request)
  9503  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 {
  9504  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave--
  9505  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++
  9506  		return int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext), 1))))
  9507  	}
  9508  
  9509  	// nothing there -- try gz_read()
  9510  	ret = int32(gz_read(tls, state, bp /* &buf[0] */, uint64(1)))
  9511  	if ret < 1 {
  9512  		return -1
  9513  	}
  9514  	return int32(*(*uint8)(unsafe.Pointer(bp /* &buf[0] */)))
  9515  }
  9516  
  9517  func Xgzgetc_(tls *libc.TLS, file GzFile) int32 { /* gzread.c:476:13: */
  9518  	return Xgzgetc(tls, file)
  9519  }
  9520  
  9521  // -- see zlib.h --
  9522  func Xgzungetc(tls *libc.TLS, c int32, file GzFile) int32 { /* gzread.c:483:13: */
  9523  	var state Gz_statep
  9524  
  9525  	// get internal structure
  9526  	if file == (uintptr(0)) {
  9527  		return -1
  9528  	}
  9529  	state = file
  9530  
  9531  	// check that we're reading and that there's no (serious) error
  9532  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) {
  9533  		return -1
  9534  	}
  9535  
  9536  	// process a skip request
  9537  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  9538  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  9539  		if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  9540  			return -1
  9541  		}
  9542  	}
  9543  
  9544  	// can't push EOF
  9545  	if c < 0 {
  9546  		return -1
  9547  	}
  9548  
  9549  	// if output buffer empty, put byte at end (allows more pushing)
  9550  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) {
  9551  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(1)
  9552  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize << 1))) - uintptr(1))
  9553  		*(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c)
  9554  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos--
  9555  		(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  9556  		return c
  9557  	}
  9558  
  9559  	// if no room, give up (must have already done a gzungetc())
  9560  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == ((*Gz_state)(unsafe.Pointer(state)).Fsize << 1) {
  9561  		Xgz_error(tls, state, -3, ts+260 /* "out of room to p..." */)
  9562  		return -1
  9563  	}
  9564  
  9565  	// slide output data if needed and insert byte before existing data
  9566  	if (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext == (*Gz_state)(unsafe.Pointer(state)).Fout {
  9567  		var src uintptr = ((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave))
  9568  		var dest uintptr = ((*Gz_state)(unsafe.Pointer(state)).Fout + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize << 1)))
  9569  		for src > (*Gz_state)(unsafe.Pointer(state)).Fout {
  9570  			*(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&dest, 1))) = *(*uint8)(unsafe.Pointer(libc.PreDecUintptr(&src, 1)))
  9571  		}
  9572  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = dest
  9573  	}
  9574  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fhave++
  9575  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext--
  9576  	*(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) = uint8(c)
  9577  	(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos--
  9578  	(*Gz_state)(unsafe.Pointer(state)).Fpast = 0
  9579  	return c
  9580  }
  9581  
  9582  // -- see zlib.h --
  9583  func Xgzgets(tls *libc.TLS, file GzFile, buf uintptr, len int32) uintptr { /* gzread.c:543:6: */
  9584  	var left uint32
  9585  	var n uint32
  9586  	var str uintptr
  9587  	var eol uintptr
  9588  	var state Gz_statep
  9589  
  9590  	// check parameters and get internal structure
  9591  	if ((file == (uintptr(0))) || (buf == (uintptr(0)))) || (len < 1) {
  9592  		return uintptr(0)
  9593  	}
  9594  	state = file
  9595  
  9596  	// check that we're reading and that there's no (serious) error
  9597  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ) || (((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) && ((*Gz_state)(unsafe.Pointer(state)).Ferr != (-5))) {
  9598  		return uintptr(0)
  9599  	}
  9600  
  9601  	// process a skip request
  9602  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  9603  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  9604  		if gz_skip(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  9605  			return uintptr(0)
  9606  		}
  9607  	}
  9608  
  9609  	// copy output bytes up to new line or len - 1, whichever comes first --
  9610  	//        append a terminating zero to the string (we don't check for a zero in
  9611  	//        the contents, let the user worry about that)
  9612  	str = buf
  9613  	left = (uint32(len) - uint32(1))
  9614  	if left != 0 {
  9615  		for ok := true; ok; ok = ((left != 0) && (eol == (uintptr(0)))) {
  9616  			// assure that something is in the output buffer
  9617  			if ((*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0)) && (gz_fetch(tls, state) == -1) {
  9618  				return uintptr(0)
  9619  			} // error
  9620  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { // end of file
  9621  				(*Gz_state)(unsafe.Pointer(state)).Fpast = 1 // read past end
  9622  				break                                        // return what we have
  9623  			}
  9624  
  9625  			// look for end-of-line in current output buffer
  9626  			if (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave > left {
  9627  				n = left
  9628  			} else {
  9629  				n = (*Gz_state)(unsafe.Pointer(state)).Fx.Fhave
  9630  			}
  9631  			eol = libc.Xmemchr(tls, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, '\n', uint64(n))
  9632  			if eol != (uintptr(0)) {
  9633  				n = ((uint32((int64(eol) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1)) + uint32(1))
  9634  			}
  9635  
  9636  			// copy through end-of-line, or remainder if not found
  9637  			libc.Xmemcpy(tls, buf, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(n))
  9638  			*(*uint32)(unsafe.Pointer(state /* &.x */ /* &.have */)) -= (n)
  9639  			*(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(n))
  9640  			*(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n))
  9641  			left = left - (n)
  9642  			buf += uintptr(n)
  9643  		}
  9644  	}
  9645  
  9646  	// return terminated string, or if nothing, end of file
  9647  	if buf == str {
  9648  		return uintptr(0)
  9649  	}
  9650  	*(*int8)(unsafe.Pointer(buf)) = int8(0)
  9651  	return str
  9652  }
  9653  
  9654  // -- see zlib.h --
  9655  func Xgzdirect(tls *libc.TLS, file GzFile) int32 { /* gzread.c:607:13: */
  9656  	var state Gz_statep
  9657  
  9658  	// get internal structure
  9659  	if file == (uintptr(0)) {
  9660  		return 0
  9661  	}
  9662  	state = file
  9663  
  9664  	// if the state is not known, but we can find out, then do so (this is
  9665  	//        mainly for right after a gzopen() or gzdopen())
  9666  	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)) {
  9667  		gz_look(tls, state)
  9668  	}
  9669  
  9670  	// return 1 if transparent, 0 if processing a gzip stream
  9671  	return (*Gz_state)(unsafe.Pointer(state)).Fdirect
  9672  }
  9673  
  9674  // -- see zlib.h --
  9675  func Xgzclose_r(tls *libc.TLS, file GzFile) int32 { /* gzread.c:627:13: */
  9676  	var ret int32
  9677  	var err int32
  9678  	var state Gz_statep
  9679  
  9680  	// get internal structure
  9681  	if file == (uintptr(0)) {
  9682  		return -2
  9683  	}
  9684  	state = file
  9685  
  9686  	// check that we're reading
  9687  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_READ {
  9688  		return -2
  9689  	}
  9690  
  9691  	// free memory and close file
  9692  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
  9693  		XinflateEnd(tls, (state + 120 /* &.strm */))
  9694  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  9695  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  9696  	}
  9697  	if (*Gz_state)(unsafe.Pointer(state)).Ferr == (-5) {
  9698  		err = -5
  9699  	} else {
  9700  		err = Z_OK
  9701  	}
  9702  	Xgz_error(tls, state, Z_OK, uintptr(0))
  9703  	libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)
  9704  	ret = libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd)
  9705  	libc.Xfree(tls, state)
  9706  	if ret != 0 {
  9707  		return -1
  9708  	}
  9709  	return err
  9710  }
  9711  
  9712  // Initialize state for writing a gzip file.  Mark initialization by setting
  9713  //    state->size to non-zero.  Return -1 on a memory allocation failure, or 0 on
  9714  //    success.
  9715  func gz_init(tls *libc.TLS, state Gz_statep) int32 { /* gzwrite.c:17:11: */
  9716  	var ret int32
  9717  	var strm Z_streamp = (state + 120 /* &.strm */)
  9718  
  9719  	// allocate input buffer (double size for gzprintf)
  9720  	(*Gz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, (uint64((*Gz_state)(unsafe.Pointer(state)).Fwant << 1)))
  9721  	if (*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0)) {
  9722  		Xgz_error(tls, state, -4, ts+87 /* "out of memory" */)
  9723  		return -1
  9724  	}
  9725  
  9726  	// only need output buffer and deflate state if compressing
  9727  	if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) {
  9728  		// allocate output buffer
  9729  		(*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, uint64((*Gz_state)(unsafe.Pointer(state)).Fwant))
  9730  		if (*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0)) {
  9731  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  9732  			Xgz_error(tls, state, -4, ts+87 /* "out of memory" */)
  9733  			return -1
  9734  		}
  9735  
  9736  		// allocate deflate memory, set up for gzip compression
  9737  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = Alloc_func(Z_NULL)
  9738  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = Free_func(Z_NULL)
  9739  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = Voidpf(Z_NULL)
  9740  		ret = XdeflateInit2_(tls, strm, (*Gz_state)(unsafe.Pointer(state)).Flevel, Z_DEFLATED, (MAX_WBITS + 16), DEF_MEM_LEVEL, (*Gz_state)(unsafe.Pointer(state)).Fstrategy, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{})))
  9741  		if ret != Z_OK {
  9742  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
  9743  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
  9744  			Xgz_error(tls, state, -4, ts+87 /* "out of memory" */)
  9745  			return -1
  9746  		}
  9747  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = uintptr(0)
  9748  	}
  9749  
  9750  	// mark state as initialized
  9751  	(*Gz_state)(unsafe.Pointer(state)).Fsize = (*Gz_state)(unsafe.Pointer(state)).Fwant
  9752  
  9753  	// initialize write buffer if compressing
  9754  	if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) {
  9755  		(*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize
  9756  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout
  9757  		(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
  9758  	}
  9759  	return 0
  9760  }
  9761  
  9762  // Compress whatever is at avail_in and next_in and write to the output file.
  9763  //    Return -1 if there is an error writing to the output file or if gz_init()
  9764  //    fails to allocate memory, otherwise 0.  flush is assumed to be a valid
  9765  //    deflate() flush value.  If flush is Z_FINISH, then the deflate() state is
  9766  //    reset to start a new gzip stream.  If gz->direct is true, then simply write
  9767  //    to the output file without compressing, and ignore flush.
  9768  func gz_comp(tls *libc.TLS, state Gz_statep, flush int32) int32 { /* gzwrite.c:73:11: */
  9769  	var ret int32
  9770  	var writ int32
  9771  	var have uint32
  9772  	var put uint32
  9773  	var max uint32 = ((uint32(libc.Uint32(libc.Uint32FromInt32(-1))) >> 2) + uint32(1))
  9774  	var strm Z_streamp = (state + 120 /* &.strm */)
  9775  
  9776  	// allocate memory if this is the first time through
  9777  	if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) {
  9778  		return -1
  9779  	}
  9780  
  9781  	// write directly if requested
  9782  	if (*Gz_state)(unsafe.Pointer(state)).Fdirect != 0 {
  9783  		for (*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0 {
  9784  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_in > max {
  9785  				put = max
  9786  			} else {
  9787  				put = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
  9788  			}
  9789  			writ = int32(libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(put)))
  9790  			if writ < 0 {
  9791  				Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))))
  9792  				return -1
  9793  			}
  9794  			*(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (uint32(writ))
  9795  			*(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(writ))
  9796  		}
  9797  		return 0
  9798  	}
  9799  
  9800  	// run deflate() on provided input until it produces no more output
  9801  	ret = Z_OK
  9802  	for ok := true; ok; ok = have != 0 {
  9803  		// write out current buffer contents if full, or if flushing, but if
  9804  		//            doing Z_FINISH then don't write until we get to Z_STREAM_END
  9805  		if ((*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0)) || ((flush != Z_NO_FLUSH) && ((flush != Z_FINISH) || (ret == Z_STREAM_END))) {
  9806  			for (*Z_stream)(unsafe.Pointer(strm)).Fnext_out > (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext {
  9807  				if ((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1) > int64(int32(max)) {
  9808  					put = max
  9809  				} else {
  9810  					put = (uint32((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Gz_state)(unsafe.Pointer(state)).Fx.Fnext)) / 1))
  9811  				}
  9812  				writ = int32(libc.Xwrite(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd, (*Gz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(put)))
  9813  				if writ < 0 {
  9814  					Xgz_error(tls, state, -1, libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))))
  9815  					return -1
  9816  				}
  9817  				*(*uintptr)(unsafe.Pointer(state /* &.x */ + 8 /* &.next */)) += (uintptr(writ))
  9818  			}
  9819  			if (*Z_stream)(unsafe.Pointer(strm)).Favail_out == UInt(0) {
  9820  				(*Z_stream)(unsafe.Pointer(strm)).Favail_out = (*Gz_state)(unsafe.Pointer(state)).Fsize
  9821  				(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = (*Gz_state)(unsafe.Pointer(state)).Fout
  9822  				(*Gz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Gz_state)(unsafe.Pointer(state)).Fout
  9823  			}
  9824  		}
  9825  
  9826  		// compress
  9827  		have = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
  9828  		ret = Xdeflate(tls, strm, flush)
  9829  		if ret == (-2) {
  9830  			Xgz_error(tls, state, -2,
  9831  				ts+291 /* "internal error: ..." */)
  9832  			return -1
  9833  		}
  9834  		have = have - ((*Z_stream)(unsafe.Pointer(strm)).Favail_out)
  9835  	}
  9836  
  9837  	// if that completed a deflate stream, allow another to start
  9838  	if flush == Z_FINISH {
  9839  		XdeflateReset(tls, strm)
  9840  	}
  9841  
  9842  	// all done, no errors
  9843  	return 0
  9844  }
  9845  
  9846  // Compress len zeros to output.  Return -1 on a write error or memory
  9847  //    allocation failure by gz_comp(), or 0 on success.
  9848  func gz_zero(tls *libc.TLS, state Gz_statep, len Off64_t) int32 { /* gzwrite.c:145:11: */
  9849  	var first int32
  9850  	var n uint32
  9851  	var strm Z_streamp = (state + 120 /* &.strm */)
  9852  
  9853  	// consume whatever's left in the input buffer
  9854  	if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) {
  9855  		return -1
  9856  	}
  9857  
  9858  	// compress len zeros (len guaranteed > 0)
  9859  	first = 1
  9860  	for len != 0 {
  9861  		if ((uint64(unsafe.Sizeof(int32(0))) == uint64(unsafe.Sizeof(Off64_t(0)))) && (((*Gz_state)(unsafe.Pointer(state)).Fsize) > uint32(0x7fffffff))) || (Off64_t((*Gz_state)(unsafe.Pointer(state)).Fsize) > len) {
  9862  			n = uint32(len)
  9863  		} else {
  9864  			n = (*Gz_state)(unsafe.Pointer(state)).Fsize
  9865  		}
  9866  		if first != 0 {
  9867  			libc.Xmemset(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, 0, uint64(n))
  9868  			first = 0
  9869  		}
  9870  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = n
  9871  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  9872  		*(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n))
  9873  		if gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  9874  			return -1
  9875  		}
  9876  		len = len - (Off64_t(n))
  9877  	}
  9878  	return 0
  9879  }
  9880  
  9881  // Write len bytes from buf to file.  Return the number of bytes written.  If
  9882  //    the returned value is less than len, then there was an error.
  9883  func gz_write(tls *libc.TLS, state Gz_statep, buf Voidpc, len Z_size_t) Z_size_t { /* gzwrite.c:178:16: */
  9884  	var put Z_size_t = len
  9885  
  9886  	// if len is zero, avoid unnecessary operations
  9887  	if len == uint64(0) {
  9888  		return uint64(0)
  9889  	}
  9890  
  9891  	// allocate memory if this is the first time through
  9892  	if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) {
  9893  		return uint64(0)
  9894  	}
  9895  
  9896  	// check for seek request
  9897  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
  9898  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
  9899  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
  9900  			return uint64(0)
  9901  		}
  9902  	}
  9903  
  9904  	// for small len, copy to input buffer, otherwise compress directly
  9905  	if len < Z_size_t((*Gz_state)(unsafe.Pointer(state)).Fsize) {
  9906  		// copy to input buffer, compress when full
  9907  		for ok := true; ok; ok = len != 0 {
  9908  			var have uint32
  9909  			var copy uint32
  9910  
  9911  			if (*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == UInt(0) {
  9912  				(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
  9913  			}
  9914  			have = (uint32(((int64((*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in + uintptr((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in))) - int64((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1))
  9915  			copy = ((*Gz_state)(unsafe.Pointer(state)).Fsize - have)
  9916  			if Z_size_t(copy) > len {
  9917  				copy = uint32(len)
  9918  			}
  9919  			libc.Xmemcpy(tls, ((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have)), buf, uint64(copy))
  9920  			*(*UInt)(unsafe.Pointer(state + 120 /* &.strm */ + 8 /* &.avail_in */)) += (copy)
  9921  			*(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(copy))
  9922  			buf = (buf + uintptr(copy))
  9923  			len = len - (Z_size_t(copy))
  9924  			if (len != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) {
  9925  				return uint64(0)
  9926  			}
  9927  		}
  9928  	} else {
  9929  		// consume whatever's left in the input buffer
  9930  		if ((*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in != 0) && (gz_comp(tls, state, Z_NO_FLUSH) == -1) {
  9931  			return uint64(0)
  9932  		}
  9933  
  9934  		// directly compress user buffer to file
  9935  		(*Gz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = buf
  9936  		for ok1 := true; ok1; ok1 = len != 0 {
  9937  			var n uint32 = libc.Uint32(libc.Uint32FromInt32(-1))
  9938  			if Z_size_t(n) > len {
  9939  				n = uint32(len)
  9940  			}
  9941  			(*Gz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = n
  9942  			*(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(n))
  9943  			if gz_comp(tls, state, Z_NO_FLUSH) == -1 {
  9944  				return uint64(0)
  9945  			}
  9946  			len = len - (Z_size_t(n))
  9947  		}
  9948  	}
  9949  
  9950  	// input was all buffered or compressed
  9951  	return put
  9952  }
  9953  
  9954  // -- see zlib.h --
  9955  func Xgzwrite(tls *libc.TLS, file GzFile, buf Voidpc, len uint32) int32 { /* gzwrite.c:246:13: */
  9956  	var state Gz_statep
  9957  
  9958  	// get internal structure
  9959  	if file == (uintptr(0)) {
  9960  		return 0
  9961  	}
  9962  	state = file
  9963  
  9964  	// check that we're writing and that there's no error
  9965  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) {
  9966  		return 0
  9967  	}
  9968  
  9969  	// since an int is returned, make sure len fits in one, otherwise return
  9970  	//        with an error (this avoids a flaw in the interface)
  9971  	if int32(len) < 0 {
  9972  		Xgz_error(tls, state, -3, ts+330 /* "requested length..." */)
  9973  		return 0
  9974  	}
  9975  
  9976  	// write len bytes from buf (the return value will fit in an int)
  9977  	return int32(gz_write(tls, state, buf, uint64(len)))
  9978  }
  9979  
  9980  // -- see zlib.h --
  9981  func Xgzfwrite(tls *libc.TLS, buf Voidpc, size Z_size_t, nitems Z_size_t, file GzFile) Z_size_t { /* gzwrite.c:274:18: */
  9982  	var len Z_size_t
  9983  	var state Gz_statep
  9984  
  9985  	// get internal structure
  9986  	if file == (uintptr(0)) {
  9987  		return uint64(0)
  9988  	}
  9989  	state = file
  9990  
  9991  	// check that we're writing and that there's no error
  9992  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) {
  9993  		return uint64(0)
  9994  	}
  9995  
  9996  	// compute bytes to read -- error on overflow
  9997  	len = (nitems * size)
  9998  	if (size != 0) && ((len / size) != nitems) {
  9999  		Xgz_error(tls, state, -2, ts+227 /* "request does not..." */)
 10000  		return uint64(0)
 10001  	}
 10002  
 10003  	// write len bytes to buf, return the number of full items written
 10004  	if len != 0 {
 10005  		return (gz_write(tls, state, buf, len) / size)
 10006  	}
 10007  	return uint64(0)
 10008  }
 10009  
 10010  // -- see zlib.h --
 10011  func Xgzputc(tls *libc.TLS, file GzFile, c int32) int32 { /* gzwrite.c:304:13: */
 10012  	bp := tls.Alloc(1)
 10013  	defer tls.Free(1)
 10014  
 10015  	var have uint32
 10016  	// var buf [1]uint8 at bp, 1
 10017  
 10018  	var state Gz_statep
 10019  	var strm Z_streamp
 10020  
 10021  	// get internal structure
 10022  	if file == (uintptr(0)) {
 10023  		return -1
 10024  	}
 10025  	state = file
 10026  	strm = (state + 120 /* &.strm */)
 10027  
 10028  	// check that we're writing and that there's no error
 10029  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) {
 10030  		return -1
 10031  	}
 10032  
 10033  	// check for seek request
 10034  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
 10035  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
 10036  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
 10037  			return -1
 10038  		}
 10039  	}
 10040  
 10041  	// try writing to input buffer for speed (state->size == 0 if buffer not
 10042  	//        initialized)
 10043  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
 10044  		if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
 10045  			(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
 10046  		}
 10047  		have = (uint32(((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_in + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in))) - int64((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1))
 10048  		if have < (*Gz_state)(unsafe.Pointer(state)).Fsize {
 10049  			*(*uint8)(unsafe.Pointer((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(have))) = uint8(c)
 10050  			(*Z_stream)(unsafe.Pointer(strm)).Favail_in++
 10051  			(*Gz_state)(unsafe.Pointer(state)).Fx.Fpos++
 10052  			return (c & 0xff)
 10053  		}
 10054  	}
 10055  
 10056  	// no room in buffer or not initialized, use gz_write()
 10057  	*(*uint8)(unsafe.Pointer(bp /* &buf[0] */)) = uint8(c)
 10058  	if gz_write(tls, state, bp /* &buf[0] */, uint64(1)) != uint64(1) {
 10059  		return -1
 10060  	}
 10061  	return (c & 0xff)
 10062  }
 10063  
 10064  // -- see zlib.h --
 10065  func Xgzputs(tls *libc.TLS, file GzFile, str uintptr) int32 { /* gzwrite.c:352:13: */
 10066  	var ret int32
 10067  	var len Z_size_t
 10068  	var state Gz_statep
 10069  
 10070  	// get internal structure
 10071  	if file == (uintptr(0)) {
 10072  		return -1
 10073  	}
 10074  	state = file
 10075  
 10076  	// check that we're writing and that there's no error
 10077  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) {
 10078  		return -1
 10079  	}
 10080  
 10081  	// write string
 10082  	len = libc.Xstrlen(tls, str)
 10083  	ret = int32(gz_write(tls, state, str, len))
 10084  	if (ret == 0) && (len != uint64(0)) {
 10085  		return -1
 10086  	}
 10087  	return ret
 10088  }
 10089  
 10090  // Copyright (C) 1989-2018 Free Software Foundation, Inc.
 10091  //
 10092  // This file is part of GCC.
 10093  //
 10094  // GCC is free software; you can redistribute it and/or modify
 10095  // it under the terms of the GNU General Public License as published by
 10096  // the Free Software Foundation; either version 3, or (at your option)
 10097  // any later version.
 10098  //
 10099  // GCC is distributed in the hope that it will be useful,
 10100  // but WITHOUT ANY WARRANTY; without even the implied warranty of
 10101  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 10102  // GNU General Public License for more details.
 10103  //
 10104  // Under Section 7 of GPL version 3, you are granted additional
 10105  // permissions described in the GCC Runtime Library Exception, version
 10106  // 3.1, as published by the Free Software Foundation.
 10107  //
 10108  // You should have received a copy of the GNU General Public License and
 10109  // a copy of the GCC Runtime Library Exception along with this program;
 10110  // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 10111  // <http://www.gnu.org/licenses/>.
 10112  
 10113  // ISO C Standard:  7.15  Variable arguments  <stdarg.h>
 10114  
 10115  // -- see zlib.h --
 10116  func Xgzvprintf(tls *libc.TLS, file GzFile, format uintptr, va Va_list) int32 { /* gzwrite.c:379:15: */
 10117  	var len int32
 10118  	var left uint32
 10119  	var next uintptr
 10120  	var state Gz_statep
 10121  	var strm Z_streamp
 10122  
 10123  	// get internal structure
 10124  	if file == (uintptr(0)) {
 10125  		return -2
 10126  	}
 10127  	state = file
 10128  	strm = (state + 120 /* &.strm */)
 10129  
 10130  	// check that we're writing and that there's no error
 10131  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) {
 10132  		return -2
 10133  	}
 10134  
 10135  	// make sure we have some buffer space
 10136  	if ((*Gz_state)(unsafe.Pointer(state)).Fsize == uint32(0)) && (gz_init(tls, state) == -1) {
 10137  		return (*Gz_state)(unsafe.Pointer(state)).Ferr
 10138  	}
 10139  
 10140  	// check for seek request
 10141  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
 10142  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
 10143  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
 10144  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
 10145  		}
 10146  	}
 10147  
 10148  	// do the printf() into the input buffer, put length in len -- the input
 10149  	//        buffer is double-sized just for this function, so there is guaranteed to
 10150  	//        be state->size bytes available after the current contents
 10151  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0) {
 10152  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
 10153  	}
 10154  	next = (((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr(((int64((*Z_stream)(unsafe.Pointer(strm)).Fnext_in) - int64((*Gz_state)(unsafe.Pointer(state)).Fin)) / 1))) + uintptr((*Z_stream)(unsafe.Pointer(strm)).Favail_in))
 10155  	*(*int8)(unsafe.Pointer(next + uintptr(((*Gz_state)(unsafe.Pointer(state)).Fsize - uint32(1))))) = int8(0)
 10156  	len = libc.Xvsnprintf(tls, next, uint64((*Gz_state)(unsafe.Pointer(state)).Fsize), format, va)
 10157  
 10158  	// check that printf() results fit in buffer
 10159  	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) {
 10160  		return 0
 10161  	}
 10162  
 10163  	// update buffer and position, compress first half if past that
 10164  	*(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) += (uint32(len))
 10165  	*(*Off64_t)(unsafe.Pointer(state /* &.x */ + 16 /* &.pos */)) += (Off64_t(len))
 10166  	if (*Z_stream)(unsafe.Pointer(strm)).Favail_in >= (*Gz_state)(unsafe.Pointer(state)).Fsize {
 10167  		left = ((*Z_stream)(unsafe.Pointer(strm)).Favail_in - (*Gz_state)(unsafe.Pointer(state)).Fsize)
 10168  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = (*Gz_state)(unsafe.Pointer(state)).Fsize
 10169  		if gz_comp(tls, state, Z_NO_FLUSH) == -1 {
 10170  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
 10171  		}
 10172  		libc.Xmemcpy(tls, (*Gz_state)(unsafe.Pointer(state)).Fin, ((*Gz_state)(unsafe.Pointer(state)).Fin + uintptr((*Gz_state)(unsafe.Pointer(state)).Fsize)), uint64(left))
 10173  		(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = (*Gz_state)(unsafe.Pointer(state)).Fin
 10174  		(*Z_stream)(unsafe.Pointer(strm)).Favail_in = left
 10175  	}
 10176  	return len
 10177  }
 10178  
 10179  func Xgzprintf(tls *libc.TLS, file GzFile, format uintptr, va uintptr) int32 { /* gzwrite.c:451:15: */
 10180  	var va1 Va_list
 10181  	_ = va1
 10182  	var ret int32
 10183  
 10184  	va1 = va
 10185  	ret = Xgzvprintf(tls, file, format, va1)
 10186  	_ = va1
 10187  	return ret
 10188  }
 10189  
 10190  // -- see zlib.h --
 10191  func Xgzflush(tls *libc.TLS, file GzFile, flush int32) int32 { /* gzwrite.c:553:13: */
 10192  	var state Gz_statep
 10193  
 10194  	// get internal structure
 10195  	if file == (uintptr(0)) {
 10196  		return -2
 10197  	}
 10198  	state = file
 10199  
 10200  	// check that we're writing and that there's no error
 10201  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) {
 10202  		return -2
 10203  	}
 10204  
 10205  	// check flush parameter
 10206  	if (flush < 0) || (flush > Z_FINISH) {
 10207  		return -2
 10208  	}
 10209  
 10210  	// check for seek request
 10211  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
 10212  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
 10213  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
 10214  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
 10215  		}
 10216  	}
 10217  
 10218  	// compress remaining data with requested flush
 10219  	gz_comp(tls, state, flush)
 10220  	return (*Gz_state)(unsafe.Pointer(state)).Ferr
 10221  }
 10222  
 10223  // -- see zlib.h --
 10224  func Xgzsetparams(tls *libc.TLS, file GzFile, level int32, strategy int32) int32 { /* gzwrite.c:585:13: */
 10225  	var state Gz_statep
 10226  	var strm Z_streamp
 10227  
 10228  	// get internal structure
 10229  	if file == (uintptr(0)) {
 10230  		return -2
 10231  	}
 10232  	state = file
 10233  	strm = (state + 120 /* &.strm */)
 10234  
 10235  	// check that we're writing and that there's no error
 10236  	if ((*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE) || ((*Gz_state)(unsafe.Pointer(state)).Ferr != Z_OK) {
 10237  		return -2
 10238  	}
 10239  
 10240  	// if no change is requested, then do nothing
 10241  	if (level == (*Gz_state)(unsafe.Pointer(state)).Flevel) && (strategy == (*Gz_state)(unsafe.Pointer(state)).Fstrategy) {
 10242  		return Z_OK
 10243  	}
 10244  
 10245  	// check for seek request
 10246  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
 10247  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
 10248  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
 10249  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
 10250  		}
 10251  	}
 10252  
 10253  	// change compression parameters for subsequent input
 10254  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
 10255  		// flush previous input with previous parameters before changing
 10256  		if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in != 0) && (gz_comp(tls, state, Z_BLOCK) == -1) {
 10257  			return (*Gz_state)(unsafe.Pointer(state)).Ferr
 10258  		}
 10259  		XdeflateParams(tls, strm, level, strategy)
 10260  	}
 10261  	(*Gz_state)(unsafe.Pointer(state)).Flevel = level
 10262  	(*Gz_state)(unsafe.Pointer(state)).Fstrategy = strategy
 10263  	return Z_OK
 10264  }
 10265  
 10266  // -- see zlib.h --
 10267  func Xgzclose_w(tls *libc.TLS, file GzFile) int32 { /* gzwrite.c:627:13: */
 10268  	var ret int32 = Z_OK
 10269  	var state Gz_statep
 10270  
 10271  	// get internal structure
 10272  	if file == (uintptr(0)) {
 10273  		return -2
 10274  	}
 10275  	state = file
 10276  
 10277  	// check that we're writing
 10278  	if (*Gz_state)(unsafe.Pointer(state)).Fmode != GZ_WRITE {
 10279  		return -2
 10280  	}
 10281  
 10282  	// check for seek request
 10283  	if (*Gz_state)(unsafe.Pointer(state)).Fseek != 0 {
 10284  		(*Gz_state)(unsafe.Pointer(state)).Fseek = 0
 10285  		if gz_zero(tls, state, (*Gz_state)(unsafe.Pointer(state)).Fskip) == -1 {
 10286  			ret = (*Gz_state)(unsafe.Pointer(state)).Ferr
 10287  		}
 10288  	}
 10289  
 10290  	// flush, free memory, and close file
 10291  	if gz_comp(tls, state, Z_FINISH) == -1 {
 10292  		ret = (*Gz_state)(unsafe.Pointer(state)).Ferr
 10293  	}
 10294  	if (*Gz_state)(unsafe.Pointer(state)).Fsize != 0 {
 10295  		if !((*Gz_state)(unsafe.Pointer(state)).Fdirect != 0) {
 10296  			XdeflateEnd(tls, (state + 120 /* &.strm */))
 10297  			libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)
 10298  		}
 10299  		libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fin)
 10300  	}
 10301  	Xgz_error(tls, state, Z_OK, uintptr(0))
 10302  	libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fpath)
 10303  	if libc.Xclose(tls, (*Gz_state)(unsafe.Pointer(state)).Ffd) == -1 {
 10304  		ret = -1
 10305  	}
 10306  	libc.Xfree(tls, state)
 10307  	return ret
 10308  }
 10309  
 10310  // Reverse the bytes in a 32-bit value
 10311  
 10312  // inftrees.h -- header to use inftrees.c
 10313  // Copyright (C) 1995-2005, 2010 Mark Adler
 10314  // For conditions of distribution and use, see copyright notice in zlib.h
 10315  
 10316  // WARNING: this file should *not* be used by applications. It is
 10317  //    part of the implementation of the compression library and is
 10318  //    subject to change. Applications should only use zlib.h.
 10319  //
 10320  
 10321  // Structure for decoding tables.  Each entry provides either the
 10322  //    information needed to do the operation requested by the code that
 10323  //    indexed that table entry, or it provides a pointer to another
 10324  //    table that indexes more bits of the code.  op indicates whether
 10325  //    the entry is a pointer to another table, a literal, a length or
 10326  //    distance, an end-of-block, or an invalid code.  For a table
 10327  //    pointer, the low four bits of op is the number of index bits of
 10328  //    that table.  For a length or distance, the low four bits of op
 10329  //    is the number of extra bits to get after the code.  bits is
 10330  //    the number of bits in this code or part of the code to drop off
 10331  //    of the bit buffer.  val is the actual byte to output in the case
 10332  //    of a literal, the base length or distance, or the offset from
 10333  //    the current table to the next table.  Each entry is four bytes.
 10334  type Code = struct {
 10335  	Fop   uint8
 10336  	Fbits uint8
 10337  	Fval  uint16
 10338  } /* inftrees.h:28:3 */
 10339  
 10340  // op values as set by inflate_table():
 10341  //     00000000 - literal
 10342  //     0000tttt - table link, tttt != 0 is the number of table index bits
 10343  //     0001eeee - length or distance, eeee is the number of extra bits
 10344  //     01100000 - end of block
 10345  //     01000000 - invalid code
 10346  //
 10347  
 10348  // Maximum size of the dynamic table.  The maximum number of code structures is
 10349  //    1444, which is the sum of 852 for literal/length codes and 592 for distance
 10350  //    codes.  These values were found by exhaustive searches using the program
 10351  //    examples/enough.c found in the zlib distribtution.  The arguments to that
 10352  //    program are the number of symbols, the initial root table size, and the
 10353  //    maximum bit length of a code.  "enough 286 9 15" for literal/length codes
 10354  //    returns returns 852, and "enough 30 6 15" for distance codes returns 592.
 10355  //    The initial root table size (9 or 6) is found in the fifth argument of the
 10356  //    inflate_table() calls in inflate.c and infback.c.  If the root table size is
 10357  //    changed, then these maximum sizes would be need to be recalculated and
 10358  //    updated.
 10359  
 10360  // Type of code to build for inflate_table()
 10361  type Codetype = uint32 /* inftrees.h:58:3 */
 10362  // inflate.h -- internal inflate state definition
 10363  // Copyright (C) 1995-2016 Mark Adler
 10364  // For conditions of distribution and use, see copyright notice in zlib.h
 10365  
 10366  // WARNING: this file should *not* be used by applications. It is
 10367  //    part of the implementation of the compression library and is
 10368  //    subject to change. Applications should only use zlib.h.
 10369  //
 10370  
 10371  // define NO_GZIP when compiling if you want to disable gzip header and
 10372  //    trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
 10373  //    the crc code when it is not needed.  For shared libraries, gzip decoding
 10374  //    should be left enabled.
 10375  
 10376  // Possible inflate modes between inflate() calls
 10377  type Inflate_mode = uint32 /* inflate.h:53:3 */
 10378  
 10379  //
 10380  //     State transitions between above modes -
 10381  //
 10382  //     (most modes can go to BAD or MEM on error -- not shown for clarity)
 10383  //
 10384  //     Process header:
 10385  //         HEAD -> (gzip) or (zlib) or (raw)
 10386  //         (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT ->
 10387  //                   HCRC -> TYPE
 10388  //         (zlib) -> DICTID or TYPE
 10389  //         DICTID -> DICT -> TYPE
 10390  //         (raw) -> TYPEDO
 10391  //     Read deflate blocks:
 10392  //             TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK
 10393  //             STORED -> COPY_ -> COPY -> TYPE
 10394  //             TABLE -> LENLENS -> CODELENS -> LEN_
 10395  //             LEN_ -> LEN
 10396  //     Read deflate codes in fixed or dynamic block:
 10397  //                 LEN -> LENEXT or LIT or TYPE
 10398  //                 LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
 10399  //                 LIT -> LEN
 10400  //     Process trailer:
 10401  //         CHECK -> LENGTH -> DONE
 10402  //
 10403  
 10404  // State maintained between inflate() calls -- approximately 7K bytes, not
 10405  //    including the allocated sliding window, which is up to 32K bytes.
 10406  type Inflate_state = struct {
 10407  	Fstrm     Z_streamp
 10408  	Fmode     Inflate_mode
 10409  	Flast     int32
 10410  	Fwrap     int32
 10411  	Fhavedict int32
 10412  	Fflags    int32
 10413  	Fdmax     uint32
 10414  	Fcheck    uint64
 10415  	Ftotal    uint64
 10416  	Fhead     Gz_headerp
 10417  	Fwbits    uint32
 10418  	Fwsize    uint32
 10419  	Fwhave    uint32
 10420  	Fwnext    uint32
 10421  	Fwindow   uintptr
 10422  	Fhold     uint64
 10423  	Fbits     uint32
 10424  	Flength   uint32
 10425  	Foffset   uint32
 10426  	Fextra    uint32
 10427  	Flencode  uintptr
 10428  	Fdistcode uintptr
 10429  	Flenbits  uint32
 10430  	Fdistbits uint32
 10431  	Fncode    uint32
 10432  	Fnlen     uint32
 10433  	Fndist    uint32
 10434  	Fhave     uint32
 10435  	Fnext     uintptr
 10436  	Flens     [320]uint16
 10437  	Fwork     [288]uint16
 10438  	Fcodes    [1444]Code
 10439  	Fsane     int32
 10440  	Fback     int32
 10441  	Fwas      uint32
 10442  	_         [4]byte
 10443  } /* inflate.h:82:1 */
 10444  
 10445  //
 10446  //    strm provides memory allocation functions in zalloc and zfree, or
 10447  //    Z_NULL to use the library memory allocation functions.
 10448  //
 10449  //    windowBits is in the range 8..15, and window is a user-supplied
 10450  //    window and output buffer that is 2**windowBits bytes.
 10451  //
 10452  func XinflateBackInit_(tls *libc.TLS, strm Z_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) int32 { /* infback.c:28:13: */
 10453  	var state uintptr
 10454  
 10455  	if ((version == uintptr(Z_NULL)) || (int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts /* "1.2.11" */))))) || (stream_size != (int32(unsafe.Sizeof(Z_stream{})))) {
 10456  		return -6
 10457  	}
 10458  	if (((strm == uintptr(Z_NULL)) || (window == uintptr(Z_NULL))) || (windowBits < 8)) || (windowBits > 15) {
 10459  		return -2
 10460  	}
 10461  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error
 10462  	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
 10463  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
 10464  			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
 10465  		}{Xzcalloc}))
 10466  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
 10467  	}
 10468  	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
 10469  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
 10470  			f func(*libc.TLS, Voidpf, Voidpf)
 10471  		}{Xzcfree}))
 10472  	}
 10473  	state = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((strm + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Inflate_state{})))
 10474  	if state == uintptr(Z_NULL) {
 10475  		return -4
 10476  	}
 10477  
 10478  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = state
 10479  	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768
 10480  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = UInt(windowBits)
 10481  	(*Inflate_state)(unsafe.Pointer(state)).Fwsize = (uint32(1) << windowBits)
 10482  	(*Inflate_state)(unsafe.Pointer(state)).Fwindow = window
 10483  	(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 10484  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
 10485  	return Z_OK
 10486  }
 10487  
 10488  //
 10489  //    Return state with length and distance decoding tables and index sizes set to
 10490  //    fixed code decoding.  Normally this returns fixed tables from inffixed.h.
 10491  //    If BUILDFIXED is defined, then instead this routine builds the tables the
 10492  //    first time it's called, and returns those tables the first time and
 10493  //    thereafter.  This reduces the size of the code by about 2K bytes, in
 10494  //    exchange for a little execution time.  However, BUILDFIXED should not be
 10495  //    used for threaded applications, since the rewriting of the tables and virgin
 10496  //    may not be thread-safe.
 10497  //
 10498  func fixedtables(tls *libc.TLS, state uintptr) { /* infback.c:82:12: */
 10499  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix))
 10500  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
 10501  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix))
 10502  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5)
 10503  }
 10504  
 10505  var lenfix = [512]Code{
 10506  	{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)},
 10507  	{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)},
 10508  	{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)},
 10509  	{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)},
 10510  	{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)},
 10511  	{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)},
 10512  	{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)},
 10513  	{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)},
 10514  	{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)},
 10515  	{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)},
 10516  	{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)},
 10517  	{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)},
 10518  	{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)},
 10519  	{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)},
 10520  	{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)},
 10521  	{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)},
 10522  	{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)},
 10523  	{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)},
 10524  	{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)},
 10525  	{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)},
 10526  	{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)},
 10527  	{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)},
 10528  	{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)},
 10529  	{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)},
 10530  	{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)},
 10531  	{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)},
 10532  	{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)},
 10533  	{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)},
 10534  	{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)},
 10535  	{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)},
 10536  	{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)},
 10537  	{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)},
 10538  	{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)},
 10539  	{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)},
 10540  	{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)},
 10541  	{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)},
 10542  	{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)},
 10543  	{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)},
 10544  	{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)},
 10545  	{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)},
 10546  	{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)},
 10547  	{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)},
 10548  	{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)},
 10549  	{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)},
 10550  	{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)},
 10551  	{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)},
 10552  	{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)},
 10553  	{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)},
 10554  	{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)},
 10555  	{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)},
 10556  	{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)},
 10557  	{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)},
 10558  	{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)},
 10559  	{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)},
 10560  	{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)},
 10561  	{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)},
 10562  	{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)},
 10563  	{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)},
 10564  	{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)},
 10565  	{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)},
 10566  	{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)},
 10567  	{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)},
 10568  	{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)},
 10569  	{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)},
 10570  	{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)},
 10571  	{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)},
 10572  	{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)},
 10573  	{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)},
 10574  	{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)},
 10575  	{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)},
 10576  	{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)},
 10577  	{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)},
 10578  	{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)},
 10579  	{Fbits: uint8(9), Fval: uint16(255)},
 10580  } /* inffixed.h:10:23 */
 10581  var distfix = [32]Code{
 10582  	{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)},
 10583  	{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)},
 10584  	{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)},
 10585  	{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)},
 10586  	{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)},
 10587  	{Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)},
 10588  } /* inffixed.h:87:23 */
 10589  
 10590  // Macros for inflateBack():
 10591  
 10592  // Load returned state from inflate_fast()
 10593  
 10594  // Set state from registers for inflate_fast()
 10595  
 10596  // Clear the input bit accumulator
 10597  
 10598  // Assure that some input is available.  If input is requested, but denied,
 10599  //    then return a Z_BUF_ERROR from inflateBack().
 10600  
 10601  // Get a byte of input into the bit accumulator, or return from inflateBack()
 10602  //    with an error if there is no input available.
 10603  
 10604  // Assure that there are at least n bits in the bit accumulator.  If there is
 10605  //    not enough available input to do that, then return from inflateBack() with
 10606  //    an error.
 10607  
 10608  // Return the low n bits of the bit accumulator (n < 16)
 10609  
 10610  // Remove n bits from the bit accumulator
 10611  
 10612  // Remove zero to seven bits as needed to go to a byte boundary
 10613  
 10614  // Assure that some output space is available, by writing out the window
 10615  //    if it's full.  If the write fails, return from inflateBack() with a
 10616  //    Z_BUF_ERROR.
 10617  
 10618  //
 10619  //    strm provides the memory allocation functions and window buffer on input,
 10620  //    and provides information on the unused input on return.  For Z_DATA_ERROR
 10621  //    returns, strm will also provide an error message.
 10622  //
 10623  //    in() and out() are the call-back input and output functions.  When
 10624  //    inflateBack() needs more input, it calls in().  When inflateBack() has
 10625  //    filled the window with output, or when it completes with data in the
 10626  //    window, it calls out() to write out the data.  The application must not
 10627  //    change the provided input until in() is called again or inflateBack()
 10628  //    returns.  The application must not change the window/output buffer until
 10629  //    inflateBack() returns.
 10630  //
 10631  //    in() and out() are called with a descriptor parameter provided in the
 10632  //    inflateBack() call.  This parameter can be a structure that provides the
 10633  //    information required to do the read or write, as well as accumulated
 10634  //    information on the input and output such as totals and check values.
 10635  //
 10636  //    in() should return zero on failure.  out() should return non-zero on
 10637  //    failure.  If either in() or out() fails, than inflateBack() returns a
 10638  //    Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
 10639  //    was in() or out() that caused in the error.  Otherwise,  inflateBack()
 10640  //    returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
 10641  //    error, or Z_MEM_ERROR if it could not allocate memory for the state.
 10642  //    inflateBack() can also return Z_STREAM_ERROR if the input parameters
 10643  //    are not correct, i.e. strm is Z_NULL or the state was not initialized.
 10644  //
 10645  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: */
 10646  	bp := tls.Alloc(8)
 10647  	defer tls.Free(8)
 10648  
 10649  	var state uintptr
 10650  	// var next uintptr at bp, 8
 10651  	// next input
 10652  	var put uintptr // next output
 10653  	var have uint32
 10654  	var left uint32  // available input and output
 10655  	var hold uint64  // bit buffer
 10656  	var bits uint32  // bits in bit buffer
 10657  	var copy uint32  // number of stored or match bytes to copy
 10658  	var from uintptr // where to copy match bytes from
 10659  	var here Code    // current decoding table entry
 10660  	var last Code    // parent table entry
 10661  	var len uint32   // length to copy for repeats, bits to drop
 10662  	var ret int32
 10663  
 10664  	// Check that the strm exists and that the state was initialized
 10665  	if !((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL))) {
 10666  		goto __1
 10667  	}
 10668  	return -2
 10669  __1:
 10670  	;
 10671  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 10672  
 10673  	// Reset the state
 10674  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
 10675  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 10676  	(*Inflate_state)(unsafe.Pointer(state)).Flast = 0
 10677  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
 10678  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 10679  	if *(*uintptr)(unsafe.Pointer(bp /* next */)) != uintptr(Z_NULL) {
 10680  		have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 10681  	} else {
 10682  		have = uint32(0)
 10683  	}
 10684  	hold = uint64(0)
 10685  	bits = uint32(0)
 10686  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 10687  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 10688  
 10689  	// Inflate until end of block marked as last
 10690  __2:
 10691  	switch (*Inflate_state)(unsafe.Pointer(state)).Fmode {
 10692  	case TYPE:
 10693  		goto __6
 10694  
 10695  	case STORED:
 10696  		goto __7
 10697  
 10698  	case TABLE:
 10699  		goto __8
 10700  
 10701  	case LEN:
 10702  		goto __9
 10703  
 10704  	case DONE:
 10705  		goto __10
 10706  
 10707  	case BAD:
 10708  		goto __11
 10709  
 10710  	default:
 10711  		goto __12
 10712  	}
 10713  	goto __5
 10714  __6:
 10715  	// determine and dispatch block type
 10716  	if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) {
 10717  		goto __13
 10718  	}
 10719  __14:
 10720  	hold >>= (bits & uint32(7))
 10721  	bits = bits - (bits & uint32(7))
 10722  	goto __15
 10723  __15:
 10724  	if 0 != 0 {
 10725  		goto __14
 10726  	}
 10727  	goto __16
 10728  __16:
 10729  	;
 10730  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE
 10731  	goto __5
 10732  __13:
 10733  	;
 10734  __17:
 10735  __20:
 10736  	if !(bits < (uint32(3))) {
 10737  		goto __21
 10738  	}
 10739  __22:
 10740  __25:
 10741  	if !(have == uint32(0)) {
 10742  		goto __28
 10743  	}
 10744  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 10745  	if !(have == uint32(0)) {
 10746  		goto __29
 10747  	}
 10748  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10749  	ret = -5
 10750  	goto inf_leave
 10751  __29:
 10752  	;
 10753  __28:
 10754  	;
 10755  	goto __26
 10756  __26:
 10757  	if 0 != 0 {
 10758  		goto __25
 10759  	}
 10760  	goto __27
 10761  __27:
 10762  	;
 10763  	have--
 10764  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 10765  	bits = bits + (uint32(8))
 10766  	goto __23
 10767  __23:
 10768  	if 0 != 0 {
 10769  		goto __22
 10770  	}
 10771  	goto __24
 10772  __24:
 10773  	;
 10774  	goto __20
 10775  __21:
 10776  	;
 10777  	goto __18
 10778  __18:
 10779  	if 0 != 0 {
 10780  		goto __17
 10781  	}
 10782  	goto __19
 10783  __19:
 10784  	;
 10785  	(*Inflate_state)(unsafe.Pointer(state)).Flast = (int32(uint32(hold) & ((uint32(1) << (1)) - uint32(1))))
 10786  __30:
 10787  	hold >>= 1
 10788  	bits = bits - (uint32(1))
 10789  	goto __31
 10790  __31:
 10791  	if 0 != 0 {
 10792  		goto __30
 10793  	}
 10794  	goto __32
 10795  __32:
 10796  	;
 10797  	switch uint32(hold) & ((uint32(1) << (2)) - uint32(1)) {
 10798  	case uint32(0):
 10799  		goto __34
 10800  	case uint32(1):
 10801  		goto __35
 10802  	case uint32(2):
 10803  		goto __36
 10804  	case uint32(3):
 10805  		goto __37
 10806  	}
 10807  	goto __33
 10808  __34: // stored block
 10809  	;
 10810  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED
 10811  	goto __33
 10812  __35: // fixed block
 10813  	fixedtables(tls, state)
 10814  
 10815  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN // decode codes
 10816  	goto __33
 10817  __36: // dynamic block
 10818  	;
 10819  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE
 10820  	goto __33
 10821  __37:
 10822  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */
 10823  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10824  __33:
 10825  	;
 10826  __38:
 10827  	hold >>= 2
 10828  	bits = bits - (uint32(2))
 10829  	goto __39
 10830  __39:
 10831  	if 0 != 0 {
 10832  		goto __38
 10833  	}
 10834  	goto __40
 10835  __40:
 10836  	;
 10837  	goto __5
 10838  
 10839  __7:
 10840  	// get and verify stored block length
 10841  __41:
 10842  	hold >>= (bits & uint32(7))
 10843  	bits = bits - (bits & uint32(7))
 10844  	goto __42
 10845  __42:
 10846  	if 0 != 0 {
 10847  		goto __41
 10848  	}
 10849  	goto __43
 10850  __43:
 10851  	; // go to byte boundary
 10852  __44:
 10853  __47:
 10854  	if !(bits < (uint32(32))) {
 10855  		goto __48
 10856  	}
 10857  __49:
 10858  __52:
 10859  	if !(have == uint32(0)) {
 10860  		goto __55
 10861  	}
 10862  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 10863  	if !(have == uint32(0)) {
 10864  		goto __56
 10865  	}
 10866  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10867  	ret = -5
 10868  	goto inf_leave
 10869  __56:
 10870  	;
 10871  __55:
 10872  	;
 10873  	goto __53
 10874  __53:
 10875  	if 0 != 0 {
 10876  		goto __52
 10877  	}
 10878  	goto __54
 10879  __54:
 10880  	;
 10881  	have--
 10882  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 10883  	bits = bits + (uint32(8))
 10884  	goto __50
 10885  __50:
 10886  	if 0 != 0 {
 10887  		goto __49
 10888  	}
 10889  	goto __51
 10890  __51:
 10891  	;
 10892  	goto __47
 10893  __48:
 10894  	;
 10895  	goto __45
 10896  __45:
 10897  	if 0 != 0 {
 10898  		goto __44
 10899  	}
 10900  	goto __46
 10901  __46:
 10902  	;
 10903  	if !((hold & uint64(0xffff)) != ((hold >> 16) ^ uint64(0xffff))) {
 10904  		goto __57
 10905  	}
 10906  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */
 10907  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 10908  	goto __5
 10909  __57:
 10910  	;
 10911  	(*Inflate_state)(unsafe.Pointer(state)).Flength = (uint32(hold) & uint32(0xffff))
 10912  
 10913  __58:
 10914  	hold = uint64(0)
 10915  	bits = uint32(0)
 10916  	goto __59
 10917  __59:
 10918  	if 0 != 0 {
 10919  		goto __58
 10920  	}
 10921  	goto __60
 10922  __60:
 10923  	;
 10924  
 10925  	// copy stored block from input to output
 10926  __61:
 10927  	if !((*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0)) {
 10928  		goto __62
 10929  	}
 10930  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 10931  __63:
 10932  	if !(have == uint32(0)) {
 10933  		goto __66
 10934  	}
 10935  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 10936  	if !(have == uint32(0)) {
 10937  		goto __67
 10938  	}
 10939  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 10940  	ret = -5
 10941  	goto inf_leave
 10942  __67:
 10943  	;
 10944  __66:
 10945  	;
 10946  	goto __64
 10947  __64:
 10948  	if 0 != 0 {
 10949  		goto __63
 10950  	}
 10951  	goto __65
 10952  __65:
 10953  	;
 10954  __68:
 10955  	if !(left == uint32(0)) {
 10956  		goto __71
 10957  	}
 10958  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 10959  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 10960  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
 10961  	if !((*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(&out)))(tls, out_desc, put, left) != 0) {
 10962  		goto __72
 10963  	}
 10964  	ret = -5
 10965  	goto inf_leave
 10966  __72:
 10967  	;
 10968  __71:
 10969  	;
 10970  	goto __69
 10971  __69:
 10972  	if 0 != 0 {
 10973  		goto __68
 10974  	}
 10975  	goto __70
 10976  __70:
 10977  	;
 10978  	if !(copy > have) {
 10979  		goto __73
 10980  	}
 10981  	copy = have
 10982  __73:
 10983  	;
 10984  	if !(copy > left) {
 10985  		goto __74
 10986  	}
 10987  	copy = left
 10988  __74:
 10989  	;
 10990  	libc.Xmemcpy(tls, put, *(*uintptr)(unsafe.Pointer(bp /* next */)), uint64(copy))
 10991  	have = have - (copy)
 10992  	*(*uintptr)(unsafe.Pointer(bp /* next */)) += uintptr(copy)
 10993  	left = left - (copy)
 10994  	put += uintptr(copy)
 10995  	*(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy)
 10996  	goto __61
 10997  __62:
 10998  	;
 10999  
 11000  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 11001  	goto __5
 11002  
 11003  __8:
 11004  	// get dynamic table entries descriptor
 11005  __75:
 11006  __78:
 11007  	if !(bits < (uint32(14))) {
 11008  		goto __79
 11009  	}
 11010  __80:
 11011  __83:
 11012  	if !(have == uint32(0)) {
 11013  		goto __86
 11014  	}
 11015  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11016  	if !(have == uint32(0)) {
 11017  		goto __87
 11018  	}
 11019  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11020  	ret = -5
 11021  	goto inf_leave
 11022  __87:
 11023  	;
 11024  __86:
 11025  	;
 11026  	goto __84
 11027  __84:
 11028  	if 0 != 0 {
 11029  		goto __83
 11030  	}
 11031  	goto __85
 11032  __85:
 11033  	;
 11034  	have--
 11035  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11036  	bits = bits + (uint32(8))
 11037  	goto __81
 11038  __81:
 11039  	if 0 != 0 {
 11040  		goto __80
 11041  	}
 11042  	goto __82
 11043  __82:
 11044  	;
 11045  	goto __78
 11046  __79:
 11047  	;
 11048  	goto __76
 11049  __76:
 11050  	if 0 != 0 {
 11051  		goto __75
 11052  	}
 11053  	goto __77
 11054  __77:
 11055  	;
 11056  	(*Inflate_state)(unsafe.Pointer(state)).Fnlen = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(257))
 11057  __88:
 11058  	hold >>= 5
 11059  	bits = bits - (uint32(5))
 11060  	goto __89
 11061  __89:
 11062  	if 0 != 0 {
 11063  		goto __88
 11064  	}
 11065  	goto __90
 11066  __90:
 11067  	;
 11068  	(*Inflate_state)(unsafe.Pointer(state)).Fndist = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(1))
 11069  __91:
 11070  	hold >>= 5
 11071  	bits = bits - (uint32(5))
 11072  	goto __92
 11073  __92:
 11074  	if 0 != 0 {
 11075  		goto __91
 11076  	}
 11077  	goto __93
 11078  __93:
 11079  	;
 11080  	(*Inflate_state)(unsafe.Pointer(state)).Fncode = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(4))
 11081  __94:
 11082  	hold >>= 4
 11083  	bits = bits - (uint32(4))
 11084  	goto __95
 11085  __95:
 11086  	if 0 != 0 {
 11087  		goto __94
 11088  	}
 11089  	goto __96
 11090  __96:
 11091  	;
 11092  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286)) || ((*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30))) {
 11093  		goto __97
 11094  	}
 11095  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */
 11096  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11097  	goto __5
 11098  __97:
 11099  	;
 11100  
 11101  	// get code length code lengths (not a typo)
 11102  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 11103  __98:
 11104  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) {
 11105  		goto __99
 11106  	}
 11107  __100:
 11108  __103:
 11109  	if !(bits < (uint32(3))) {
 11110  		goto __104
 11111  	}
 11112  __105:
 11113  __108:
 11114  	if !(have == uint32(0)) {
 11115  		goto __111
 11116  	}
 11117  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11118  	if !(have == uint32(0)) {
 11119  		goto __112
 11120  	}
 11121  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11122  	ret = -5
 11123  	goto inf_leave
 11124  __112:
 11125  	;
 11126  __111:
 11127  	;
 11128  	goto __109
 11129  __109:
 11130  	if 0 != 0 {
 11131  		goto __108
 11132  	}
 11133  	goto __110
 11134  __110:
 11135  	;
 11136  	have--
 11137  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11138  	bits = bits + (uint32(8))
 11139  	goto __106
 11140  __106:
 11141  	if 0 != 0 {
 11142  		goto __105
 11143  	}
 11144  	goto __107
 11145  __107:
 11146  	;
 11147  	goto __103
 11148  __104:
 11149  	;
 11150  	goto __101
 11151  __101:
 11152  	if 0 != 0 {
 11153  		goto __100
 11154  	}
 11155  	goto __102
 11156  __102:
 11157  	;
 11158  	*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = (uint16(uint32(hold) & ((uint32(1) << (3)) - uint32(1))))
 11159  __113:
 11160  	hold >>= 3
 11161  	bits = bits - (uint32(3))
 11162  	goto __114
 11163  __114:
 11164  	if 0 != 0 {
 11165  		goto __113
 11166  	}
 11167  	goto __115
 11168  __115:
 11169  	;
 11170  	goto __98
 11171  __99:
 11172  	;
 11173  __116:
 11174  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) {
 11175  		goto __117
 11176  	}
 11177  	*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0)
 11178  	goto __116
 11179  __117:
 11180  	;
 11181  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */
 11182  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 11183  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7)
 11184  	ret = Xinflate_table(tls, CODES, state+152 /* &.lens */, uint32(19), (state + 144 /* &.next */),
 11185  		(state + 120 /* &.lenbits */), state+792 /* &.work */)
 11186  	if !(ret != 0) {
 11187  		goto __118
 11188  	}
 11189  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */
 11190  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11191  	goto __5
 11192  __118:
 11193  	;
 11194  
 11195  	// get length and distance code code lengths
 11196  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 11197  __119:
 11198  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) {
 11199  		goto __120
 11200  	}
 11201  __121:
 11202  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4))
 11203  	if !((uint32(here.Fbits)) <= bits) {
 11204  		goto __124
 11205  	}
 11206  	goto __123
 11207  __124:
 11208  	;
 11209  __125:
 11210  __128:
 11211  	if !(have == uint32(0)) {
 11212  		goto __131
 11213  	}
 11214  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11215  	if !(have == uint32(0)) {
 11216  		goto __132
 11217  	}
 11218  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11219  	ret = -5
 11220  	goto inf_leave
 11221  __132:
 11222  	;
 11223  __131:
 11224  	;
 11225  	goto __129
 11226  __129:
 11227  	if 0 != 0 {
 11228  		goto __128
 11229  	}
 11230  	goto __130
 11231  __130:
 11232  	;
 11233  	have--
 11234  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11235  	bits = bits + (uint32(8))
 11236  	goto __126
 11237  __126:
 11238  	if 0 != 0 {
 11239  		goto __125
 11240  	}
 11241  	goto __127
 11242  __127:
 11243  	;
 11244  	goto __122
 11245  __122:
 11246  	goto __121
 11247  	goto __123
 11248  __123:
 11249  	;
 11250  	if !(int32(here.Fval) < 16) {
 11251  		goto __133
 11252  	}
 11253  __135:
 11254  	hold >>= int32(here.Fbits)
 11255  	bits = bits - (uint32(here.Fbits))
 11256  	goto __136
 11257  __136:
 11258  	if 0 != 0 {
 11259  		goto __135
 11260  	}
 11261  	goto __137
 11262  __137:
 11263  	;
 11264  	*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval
 11265  	goto __134
 11266  __133:
 11267  	if !(int32(here.Fval) == 16) {
 11268  		goto __138
 11269  	}
 11270  __140:
 11271  __143:
 11272  	if !(bits < (uint32(int32(here.Fbits) + 2))) {
 11273  		goto __144
 11274  	}
 11275  __145:
 11276  __148:
 11277  	if !(have == uint32(0)) {
 11278  		goto __151
 11279  	}
 11280  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11281  	if !(have == uint32(0)) {
 11282  		goto __152
 11283  	}
 11284  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11285  	ret = -5
 11286  	goto inf_leave
 11287  __152:
 11288  	;
 11289  __151:
 11290  	;
 11291  	goto __149
 11292  __149:
 11293  	if 0 != 0 {
 11294  		goto __148
 11295  	}
 11296  	goto __150
 11297  __150:
 11298  	;
 11299  	have--
 11300  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11301  	bits = bits + (uint32(8))
 11302  	goto __146
 11303  __146:
 11304  	if 0 != 0 {
 11305  		goto __145
 11306  	}
 11307  	goto __147
 11308  __147:
 11309  	;
 11310  	goto __143
 11311  __144:
 11312  	;
 11313  	goto __141
 11314  __141:
 11315  	if 0 != 0 {
 11316  		goto __140
 11317  	}
 11318  	goto __142
 11319  __142:
 11320  	;
 11321  __153:
 11322  	hold >>= int32(here.Fbits)
 11323  	bits = bits - (uint32(here.Fbits))
 11324  	goto __154
 11325  __154:
 11326  	if 0 != 0 {
 11327  		goto __153
 11328  	}
 11329  	goto __155
 11330  __155:
 11331  	;
 11332  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) {
 11333  		goto __156
 11334  	}
 11335  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
 11336  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11337  	goto __120
 11338  __156:
 11339  	;
 11340  	len = uint32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1)))*2)))
 11341  	copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (2)) - uint32(1))))
 11342  __157:
 11343  	hold >>= 2
 11344  	bits = bits - (uint32(2))
 11345  	goto __158
 11346  __158:
 11347  	if 0 != 0 {
 11348  		goto __157
 11349  	}
 11350  	goto __159
 11351  __159:
 11352  	;
 11353  	goto __139
 11354  __138:
 11355  	if !(int32(here.Fval) == 17) {
 11356  		goto __160
 11357  	}
 11358  __162:
 11359  __165:
 11360  	if !(bits < (uint32(int32(here.Fbits) + 3))) {
 11361  		goto __166
 11362  	}
 11363  __167:
 11364  __170:
 11365  	if !(have == uint32(0)) {
 11366  		goto __173
 11367  	}
 11368  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11369  	if !(have == uint32(0)) {
 11370  		goto __174
 11371  	}
 11372  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11373  	ret = -5
 11374  	goto inf_leave
 11375  __174:
 11376  	;
 11377  __173:
 11378  	;
 11379  	goto __171
 11380  __171:
 11381  	if 0 != 0 {
 11382  		goto __170
 11383  	}
 11384  	goto __172
 11385  __172:
 11386  	;
 11387  	have--
 11388  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11389  	bits = bits + (uint32(8))
 11390  	goto __168
 11391  __168:
 11392  	if 0 != 0 {
 11393  		goto __167
 11394  	}
 11395  	goto __169
 11396  __169:
 11397  	;
 11398  	goto __165
 11399  __166:
 11400  	;
 11401  	goto __163
 11402  __163:
 11403  	if 0 != 0 {
 11404  		goto __162
 11405  	}
 11406  	goto __164
 11407  __164:
 11408  	;
 11409  __175:
 11410  	hold >>= int32(here.Fbits)
 11411  	bits = bits - (uint32(here.Fbits))
 11412  	goto __176
 11413  __176:
 11414  	if 0 != 0 {
 11415  		goto __175
 11416  	}
 11417  	goto __177
 11418  __177:
 11419  	;
 11420  	len = uint32(0)
 11421  	copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (3)) - uint32(1))))
 11422  __178:
 11423  	hold >>= 3
 11424  	bits = bits - (uint32(3))
 11425  	goto __179
 11426  __179:
 11427  	if 0 != 0 {
 11428  		goto __178
 11429  	}
 11430  	goto __180
 11431  __180:
 11432  	;
 11433  	goto __161
 11434  __160:
 11435  __181:
 11436  __184:
 11437  	if !(bits < (uint32(int32(here.Fbits) + 7))) {
 11438  		goto __185
 11439  	}
 11440  __186:
 11441  __189:
 11442  	if !(have == uint32(0)) {
 11443  		goto __192
 11444  	}
 11445  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11446  	if !(have == uint32(0)) {
 11447  		goto __193
 11448  	}
 11449  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11450  	ret = -5
 11451  	goto inf_leave
 11452  __193:
 11453  	;
 11454  __192:
 11455  	;
 11456  	goto __190
 11457  __190:
 11458  	if 0 != 0 {
 11459  		goto __189
 11460  	}
 11461  	goto __191
 11462  __191:
 11463  	;
 11464  	have--
 11465  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11466  	bits = bits + (uint32(8))
 11467  	goto __187
 11468  __187:
 11469  	if 0 != 0 {
 11470  		goto __186
 11471  	}
 11472  	goto __188
 11473  __188:
 11474  	;
 11475  	goto __184
 11476  __185:
 11477  	;
 11478  	goto __182
 11479  __182:
 11480  	if 0 != 0 {
 11481  		goto __181
 11482  	}
 11483  	goto __183
 11484  __183:
 11485  	;
 11486  __194:
 11487  	hold >>= int32(here.Fbits)
 11488  	bits = bits - (uint32(here.Fbits))
 11489  	goto __195
 11490  __195:
 11491  	if 0 != 0 {
 11492  		goto __194
 11493  	}
 11494  	goto __196
 11495  __196:
 11496  	;
 11497  	len = uint32(0)
 11498  	copy = (uint32(11) + (uint32(hold) & ((uint32(1) << (7)) - uint32(1))))
 11499  __197:
 11500  	hold >>= 7
 11501  	bits = bits - (uint32(7))
 11502  	goto __198
 11503  __198:
 11504  	if 0 != 0 {
 11505  		goto __197
 11506  	}
 11507  	goto __199
 11508  __199:
 11509  	;
 11510  __161:
 11511  	;
 11512  __139:
 11513  	;
 11514  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fhave + copy) > ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) {
 11515  		goto __200
 11516  	}
 11517  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
 11518  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11519  	goto __120
 11520  __200:
 11521  	;
 11522  __201:
 11523  	if !(libc.PostDecUint32(&copy, 1) != 0) {
 11524  		goto __202
 11525  	}
 11526  	*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len)
 11527  	goto __201
 11528  __202:
 11529  	;
 11530  __134:
 11531  	;
 11532  	goto __119
 11533  __120:
 11534  	;
 11535  
 11536  	// handle error breaks in while
 11537  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) {
 11538  		goto __203
 11539  	}
 11540  	goto __5
 11541  __203:
 11542  	;
 11543  
 11544  	// check for end-of-block code (better have one)
 11545  	if !(int32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + 256*2))) == 0) {
 11546  		goto __204
 11547  	}
 11548  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */
 11549  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11550  	goto __5
 11551  __204:
 11552  	;
 11553  
 11554  	// build code tables -- note: do not change the lenbits or distbits
 11555  	//                values here (9 and 6) without reading the comments in inftrees.h
 11556  	//                concerning the ENOUGH constants, which depend on those values
 11557  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */
 11558  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 11559  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
 11560  	ret = Xinflate_table(tls, LENS, state+152 /* &.lens */, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, (state + 144 /* &.next */),
 11561  		(state + 120 /* &.lenbits */), state+792 /* &.work */)
 11562  	if !(ret != 0) {
 11563  		goto __205
 11564  	}
 11565  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */
 11566  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11567  	goto __5
 11568  __205:
 11569  	;
 11570  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 11571  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6)
 11572  	ret = Xinflate_table(tls, DISTS, ((state + 152 /* &.lens */) + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2), (*Inflate_state)(unsafe.Pointer(state)).Fndist,
 11573  		(state + 144 /* &.next */), (state + 124 /* &.distbits */), state+792 /* &.work */)
 11574  	if !(ret != 0) {
 11575  		goto __206
 11576  	}
 11577  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */
 11578  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11579  	goto __5
 11580  __206:
 11581  	;
 11582  
 11583  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 11584  
 11585  __9:
 11586  	// use inflate_fast() if we have enough input and output
 11587  	if !((have >= uint32(6)) && (left >= uint32(258))) {
 11588  		goto __207
 11589  	}
 11590  __208:
 11591  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 11592  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 11593  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */))
 11594  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 11595  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 11596  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 11597  	goto __209
 11598  __209:
 11599  	if 0 != 0 {
 11600  		goto __208
 11601  	}
 11602  	goto __210
 11603  __210:
 11604  	;
 11605  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) {
 11606  		goto __211
 11607  	}
 11608  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - left)
 11609  __211:
 11610  	;
 11611  	Xinflate_fast(tls, strm, (*Inflate_state)(unsafe.Pointer(state)).Fwsize)
 11612  __212:
 11613  	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 11614  	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 11615  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 11616  	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 11617  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 11618  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 11619  	goto __213
 11620  __213:
 11621  	if 0 != 0 {
 11622  		goto __212
 11623  	}
 11624  	goto __214
 11625  __214:
 11626  	;
 11627  	goto __5
 11628  __207:
 11629  	;
 11630  
 11631  	// get a literal, length, or end-of-block code
 11632  __215:
 11633  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4))
 11634  	if !((uint32(here.Fbits)) <= bits) {
 11635  		goto __218
 11636  	}
 11637  	goto __217
 11638  __218:
 11639  	;
 11640  __219:
 11641  __222:
 11642  	if !(have == uint32(0)) {
 11643  		goto __225
 11644  	}
 11645  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11646  	if !(have == uint32(0)) {
 11647  		goto __226
 11648  	}
 11649  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11650  	ret = -5
 11651  	goto inf_leave
 11652  __226:
 11653  	;
 11654  __225:
 11655  	;
 11656  	goto __223
 11657  __223:
 11658  	if 0 != 0 {
 11659  		goto __222
 11660  	}
 11661  	goto __224
 11662  __224:
 11663  	;
 11664  	have--
 11665  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11666  	bits = bits + (uint32(8))
 11667  	goto __220
 11668  __220:
 11669  	if 0 != 0 {
 11670  		goto __219
 11671  	}
 11672  	goto __221
 11673  __221:
 11674  	;
 11675  	goto __216
 11676  __216:
 11677  	goto __215
 11678  	goto __217
 11679  __217:
 11680  	;
 11681  	if !((here.Fop != 0) && ((int32(here.Fop) & 0xf0) == 0)) {
 11682  		goto __227
 11683  	}
 11684  	last = here
 11685  __228:
 11686  	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))
 11687  	if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) {
 11688  		goto __231
 11689  	}
 11690  	goto __230
 11691  __231:
 11692  	;
 11693  __232:
 11694  __235:
 11695  	if !(have == uint32(0)) {
 11696  		goto __238
 11697  	}
 11698  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11699  	if !(have == uint32(0)) {
 11700  		goto __239
 11701  	}
 11702  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11703  	ret = -5
 11704  	goto inf_leave
 11705  __239:
 11706  	;
 11707  __238:
 11708  	;
 11709  	goto __236
 11710  __236:
 11711  	if 0 != 0 {
 11712  		goto __235
 11713  	}
 11714  	goto __237
 11715  __237:
 11716  	;
 11717  	have--
 11718  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11719  	bits = bits + (uint32(8))
 11720  	goto __233
 11721  __233:
 11722  	if 0 != 0 {
 11723  		goto __232
 11724  	}
 11725  	goto __234
 11726  __234:
 11727  	;
 11728  	goto __229
 11729  __229:
 11730  	goto __228
 11731  	goto __230
 11732  __230:
 11733  	;
 11734  __240:
 11735  	hold >>= int32(last.Fbits)
 11736  	bits = bits - (uint32(last.Fbits))
 11737  	goto __241
 11738  __241:
 11739  	if 0 != 0 {
 11740  		goto __240
 11741  	}
 11742  	goto __242
 11743  __242:
 11744  	;
 11745  __227:
 11746  	;
 11747  __243:
 11748  	hold >>= int32(here.Fbits)
 11749  	bits = bits - (uint32(here.Fbits))
 11750  	goto __244
 11751  __244:
 11752  	if 0 != 0 {
 11753  		goto __243
 11754  	}
 11755  	goto __245
 11756  __245:
 11757  	;
 11758  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval)
 11759  
 11760  	// process literal
 11761  	if !(int32(here.Fop) == 0) {
 11762  		goto __246
 11763  	}
 11764  
 11765  __247:
 11766  	if !(left == uint32(0)) {
 11767  		goto __250
 11768  	}
 11769  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 11770  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 11771  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
 11772  	if !((*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(&out)))(tls, out_desc, put, left) != 0) {
 11773  		goto __251
 11774  	}
 11775  	ret = -5
 11776  	goto inf_leave
 11777  __251:
 11778  	;
 11779  __250:
 11780  	;
 11781  	goto __248
 11782  __248:
 11783  	if 0 != 0 {
 11784  		goto __247
 11785  	}
 11786  	goto __249
 11787  __249:
 11788  	;
 11789  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength)
 11790  	left--
 11791  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 11792  	goto __5
 11793  __246:
 11794  	;
 11795  
 11796  	// process end of block
 11797  	if !((int32(here.Fop) & 32) != 0) {
 11798  		goto __252
 11799  	}
 11800  
 11801  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 11802  	goto __5
 11803  __252:
 11804  	;
 11805  
 11806  	// invalid code
 11807  	if !((int32(here.Fop) & 64) != 0) {
 11808  		goto __253
 11809  	}
 11810  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */
 11811  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 11812  	goto __5
 11813  __253:
 11814  	;
 11815  
 11816  	// length code -- get extra bits, if any
 11817  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15))
 11818  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) {
 11819  		goto __254
 11820  	}
 11821  __255:
 11822  __258:
 11823  	if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) {
 11824  		goto __259
 11825  	}
 11826  __260:
 11827  __263:
 11828  	if !(have == uint32(0)) {
 11829  		goto __266
 11830  	}
 11831  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11832  	if !(have == uint32(0)) {
 11833  		goto __267
 11834  	}
 11835  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11836  	ret = -5
 11837  	goto inf_leave
 11838  __267:
 11839  	;
 11840  __266:
 11841  	;
 11842  	goto __264
 11843  __264:
 11844  	if 0 != 0 {
 11845  		goto __263
 11846  	}
 11847  	goto __265
 11848  __265:
 11849  	;
 11850  	have--
 11851  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11852  	bits = bits + (uint32(8))
 11853  	goto __261
 11854  __261:
 11855  	if 0 != 0 {
 11856  		goto __260
 11857  	}
 11858  	goto __262
 11859  __262:
 11860  	;
 11861  	goto __258
 11862  __259:
 11863  	;
 11864  	goto __256
 11865  __256:
 11866  	if 0 != 0 {
 11867  		goto __255
 11868  	}
 11869  	goto __257
 11870  __257:
 11871  	;
 11872  	*(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1)))
 11873  __268:
 11874  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 11875  	bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra)
 11876  	goto __269
 11877  __269:
 11878  	if 0 != 0 {
 11879  		goto __268
 11880  	}
 11881  	goto __270
 11882  __270:
 11883  	;
 11884  __254:
 11885  	;
 11886  
 11887  	// get distance code
 11888  __271:
 11889  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Fdistbits))-uint32(1))))*4))
 11890  	if !((uint32(here.Fbits)) <= bits) {
 11891  		goto __274
 11892  	}
 11893  	goto __273
 11894  __274:
 11895  	;
 11896  __275:
 11897  __278:
 11898  	if !(have == uint32(0)) {
 11899  		goto __281
 11900  	}
 11901  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11902  	if !(have == uint32(0)) {
 11903  		goto __282
 11904  	}
 11905  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11906  	ret = -5
 11907  	goto inf_leave
 11908  __282:
 11909  	;
 11910  __281:
 11911  	;
 11912  	goto __279
 11913  __279:
 11914  	if 0 != 0 {
 11915  		goto __278
 11916  	}
 11917  	goto __280
 11918  __280:
 11919  	;
 11920  	have--
 11921  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11922  	bits = bits + (uint32(8))
 11923  	goto __276
 11924  __276:
 11925  	if 0 != 0 {
 11926  		goto __275
 11927  	}
 11928  	goto __277
 11929  __277:
 11930  	;
 11931  	goto __272
 11932  __272:
 11933  	goto __271
 11934  	goto __273
 11935  __273:
 11936  	;
 11937  	if !((int32(here.Fop) & 0xf0) == 0) {
 11938  		goto __283
 11939  	}
 11940  	last = here
 11941  __284:
 11942  	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))
 11943  	if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) {
 11944  		goto __287
 11945  	}
 11946  	goto __286
 11947  __287:
 11948  	;
 11949  __288:
 11950  __291:
 11951  	if !(have == uint32(0)) {
 11952  		goto __294
 11953  	}
 11954  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 11955  	if !(have == uint32(0)) {
 11956  		goto __295
 11957  	}
 11958  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 11959  	ret = -5
 11960  	goto inf_leave
 11961  __295:
 11962  	;
 11963  __294:
 11964  	;
 11965  	goto __292
 11966  __292:
 11967  	if 0 != 0 {
 11968  		goto __291
 11969  	}
 11970  	goto __293
 11971  __293:
 11972  	;
 11973  	have--
 11974  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 11975  	bits = bits + (uint32(8))
 11976  	goto __289
 11977  __289:
 11978  	if 0 != 0 {
 11979  		goto __288
 11980  	}
 11981  	goto __290
 11982  __290:
 11983  	;
 11984  	goto __285
 11985  __285:
 11986  	goto __284
 11987  	goto __286
 11988  __286:
 11989  	;
 11990  __296:
 11991  	hold >>= int32(last.Fbits)
 11992  	bits = bits - (uint32(last.Fbits))
 11993  	goto __297
 11994  __297:
 11995  	if 0 != 0 {
 11996  		goto __296
 11997  	}
 11998  	goto __298
 11999  __298:
 12000  	;
 12001  __283:
 12002  	;
 12003  __299:
 12004  	hold >>= int32(here.Fbits)
 12005  	bits = bits - (uint32(here.Fbits))
 12006  	goto __300
 12007  __300:
 12008  	if 0 != 0 {
 12009  		goto __299
 12010  	}
 12011  	goto __301
 12012  __301:
 12013  	;
 12014  	if !((int32(here.Fop) & 64) != 0) {
 12015  		goto __302
 12016  	}
 12017  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */
 12018  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12019  	goto __5
 12020  __302:
 12021  	;
 12022  	(*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval)
 12023  
 12024  	// get distance extra bits, if any
 12025  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15))
 12026  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != uint32(0)) {
 12027  		goto __303
 12028  	}
 12029  __304:
 12030  __307:
 12031  	if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) {
 12032  		goto __308
 12033  	}
 12034  __309:
 12035  __312:
 12036  	if !(have == uint32(0)) {
 12037  		goto __315
 12038  	}
 12039  	have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&in)))(tls, in_desc, bp /* &next */)
 12040  	if !(have == uint32(0)) {
 12041  		goto __316
 12042  	}
 12043  	*(*uintptr)(unsafe.Pointer(bp /* next */)) = uintptr(Z_NULL)
 12044  	ret = -5
 12045  	goto inf_leave
 12046  __316:
 12047  	;
 12048  __315:
 12049  	;
 12050  	goto __313
 12051  __313:
 12052  	if 0 != 0 {
 12053  		goto __312
 12054  	}
 12055  	goto __314
 12056  __314:
 12057  	;
 12058  	have--
 12059  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp /* next */)), 1))))) << bits)
 12060  	bits = bits + (uint32(8))
 12061  	goto __310
 12062  __310:
 12063  	if 0 != 0 {
 12064  		goto __309
 12065  	}
 12066  	goto __311
 12067  __311:
 12068  	;
 12069  	goto __307
 12070  __308:
 12071  	;
 12072  	goto __305
 12073  __305:
 12074  	if 0 != 0 {
 12075  		goto __304
 12076  	}
 12077  	goto __306
 12078  __306:
 12079  	;
 12080  	*(*uint32)(unsafe.Pointer(state + 96 /* &.offset */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1)))
 12081  __317:
 12082  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 12083  	bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra)
 12084  	goto __318
 12085  __318:
 12086  	if 0 != 0 {
 12087  		goto __317
 12088  	}
 12089  	goto __319
 12090  __319:
 12091  	;
 12092  __303:
 12093  	;
 12094  	if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (func() uint32 {
 12095  		if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 12096  			return left
 12097  		}
 12098  		return uint32(0)
 12099  	}()))) {
 12100  		goto __320
 12101  	}
 12102  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */
 12103  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12104  	goto __5
 12105  __320:
 12106  	;
 12107  
 12108  	// copy match from window to output
 12109  __321:
 12110  __324:
 12111  	if !(left == uint32(0)) {
 12112  		goto __327
 12113  	}
 12114  	put = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 12115  	left = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 12116  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = left
 12117  	if !((*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(&out)))(tls, out_desc, put, left) != 0) {
 12118  		goto __328
 12119  	}
 12120  	ret = -5
 12121  	goto inf_leave
 12122  __328:
 12123  	;
 12124  __327:
 12125  	;
 12126  	goto __325
 12127  __325:
 12128  	if 0 != 0 {
 12129  		goto __324
 12130  	}
 12131  	goto __326
 12132  __326:
 12133  	;
 12134  	copy = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Foffset)
 12135  	if !(copy < left) {
 12136  		goto __329
 12137  	}
 12138  	from = (put + uintptr(copy))
 12139  	copy = (left - copy)
 12140  	goto __330
 12141  __329:
 12142  	from = (put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset))
 12143  	copy = left
 12144  __330:
 12145  	;
 12146  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) {
 12147  		goto __331
 12148  	}
 12149  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 12150  __331:
 12151  	;
 12152  	*(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy)
 12153  	left = left - (copy)
 12154  __332:
 12155  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12156  	goto __333
 12157  __333:
 12158  	if libc.PreDecUint32(&copy, 1) != 0 {
 12159  		goto __332
 12160  	}
 12161  	goto __334
 12162  __334:
 12163  	;
 12164  	goto __322
 12165  __322:
 12166  	if (*Inflate_state)(unsafe.Pointer(state)).Flength != uint32(0) {
 12167  		goto __321
 12168  	}
 12169  	goto __323
 12170  __323:
 12171  	;
 12172  	goto __5
 12173  
 12174  __10:
 12175  	// inflate stream terminated properly -- write leftover output
 12176  	ret = Z_STREAM_END
 12177  	if !(left < (*Inflate_state)(unsafe.Pointer(state)).Fwsize) {
 12178  		goto __335
 12179  	}
 12180  	if !((*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(&out)))(tls, out_desc, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, ((*Inflate_state)(unsafe.Pointer(state)).Fwsize-left)) != 0) {
 12181  		goto __336
 12182  	}
 12183  	ret = -5
 12184  __336:
 12185  	;
 12186  __335:
 12187  	;
 12188  	goto inf_leave
 12189  
 12190  __11:
 12191  	ret = -3
 12192  	goto inf_leave
 12193  
 12194  __12: // can't happen, but makes compilers happy
 12195  	ret = -2
 12196  	goto inf_leave
 12197  __5:
 12198  	;
 12199  	goto __3
 12200  __3:
 12201  	goto __2
 12202  	goto __4
 12203  __4:
 12204  	;
 12205  
 12206  	// Return unused input
 12207  inf_leave:
 12208  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp /* next */))
 12209  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 12210  	return ret
 12211  }
 12212  
 12213  var order =                                                                                                                                                                                                                          // permutation of code lengths
 12214  [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 */
 12215  
 12216  func XinflateBackEnd(tls *libc.TLS, strm Z_streamp) int32 { /* infback.c:631:13: */
 12217  	if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fstate == uintptr(Z_NULL))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) {
 12218  		return -2
 12219  	}
 12220  	(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((strm + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
 12221  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
 12222  
 12223  	return Z_OK
 12224  }
 12225  
 12226  //
 12227  //    Decode literal, length, and distance codes and write out the resulting
 12228  //    literal and match bytes until either not enough input or output is
 12229  //    available, an end-of-block is encountered, or a data error is encountered.
 12230  //    When large enough input and output buffers are supplied to inflate(), for
 12231  //    example, a 16K input buffer and a 64K output buffer, more than 95% of the
 12232  //    inflate execution time is spent in this routine.
 12233  //
 12234  //    Entry assumptions:
 12235  //
 12236  //         state->mode == LEN
 12237  //         strm->avail_in >= 6
 12238  //         strm->avail_out >= 258
 12239  //         start >= strm->avail_out
 12240  //         state->bits < 8
 12241  //
 12242  //    On return, state->mode is one of:
 12243  //
 12244  //         LEN -- ran out of enough output space or enough available input
 12245  //         TYPE -- reached end of block code, inflate() to interpret next block
 12246  //         BAD -- error in block data
 12247  //
 12248  //    Notes:
 12249  //
 12250  //     - The maximum input bits used by a length/distance pair is 15 bits for the
 12251  //       length code, 5 bits for the length extra, 15 bits for the distance code,
 12252  //       and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
 12253  //       Therefore if strm->avail_in >= 6, then there is enough input to avoid
 12254  //       checking for available input while decoding.
 12255  //
 12256  //     - The maximum bytes that a single length/distance pair can output is 258
 12257  //       bytes, which is the maximum length that can be coded.  inflate_fast()
 12258  //       requires strm->avail_out >= 258 for each loop to avoid checking for
 12259  //       output space.
 12260  //
 12261  func Xinflate_fast(tls *libc.TLS, strm Z_streamp, start uint32) { /* inffast.c:50:20: */
 12262  	var state uintptr
 12263  	var in uintptr     // local strm->next_in
 12264  	var last uintptr   // have enough input while in < last
 12265  	var out uintptr    // local strm->next_out
 12266  	var beg uintptr    // inflate()'s initial strm->next_out
 12267  	var end uintptr    // while out < end, enough space available
 12268  	var wsize uint32   // window size or zero if not using window
 12269  	var whave uint32   // valid bytes in the window
 12270  	var wnext uint32   // window write index
 12271  	var window uintptr // allocated sliding window, if wsize != 0
 12272  	var hold uint64    // local strm->hold
 12273  	var bits uint32    // local strm->bits
 12274  	var lcode uintptr  // local strm->lencode
 12275  	var dcode uintptr  // local strm->distcode
 12276  	var lmask uint32   // mask for first level of length codes
 12277  	var dmask uint32   // mask for first level of distance codes
 12278  	var here Code      // retrieved table entry
 12279  	var op uint32      // code bits, operation, extra bits, or
 12280  	//  window position, window bytes to copy
 12281  	var len uint32   // match length, unused bytes
 12282  	var dist uint32  // match distance
 12283  	var from uintptr // where to copy match from
 12284  
 12285  	// copy state to local variables
 12286  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 12287  	in = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 12288  	last = (in + uintptr(((*Z_stream)(unsafe.Pointer(strm)).Favail_in - UInt(5))))
 12289  	out = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 12290  	beg = (out - uintptr((start - (*Z_stream)(unsafe.Pointer(strm)).Favail_out)))
 12291  	end = (out + uintptr(((*Z_stream)(unsafe.Pointer(strm)).Favail_out - UInt(257))))
 12292  	wsize = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 12293  	whave = (*Inflate_state)(unsafe.Pointer(state)).Fwhave
 12294  	wnext = (*Inflate_state)(unsafe.Pointer(state)).Fwnext
 12295  	window = (*Inflate_state)(unsafe.Pointer(state)).Fwindow
 12296  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 12297  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 12298  	lcode = (*Inflate_state)(unsafe.Pointer(state)).Flencode
 12299  	dcode = (*Inflate_state)(unsafe.Pointer(state)).Fdistcode
 12300  	lmask = ((uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Flenbits) - uint32(1))
 12301  	dmask = ((uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fdistbits) - uint32(1))
 12302  
 12303  	// decode literals and length/distances until end-of-block or not enough
 12304  	//        input data or output space
 12305  __1:
 12306  	if !(bits < uint32(15)) {
 12307  		goto __4
 12308  	}
 12309  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits)
 12310  	bits = bits + (uint32(8))
 12311  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits)
 12312  	bits = bits + (uint32(8))
 12313  __4:
 12314  	;
 12315  	here = *(*Code)(unsafe.Pointer(lcode + uintptr((hold&uint64(lmask)))*4))
 12316  dolen:
 12317  	op = uint32(here.Fbits)
 12318  	hold >>= op
 12319  	bits = bits - (op)
 12320  	op = uint32(here.Fop)
 12321  	if !(op == uint32(0)) {
 12322  		goto __5
 12323  	} // literal
 12324  
 12325  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = uint8(here.Fval)
 12326  	goto __6
 12327  __5:
 12328  	if !((op & uint32(16)) != 0) {
 12329  		goto __7
 12330  	} // length base
 12331  	len = uint32(here.Fval)
 12332  	op = op & (uint32(15)) // number of extra bits
 12333  	if !(op != 0) {
 12334  		goto __9
 12335  	}
 12336  	if !(bits < op) {
 12337  		goto __10
 12338  	}
 12339  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits)
 12340  	bits = bits + (uint32(8))
 12341  __10:
 12342  	;
 12343  	len = len + (uint32(hold) & ((uint32(1) << op) - uint32(1)))
 12344  	hold >>= op
 12345  	bits = bits - (op)
 12346  __9:
 12347  	;
 12348  
 12349  	if !(bits < uint32(15)) {
 12350  		goto __11
 12351  	}
 12352  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits)
 12353  	bits = bits + (uint32(8))
 12354  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits)
 12355  	bits = bits + (uint32(8))
 12356  __11:
 12357  	;
 12358  	here = *(*Code)(unsafe.Pointer(dcode + uintptr((hold&uint64(dmask)))*4))
 12359  dodist:
 12360  	op = uint32(here.Fbits)
 12361  	hold >>= op
 12362  	bits = bits - (op)
 12363  	op = uint32(here.Fop)
 12364  	if !((op & uint32(16)) != 0) {
 12365  		goto __12
 12366  	} // distance base
 12367  	dist = uint32(here.Fval)
 12368  	op = op & (uint32(15)) // number of extra bits
 12369  	if !(bits < op) {
 12370  		goto __14
 12371  	}
 12372  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits)
 12373  	bits = bits + (uint32(8))
 12374  	if !(bits < op) {
 12375  		goto __15
 12376  	}
 12377  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&in, 1))))) << bits)
 12378  	bits = bits + (uint32(8))
 12379  __15:
 12380  	;
 12381  __14:
 12382  	;
 12383  	dist = dist + (uint32(hold) & ((uint32(1) << op) - uint32(1)))
 12384  	hold >>= op
 12385  	bits = bits - (op)
 12386  
 12387  	op = (uint32((int64(out) - int64(beg)) / 1)) // max distance in output
 12388  	if !(dist > op) {
 12389  		goto __16
 12390  	} // see if copy from window
 12391  	op = (dist - op) // distance back in window
 12392  	if !(op > whave) {
 12393  		goto __18
 12394  	}
 12395  	if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) {
 12396  		goto __19
 12397  	}
 12398  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */
 12399  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12400  	goto __3
 12401  __19:
 12402  	;
 12403  __18:
 12404  	;
 12405  	from = window
 12406  	if !(wnext == uint32(0)) {
 12407  		goto __20
 12408  	} // very common case
 12409  	from += (uintptr(wsize - op))
 12410  	if !(op < len) {
 12411  		goto __22
 12412  	} // some from window
 12413  	len = len - (op)
 12414  __23:
 12415  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12416  	goto __24
 12417  __24:
 12418  	if libc.PreDecUint32(&op, 1) != 0 {
 12419  		goto __23
 12420  	}
 12421  	goto __25
 12422  __25:
 12423  	;
 12424  	from = (out - uintptr(dist)) // rest from output
 12425  __22:
 12426  	;
 12427  	goto __21
 12428  __20:
 12429  	if !(wnext < op) {
 12430  		goto __26
 12431  	} // wrap around window
 12432  	from += (uintptr((wsize + wnext) - op))
 12433  	op = op - (wnext)
 12434  	if !(op < len) {
 12435  		goto __28
 12436  	} // some from end of window
 12437  	len = len - (op)
 12438  __29:
 12439  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12440  	goto __30
 12441  __30:
 12442  	if libc.PreDecUint32(&op, 1) != 0 {
 12443  		goto __29
 12444  	}
 12445  	goto __31
 12446  __31:
 12447  	;
 12448  	from = window
 12449  	if !(wnext < len) {
 12450  		goto __32
 12451  	} // some from start of window
 12452  	op = wnext
 12453  	len = len - (op)
 12454  __33:
 12455  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12456  	goto __34
 12457  __34:
 12458  	if libc.PreDecUint32(&op, 1) != 0 {
 12459  		goto __33
 12460  	}
 12461  	goto __35
 12462  __35:
 12463  	;
 12464  	from = (out - uintptr(dist)) // rest from output
 12465  __32:
 12466  	;
 12467  __28:
 12468  	;
 12469  	goto __27
 12470  __26: // contiguous in window
 12471  	from += (uintptr(wnext - op))
 12472  	if !(op < len) {
 12473  		goto __36
 12474  	} // some from window
 12475  	len = len - (op)
 12476  __37:
 12477  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12478  	goto __38
 12479  __38:
 12480  	if libc.PreDecUint32(&op, 1) != 0 {
 12481  		goto __37
 12482  	}
 12483  	goto __39
 12484  __39:
 12485  	;
 12486  	from = (out - uintptr(dist)) // rest from output
 12487  __36:
 12488  	;
 12489  __27:
 12490  	;
 12491  __21:
 12492  	;
 12493  __40:
 12494  	if !(len > uint32(2)) {
 12495  		goto __41
 12496  	}
 12497  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12498  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12499  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12500  	len = len - (uint32(3))
 12501  	goto __40
 12502  __41:
 12503  	;
 12504  	if !(len != 0) {
 12505  		goto __42
 12506  	}
 12507  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12508  	if !(len > uint32(1)) {
 12509  		goto __43
 12510  	}
 12511  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12512  __43:
 12513  	;
 12514  __42:
 12515  	;
 12516  	goto __17
 12517  __16:
 12518  	from = (out - uintptr(dist)) // copy direct from output
 12519  __44: // minimum length is three
 12520  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12521  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12522  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12523  	len = len - (uint32(3))
 12524  	goto __45
 12525  __45:
 12526  	if len > uint32(2) {
 12527  		goto __44
 12528  	}
 12529  	goto __46
 12530  __46:
 12531  	;
 12532  	if !(len != 0) {
 12533  		goto __47
 12534  	}
 12535  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12536  	if !(len > uint32(1)) {
 12537  		goto __48
 12538  	}
 12539  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&out, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 12540  __48:
 12541  	;
 12542  __47:
 12543  	;
 12544  __17:
 12545  	;
 12546  	goto __13
 12547  __12:
 12548  	if !((op & uint32(64)) == uint32(0)) {
 12549  		goto __49
 12550  	} // 2nd level distance code
 12551  	here = *(*Code)(unsafe.Pointer(dcode + uintptr((uint64(here.Fval)+(hold&(uint64((uint32(1)<<op)-uint32(1))))))*4))
 12552  	goto dodist
 12553  	goto __50
 12554  __49:
 12555  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */
 12556  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12557  	goto __3
 12558  __50:
 12559  	;
 12560  __13:
 12561  	;
 12562  	goto __8
 12563  __7:
 12564  	if !((op & uint32(64)) == uint32(0)) {
 12565  		goto __51
 12566  	} // 2nd level length code
 12567  	here = *(*Code)(unsafe.Pointer(lcode + uintptr((uint64(here.Fval)+(hold&(uint64((uint32(1)<<op)-uint32(1))))))*4))
 12568  	goto dolen
 12569  	goto __52
 12570  __51:
 12571  	if !((op & uint32(32)) != 0) {
 12572  		goto __53
 12573  	} // end-of-block
 12574  
 12575  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 12576  	goto __3
 12577  	goto __54
 12578  __53:
 12579  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */
 12580  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 12581  	goto __3
 12582  __54:
 12583  	;
 12584  __52:
 12585  	;
 12586  __8:
 12587  	;
 12588  __6:
 12589  	;
 12590  	goto __2
 12591  __2:
 12592  	if (in < last) && (out < end) {
 12593  		goto __1
 12594  	}
 12595  	goto __3
 12596  __3:
 12597  	;
 12598  
 12599  	// return unused bytes (on entry, bits < 8, so in won't go too far back)
 12600  	len = (bits >> 3)
 12601  	in -= uintptr(len)
 12602  	bits = bits - (len << 3)
 12603  	hold = hold & (uint64((uint32(1) << bits) - uint32(1)))
 12604  
 12605  	// update state and return
 12606  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = in
 12607  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = out
 12608  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = func() uint32 {
 12609  		if in < last {
 12610  			return (uint32(int64(5) + ((int64(last) - int64(in)) / 1)))
 12611  		}
 12612  		return (uint32(int64(5) - ((int64(in) - int64(last)) / 1)))
 12613  	}()
 12614  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = func() uint32 {
 12615  		if out < end {
 12616  			return (uint32(int64(257) + ((int64(end) - int64(out)) / 1)))
 12617  		}
 12618  		return (uint32(int64(257) - ((int64(out) - int64(end)) / 1)))
 12619  	}()
 12620  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 12621  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 12622  	return
 12623  }
 12624  
 12625  //
 12626  //    inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
 12627  //    - Using bit fields for code structure
 12628  //    - Different op definition to avoid & for extra bits (do & for table bits)
 12629  //    - Three separate decoding do-loops for direct, window, and wnext == 0
 12630  //    - Special case for distance > 1 copies to do overlapped load and store copy
 12631  //    - Explicit branch predictions (based on measured branch probabilities)
 12632  //    - Deferring match copy and interspersed it with decoding subsequent codes
 12633  //    - Swapping literal/length else
 12634  //    - Swapping window/direct else
 12635  //    - Larger unrolled copy loops (three is about right)
 12636  //    - Moving len -= 3 statement into middle of loop
 12637  //
 12638  
 12639  func inflateStateCheck(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:105:11: */
 12640  	var state uintptr
 12641  	if ((strm == uintptr(Z_NULL)) || ((*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0))) || ((*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0)) {
 12642  		return 1
 12643  	}
 12644  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 12645  	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) {
 12646  		return 1
 12647  	}
 12648  	return 0
 12649  }
 12650  
 12651  func XinflateResetKeep(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:119:13: */
 12652  	var state uintptr
 12653  
 12654  	if inflateStateCheck(tls, strm) != 0 {
 12655  		return -2
 12656  	}
 12657  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 12658  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = libc.AssignPtrUint64(strm+40 /* &.total_out */, libc.AssignPtrUint64(state+40 /* &.total */, uint64(0)))
 12659  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL)
 12660  	if (*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0 { // to support ill-conceived Java test suite
 12661  		(*Z_stream)(unsafe.Pointer(strm)).Fadler = (ULong((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1))
 12662  	}
 12663  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD
 12664  	(*Inflate_state)(unsafe.Pointer(state)).Flast = 0
 12665  	(*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 0
 12666  	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = 32768
 12667  	(*Inflate_state)(unsafe.Pointer(state)).Fhead = Gz_headerp(Z_NULL)
 12668  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = uint64(0)
 12669  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0)
 12670  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = libc.AssignPtrUintptr(state+112 /* &.distcode */, libc.AssignPtrUintptr(state+144 /* &.next */, state+1368 /* &.codes */))
 12671  	(*Inflate_state)(unsafe.Pointer(state)).Fsane = 1
 12672  	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
 12673  
 12674  	return Z_OK
 12675  }
 12676  
 12677  func XinflateReset(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:144:13: */
 12678  	var state uintptr
 12679  
 12680  	if inflateStateCheck(tls, strm) != 0 {
 12681  		return -2
 12682  	}
 12683  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 12684  	(*Inflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0)
 12685  	(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
 12686  	(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 12687  	return XinflateResetKeep(tls, strm)
 12688  }
 12689  
 12690  func XinflateReset2(tls *libc.TLS, strm Z_streamp, windowBits int32) int32 { /* inflate.c:157:13: */
 12691  	var wrap int32
 12692  	var state uintptr
 12693  
 12694  	// get the state
 12695  	if inflateStateCheck(tls, strm) != 0 {
 12696  		return -2
 12697  	}
 12698  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 12699  
 12700  	// extract wrap request from windowBits parameter
 12701  	if windowBits < 0 {
 12702  		wrap = 0
 12703  		windowBits = -windowBits
 12704  	} else {
 12705  		wrap = ((windowBits >> 4) + 5)
 12706  		if windowBits < 48 {
 12707  			windowBits = windowBits & (15)
 12708  		}
 12709  	}
 12710  
 12711  	// set number of window bits, free window if different
 12712  	if (windowBits != 0) && ((windowBits < 8) || (windowBits > 15)) {
 12713  		return -2
 12714  	}
 12715  	if ((*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL)) && ((*Inflate_state)(unsafe.Pointer(state)).Fwbits != uint32(windowBits)) {
 12716  		(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((strm + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow)
 12717  		(*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL)
 12718  	}
 12719  
 12720  	// update state and reset the rest of it
 12721  	(*Inflate_state)(unsafe.Pointer(state)).Fwrap = wrap
 12722  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(windowBits)
 12723  	return XinflateReset(tls, strm)
 12724  }
 12725  
 12726  func XinflateInit2_(tls *libc.TLS, strm Z_streamp, windowBits int32, version uintptr, stream_size int32) int32 { /* inflate.c:195:13: */
 12727  	var ret int32
 12728  	var state uintptr
 12729  
 12730  	if ((version == uintptr(Z_NULL)) || (int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(ts /* "1.2.11" */))))) || (stream_size != (int32(unsafe.Sizeof(Z_stream{})))) {
 12731  		return -6
 12732  	}
 12733  	if strm == uintptr(Z_NULL) {
 12734  		return -2
 12735  	}
 12736  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(Z_NULL) // in case we return an error
 12737  	if (*Z_stream)(unsafe.Pointer(strm)).Fzalloc == uintptr(0) {
 12738  		(*Z_stream)(unsafe.Pointer(strm)).Fzalloc = *(*uintptr)(unsafe.Pointer(&struct {
 12739  			f func(*libc.TLS, Voidpf, uint32, uint32) Voidpf
 12740  		}{Xzcalloc}))
 12741  		(*Z_stream)(unsafe.Pointer(strm)).Fopaque = uintptr(0)
 12742  	}
 12743  	if (*Z_stream)(unsafe.Pointer(strm)).Fzfree == uintptr(0) {
 12744  		(*Z_stream)(unsafe.Pointer(strm)).Fzfree = *(*uintptr)(unsafe.Pointer(&struct {
 12745  			f func(*libc.TLS, Voidpf, Voidpf)
 12746  		}{Xzcfree}))
 12747  	}
 12748  	state = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((strm + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Inflate_state{})))
 12749  	if state == uintptr(Z_NULL) {
 12750  		return -4
 12751  	}
 12752  
 12753  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = state
 12754  	(*Inflate_state)(unsafe.Pointer(state)).Fstrm = strm
 12755  	(*Inflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(Z_NULL)
 12756  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HEAD // to pass state test in inflateReset2()
 12757  	ret = XinflateReset2(tls, strm, windowBits)
 12758  	if ret != Z_OK {
 12759  		(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((strm + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, state)
 12760  		(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
 12761  	}
 12762  	return ret
 12763  }
 12764  
 12765  func XinflateInit_(tls *libc.TLS, strm Z_streamp, version uintptr, stream_size int32) int32 { /* inflate.c:239:13: */
 12766  	return XinflateInit2_(tls, strm, MAX_WBITS, version, stream_size)
 12767  }
 12768  
 12769  func XinflatePrime(tls *libc.TLS, strm Z_streamp, bits int32, value int32) int32 { /* inflate.c:247:13: */
 12770  	var state uintptr
 12771  
 12772  	if inflateStateCheck(tls, strm) != 0 {
 12773  		return -2
 12774  	}
 12775  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 12776  	if bits < 0 {
 12777  		(*Inflate_state)(unsafe.Pointer(state)).Fhold = uint64(0)
 12778  		(*Inflate_state)(unsafe.Pointer(state)).Fbits = uint32(0)
 12779  		return Z_OK
 12780  	}
 12781  	if (bits > 16) || (((*Inflate_state)(unsafe.Pointer(state)).Fbits + UInt(bits)) > uint32(32)) {
 12782  		return -2
 12783  	}
 12784  	value = int32(int64(value) & ((int64(1) << bits) - int64(1)))
 12785  	*(*uint64)(unsafe.Pointer(state + 80 /* &.hold */)) += (uint64(uint32(value) << (*Inflate_state)(unsafe.Pointer(state)).Fbits))
 12786  	*(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) += (UInt(bits))
 12787  	return Z_OK
 12788  }
 12789  
 12790  //
 12791  //    Return state with length and distance decoding tables and index sizes set to
 12792  //    fixed code decoding.  Normally this returns fixed tables from inffixed.h.
 12793  //    If BUILDFIXED is defined, then instead this routine builds the tables the
 12794  //    first time it's called, and returns those tables the first time and
 12795  //    thereafter.  This reduces the size of the code by about 2K bytes, in
 12796  //    exchange for a little execution time.  However, BUILDFIXED should not be
 12797  //    used for threaded applications, since the rewriting of the tables and virgin
 12798  //    may not be thread-safe.
 12799  //
 12800  func fixedtables1(tls *libc.TLS, state uintptr) { /* inflate.c:278:12: */
 12801  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&lenfix1))
 12802  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
 12803  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&distfix1))
 12804  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5)
 12805  }
 12806  
 12807  var lenfix1 = [512]Code{
 12808  	{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)},
 12809  	{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)},
 12810  	{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)},
 12811  	{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)},
 12812  	{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)},
 12813  	{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)},
 12814  	{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)},
 12815  	{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)},
 12816  	{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)},
 12817  	{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)},
 12818  	{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)},
 12819  	{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)},
 12820  	{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)},
 12821  	{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)},
 12822  	{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)},
 12823  	{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)},
 12824  	{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)},
 12825  	{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)},
 12826  	{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)},
 12827  	{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)},
 12828  	{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)},
 12829  	{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)},
 12830  	{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)},
 12831  	{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)},
 12832  	{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)},
 12833  	{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)},
 12834  	{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)},
 12835  	{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)},
 12836  	{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)},
 12837  	{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)},
 12838  	{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)},
 12839  	{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)},
 12840  	{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)},
 12841  	{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)},
 12842  	{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)},
 12843  	{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)},
 12844  	{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)},
 12845  	{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)},
 12846  	{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)},
 12847  	{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)},
 12848  	{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)},
 12849  	{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)},
 12850  	{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)},
 12851  	{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)},
 12852  	{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)},
 12853  	{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)},
 12854  	{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)},
 12855  	{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)},
 12856  	{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)},
 12857  	{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)},
 12858  	{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)},
 12859  	{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)},
 12860  	{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)},
 12861  	{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)},
 12862  	{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)},
 12863  	{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)},
 12864  	{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)},
 12865  	{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)},
 12866  	{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)},
 12867  	{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)},
 12868  	{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)},
 12869  	{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)},
 12870  	{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)},
 12871  	{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)},
 12872  	{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)},
 12873  	{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)},
 12874  	{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)},
 12875  	{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)},
 12876  	{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)},
 12877  	{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)},
 12878  	{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)},
 12879  	{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)},
 12880  	{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)},
 12881  	{Fbits: uint8(9), Fval: uint16(255)},
 12882  } /* inffixed.h:10:23 */
 12883  var distfix1 = [32]Code{
 12884  	{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)},
 12885  	{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)},
 12886  	{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)},
 12887  	{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)},
 12888  	{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)},
 12889  	{Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193)}, {Fop: uint8(64), Fbits: uint8(5)},
 12890  } /* inffixed.h:87:23 */
 12891  
 12892  //
 12893  //    Update the window with the last wsize (normally 32K) bytes written before
 12894  //    returning.  If window does not exist yet, create it.  This is only called
 12895  //    when a window is already in use, or when output has been written during this
 12896  //    inflate call, but the end of the deflate stream has not been reached yet.
 12897  //    It is also called to create a window for dictionary data when a dictionary
 12898  //    is loaded.
 12899  //
 12900  //    Providing output buffers larger than 32K to inflate() should provide a speed
 12901  //    advantage, since only the last 32K of output is copied to the sliding window
 12902  //    upon return from inflate(), and since all distances after the first 32K of
 12903  //    output will fall in the output data, making match copies simpler and faster.
 12904  //    The advantage may be dependent on the size of the processor's data caches.
 12905  //
 12906  func updatewindow(tls *libc.TLS, strm Z_streamp, end uintptr, copy uint32) int32 { /* inflate.c:396:11: */
 12907  	var state uintptr
 12908  	var dist uint32
 12909  
 12910  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 12911  
 12912  	// if it hasn't been done already, allocate space for the window
 12913  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) {
 12914  		(*Inflate_state)(unsafe.Pointer(state)).Fwindow = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((strm + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits), uint32(unsafe.Sizeof(uint8(0))))
 12915  		if (*Inflate_state)(unsafe.Pointer(state)).Fwindow == uintptr(Z_NULL) {
 12916  			return 1
 12917  		}
 12918  	}
 12919  
 12920  	// if window not in use yet, initialize
 12921  	if (*Inflate_state)(unsafe.Pointer(state)).Fwsize == uint32(0) {
 12922  		(*Inflate_state)(unsafe.Pointer(state)).Fwsize = (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits)
 12923  		(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 12924  		(*Inflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0)
 12925  	}
 12926  
 12927  	// copy state->wsize or less output bytes into the circular window
 12928  	if copy >= (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 12929  		libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (end - uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwsize)), uint64((*Inflate_state)(unsafe.Pointer(state)).Fwsize))
 12930  		(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 12931  		(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 12932  	} else {
 12933  		dist = ((*Inflate_state)(unsafe.Pointer(state)).Fwsize - (*Inflate_state)(unsafe.Pointer(state)).Fwnext)
 12934  		if dist > copy {
 12935  			dist = copy
 12936  		}
 12937  		libc.Xmemcpy(tls, ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)), (end - uintptr(copy)), uint64(dist))
 12938  		copy = copy - (dist)
 12939  		if copy != 0 {
 12940  			libc.Xmemcpy(tls, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, (end - uintptr(copy)), uint64(copy))
 12941  			(*Inflate_state)(unsafe.Pointer(state)).Fwnext = copy
 12942  			(*Inflate_state)(unsafe.Pointer(state)).Fwhave = (*Inflate_state)(unsafe.Pointer(state)).Fwsize
 12943  		} else {
 12944  			*(*uint32)(unsafe.Pointer(state + 68 /* &.wnext */)) += (dist)
 12945  			if (*Inflate_state)(unsafe.Pointer(state)).Fwnext == (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 12946  				(*Inflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0)
 12947  			}
 12948  			if (*Inflate_state)(unsafe.Pointer(state)).Fwhave < (*Inflate_state)(unsafe.Pointer(state)).Fwsize {
 12949  				*(*uint32)(unsafe.Pointer(state + 64 /* &.whave */)) += (dist)
 12950  			}
 12951  		}
 12952  	}
 12953  	return 0
 12954  }
 12955  
 12956  // Macros for inflate():
 12957  
 12958  // check function to use adler32() for zlib or crc32() for gzip
 12959  
 12960  // check macros for header crc
 12961  
 12962  // Load registers with state in inflate() for speed
 12963  
 12964  // Restore state from registers in inflate()
 12965  
 12966  // Clear the input bit accumulator
 12967  
 12968  // Get a byte of input into the bit accumulator, or return from inflate()
 12969  //    if there is no input available.
 12970  
 12971  // Assure that there are at least n bits in the bit accumulator.  If there is
 12972  //    not enough available input to do that, then return from inflate().
 12973  
 12974  // Return the low n bits of the bit accumulator (n < 16)
 12975  
 12976  // Remove n bits from the bit accumulator
 12977  
 12978  // Remove zero to seven bits as needed to go to a byte boundary
 12979  
 12980  //
 12981  //    inflate() uses a state machine to process as much input data and generate as
 12982  //    much output data as possible before returning.  The state machine is
 12983  //    structured roughly as follows:
 12984  //
 12985  //     for (;;) switch (state) {
 12986  //     ...
 12987  //     case STATEn:
 12988  //         if (not enough input data or output space to make progress)
 12989  //             return;
 12990  //         ... make progress ...
 12991  //         state = STATEm;
 12992  //         break;
 12993  //     ...
 12994  //     }
 12995  //
 12996  //    so when inflate() is called again, the same case is attempted again, and
 12997  //    if the appropriate resources are provided, the machine proceeds to the
 12998  //    next state.  The NEEDBITS() macro is usually the way the state evaluates
 12999  //    whether it can proceed or should return.  NEEDBITS() does the return if
 13000  //    the requested bits are not available.  The typical use of the BITS macros
 13001  //    is:
 13002  //
 13003  //         NEEDBITS(n);
 13004  //         ... do something with BITS(n) ...
 13005  //         DROPBITS(n);
 13006  //
 13007  //    where NEEDBITS(n) either returns from inflate() if there isn't enough
 13008  //    input left to load n bits into the accumulator, or it continues.  BITS(n)
 13009  //    gives the low n bits in the accumulator.  When done, DROPBITS(n) drops
 13010  //    the low n bits off the accumulator.  INITBITS() clears the accumulator
 13011  //    and sets the number of available bits to zero.  BYTEBITS() discards just
 13012  //    enough bits to put the accumulator on a byte boundary.  After BYTEBITS()
 13013  //    and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
 13014  //
 13015  //    NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
 13016  //    if there is no input available.  The decoding of variable length codes uses
 13017  //    PULLBYTE() directly in order to pull just enough bytes to decode the next
 13018  //    code, and no more.
 13019  //
 13020  //    Some states loop until they get enough input, making sure that enough
 13021  //    state information is maintained to continue the loop where it left off
 13022  //    if NEEDBITS() returns in the loop.  For example, want, need, and keep
 13023  //    would all have to actually be part of the saved state in case NEEDBITS()
 13024  //    returns:
 13025  //
 13026  //     case STATEw:
 13027  //         while (want < need) {
 13028  //             NEEDBITS(n);
 13029  //             keep[want++] = BITS(n);
 13030  //             DROPBITS(n);
 13031  //         }
 13032  //         state = STATEx;
 13033  //     case STATEx:
 13034  //
 13035  //    As shown above, if the next state is also the next case, then the break
 13036  //    is omitted.
 13037  //
 13038  //    A state may also return if there is not enough output space available to
 13039  //    complete that state.  Those states are copying stored data, writing a
 13040  //    literal byte, and copying a matching string.
 13041  //
 13042  //    When returning, a "goto inf_leave" is used to update the total counters,
 13043  //    update the check value, and determine whether any progress has been made
 13044  //    during that inflate() call in order to return the proper return code.
 13045  //    Progress is defined as a change in either strm->avail_in or strm->avail_out.
 13046  //    When there is a window, goto inf_leave will update the window with the last
 13047  //    output written.  If a goto inf_leave occurs in the middle of decompression
 13048  //    and there is no window currently, goto inf_leave will create one and copy
 13049  //    output to the window for the next call of inflate().
 13050  //
 13051  //    In this implementation, the flush parameter of inflate() only affects the
 13052  //    return code (per zlib.h).  inflate() always writes as much as possible to
 13053  //    strm->next_out, given the space available and the provided input--the effect
 13054  //    documented in zlib.h of Z_SYNC_FLUSH.  Furthermore, inflate() always defers
 13055  //    the allocation of and copying into a sliding window until necessary, which
 13056  //    provides the effect documented in zlib.h for Z_FINISH when the entire input
 13057  //    stream available.  So the only thing the flush parameter actually does is:
 13058  //    when flush is set to Z_FINISH, inflate() cannot return Z_OK.  Instead it
 13059  //    will return Z_BUF_ERROR if it has not reached the end of the stream.
 13060  //
 13061  
 13062  func Xinflate(tls *libc.TLS, strm Z_streamp, flush int32) int32 { /* inflate.c:622:13: */
 13063  	bp := tls.Alloc(4)
 13064  	defer tls.Free(4)
 13065  
 13066  	var state uintptr
 13067  	var next uintptr // next input
 13068  	var put uintptr  // next output
 13069  	var have uint32
 13070  	var left uint32 // available input and output
 13071  	var hold uint64 // bit buffer
 13072  	var bits uint32 // bits in bit buffer
 13073  	var in uint32
 13074  	var out uint32   // save starting available input and output
 13075  	var copy uint32  // number of stored or match bytes to copy
 13076  	var from uintptr // where to copy match bytes from
 13077  	var here Code    // current decoding table entry
 13078  	var last Code    // parent table entry
 13079  	var len uint32   // length to copy for repeats, bits to drop
 13080  	var ret int32    // return code
 13081  	// var hbuf [4]uint8 at bp, 4
 13082  
 13083  	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)))) {
 13084  		goto __1
 13085  	}
 13086  	return -2
 13087  __1:
 13088  	;
 13089  
 13090  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 13091  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) {
 13092  		goto __2
 13093  	}
 13094  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO
 13095  __2:
 13096  	; // skip check
 13097  __3:
 13098  	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 13099  	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 13100  	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 13101  	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 13102  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 13103  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 13104  	goto __4
 13105  __4:
 13106  	if 0 != 0 {
 13107  		goto __3
 13108  	}
 13109  	goto __5
 13110  __5:
 13111  	;
 13112  	in = have
 13113  	out = left
 13114  	ret = Z_OK
 13115  __6:
 13116  	switch (*Inflate_state)(unsafe.Pointer(state)).Fmode {
 13117  	case HEAD:
 13118  		goto __10
 13119  	case FLAGS:
 13120  		goto __11
 13121  	case TIME:
 13122  		goto __12
 13123  	case OS:
 13124  		goto __13
 13125  	case EXLEN:
 13126  		goto __14
 13127  	case EXTRA:
 13128  		goto __15
 13129  	case NAME:
 13130  		goto __16
 13131  	case COMMENT:
 13132  		goto __17
 13133  	case HCRC:
 13134  		goto __18
 13135  	case DICTID:
 13136  		goto __19
 13137  	case DICT:
 13138  		goto __20
 13139  	case TYPE:
 13140  		goto __21
 13141  	case TYPEDO:
 13142  		goto __22
 13143  	case STORED:
 13144  		goto __23
 13145  	case COPY_:
 13146  		goto __24
 13147  	case COPY:
 13148  		goto __25
 13149  	case TABLE:
 13150  		goto __26
 13151  	case LENLENS:
 13152  		goto __27
 13153  	case CODELENS:
 13154  		goto __28
 13155  	case LEN_:
 13156  		goto __29
 13157  	case LEN:
 13158  		goto __30
 13159  	case LENEXT:
 13160  		goto __31
 13161  	case DIST:
 13162  		goto __32
 13163  	case DISTEXT:
 13164  		goto __33
 13165  	case MATCH:
 13166  		goto __34
 13167  	case LIT:
 13168  		goto __35
 13169  	case CHECK:
 13170  		goto __36
 13171  	case LENGTH:
 13172  		goto __37
 13173  	case DONE:
 13174  		goto __38
 13175  	case BAD:
 13176  		goto __39
 13177  	case MEM:
 13178  		goto __40
 13179  	case SYNC:
 13180  		goto __41
 13181  	default:
 13182  		goto __42
 13183  	}
 13184  	goto __9
 13185  __10:
 13186  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap == 0) {
 13187  		goto __43
 13188  	}
 13189  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPEDO
 13190  	goto __9
 13191  __43:
 13192  	;
 13193  __44:
 13194  __47:
 13195  	if !(bits < (uint32(16))) {
 13196  		goto __48
 13197  	}
 13198  __49:
 13199  	if !(have == uint32(0)) {
 13200  		goto __52
 13201  	}
 13202  	goto inf_leave
 13203  __52:
 13204  	;
 13205  	have--
 13206  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 13207  	bits = bits + (uint32(8))
 13208  	goto __50
 13209  __50:
 13210  	if 0 != 0 {
 13211  		goto __49
 13212  	}
 13213  	goto __51
 13214  __51:
 13215  	;
 13216  	goto __47
 13217  __48:
 13218  	;
 13219  	goto __45
 13220  __45:
 13221  	if 0 != 0 {
 13222  		goto __44
 13223  	}
 13224  	goto __46
 13225  __46:
 13226  	;
 13227  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 2) != 0) && (hold == uint64(0x8b1f))) {
 13228  		goto __53
 13229  	} // gzip header
 13230  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) {
 13231  		goto __54
 13232  	}
 13233  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15)
 13234  __54:
 13235  	;
 13236  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0))
 13237  __55:
 13238  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold)
 13239  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8))
 13240  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2))
 13241  	goto __56
 13242  __56:
 13243  	if 0 != 0 {
 13244  		goto __55
 13245  	}
 13246  	goto __57
 13247  __57:
 13248  	;
 13249  __58:
 13250  	hold = uint64(0)
 13251  	bits = uint32(0)
 13252  	goto __59
 13253  __59:
 13254  	if 0 != 0 {
 13255  		goto __58
 13256  	}
 13257  	goto __60
 13258  __60:
 13259  	;
 13260  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = FLAGS
 13261  	goto __9
 13262  __53:
 13263  	;
 13264  	(*Inflate_state)(unsafe.Pointer(state)).Fflags = 0 // expect zlib header
 13265  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 13266  		goto __61
 13267  	}
 13268  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -1
 13269  __61:
 13270  	;
 13271  	if !(!(((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 1) != 0) || ((((uint64((uint32(hold) & ((uint32(1) << (8)) - uint32(1))) << 8)) + (hold >> 8)) % uint64(31)) != 0)) {
 13272  		goto __62
 13273  	}
 13274  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 669 /* "incorrect header..." */
 13275  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13276  	goto __9
 13277  __62:
 13278  	;
 13279  	if !((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) != uint32(Z_DEFLATED)) {
 13280  		goto __63
 13281  	}
 13282  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */
 13283  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13284  	goto __9
 13285  __63:
 13286  	;
 13287  __64:
 13288  	hold >>= 4
 13289  	bits = bits - (uint32(4))
 13290  	goto __65
 13291  __65:
 13292  	if 0 != 0 {
 13293  		goto __64
 13294  	}
 13295  	goto __66
 13296  __66:
 13297  	;
 13298  	len = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(8))
 13299  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0)) {
 13300  		goto __67
 13301  	}
 13302  	(*Inflate_state)(unsafe.Pointer(state)).Fwbits = len
 13303  __67:
 13304  	;
 13305  	if !((len > uint32(15)) || (len > (*Inflate_state)(unsafe.Pointer(state)).Fwbits)) {
 13306  		goto __68
 13307  	}
 13308  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 719 /* "invalid window s..." */
 13309  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13310  	goto __9
 13311  __68:
 13312  	;
 13313  	(*Inflate_state)(unsafe.Pointer(state)).Fdmax = (uint32(1) << len)
 13314  
 13315  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)))
 13316  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = func() uint32 {
 13317  		if (hold & uint64(0x200)) != 0 {
 13318  			return DICTID
 13319  		}
 13320  		return TYPE
 13321  	}()
 13322  __69:
 13323  	hold = uint64(0)
 13324  	bits = uint32(0)
 13325  	goto __70
 13326  __70:
 13327  	if 0 != 0 {
 13328  		goto __69
 13329  	}
 13330  	goto __71
 13331  __71:
 13332  	;
 13333  	goto __9
 13334  __11:
 13335  __72:
 13336  __75:
 13337  	if !(bits < (uint32(16))) {
 13338  		goto __76
 13339  	}
 13340  __77:
 13341  	if !(have == uint32(0)) {
 13342  		goto __80
 13343  	}
 13344  	goto inf_leave
 13345  __80:
 13346  	;
 13347  	have--
 13348  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 13349  	bits = bits + (uint32(8))
 13350  	goto __78
 13351  __78:
 13352  	if 0 != 0 {
 13353  		goto __77
 13354  	}
 13355  	goto __79
 13356  __79:
 13357  	;
 13358  	goto __75
 13359  __76:
 13360  	;
 13361  	goto __73
 13362  __73:
 13363  	if 0 != 0 {
 13364  		goto __72
 13365  	}
 13366  	goto __74
 13367  __74:
 13368  	;
 13369  	(*Inflate_state)(unsafe.Pointer(state)).Fflags = int32(hold)
 13370  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0xff) != Z_DEFLATED) {
 13371  		goto __81
 13372  	}
 13373  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 692 /* "unknown compress..." */
 13374  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13375  	goto __9
 13376  __81:
 13377  	;
 13378  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0xe000) != 0) {
 13379  		goto __82
 13380  	}
 13381  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 739 /* "unknown header f..." */
 13382  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13383  	goto __9
 13384  __82:
 13385  	;
 13386  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 13387  		goto __83
 13388  	}
 13389  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = (int32((hold >> 8) & uint64(1)))
 13390  __83:
 13391  	;
 13392  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) {
 13393  		goto __84
 13394  	}
 13395  __85:
 13396  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold)
 13397  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8))
 13398  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2))
 13399  	goto __86
 13400  __86:
 13401  	if 0 != 0 {
 13402  		goto __85
 13403  	}
 13404  	goto __87
 13405  __87:
 13406  	;
 13407  __84:
 13408  	;
 13409  __88:
 13410  	hold = uint64(0)
 13411  	bits = uint32(0)
 13412  	goto __89
 13413  __89:
 13414  	if 0 != 0 {
 13415  		goto __88
 13416  	}
 13417  	goto __90
 13418  __90:
 13419  	;
 13420  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TIME
 13421  __12:
 13422  __91:
 13423  __94:
 13424  	if !(bits < (uint32(32))) {
 13425  		goto __95
 13426  	}
 13427  __96:
 13428  	if !(have == uint32(0)) {
 13429  		goto __99
 13430  	}
 13431  	goto inf_leave
 13432  __99:
 13433  	;
 13434  	have--
 13435  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 13436  	bits = bits + (uint32(8))
 13437  	goto __97
 13438  __97:
 13439  	if 0 != 0 {
 13440  		goto __96
 13441  	}
 13442  	goto __98
 13443  __98:
 13444  	;
 13445  	goto __94
 13446  __95:
 13447  	;
 13448  	goto __92
 13449  __92:
 13450  	if 0 != 0 {
 13451  		goto __91
 13452  	}
 13453  	goto __93
 13454  __93:
 13455  	;
 13456  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 13457  		goto __100
 13458  	}
 13459  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold
 13460  __100:
 13461  	;
 13462  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) {
 13463  		goto __101
 13464  	}
 13465  __102:
 13466  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold)
 13467  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8))
 13468  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 2)) = (uint8((hold) >> 16))
 13469  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 3)) = (uint8((hold) >> 24))
 13470  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(4))
 13471  	goto __103
 13472  __103:
 13473  	if 0 != 0 {
 13474  		goto __102
 13475  	}
 13476  	goto __104
 13477  __104:
 13478  	;
 13479  __101:
 13480  	;
 13481  __105:
 13482  	hold = uint64(0)
 13483  	bits = uint32(0)
 13484  	goto __106
 13485  __106:
 13486  	if 0 != 0 {
 13487  		goto __105
 13488  	}
 13489  	goto __107
 13490  __107:
 13491  	;
 13492  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = OS
 13493  __13:
 13494  __108:
 13495  __111:
 13496  	if !(bits < (uint32(16))) {
 13497  		goto __112
 13498  	}
 13499  __113:
 13500  	if !(have == uint32(0)) {
 13501  		goto __116
 13502  	}
 13503  	goto inf_leave
 13504  __116:
 13505  	;
 13506  	have--
 13507  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 13508  	bits = bits + (uint32(8))
 13509  	goto __114
 13510  __114:
 13511  	if 0 != 0 {
 13512  		goto __113
 13513  	}
 13514  	goto __115
 13515  __115:
 13516  	;
 13517  	goto __111
 13518  __112:
 13519  	;
 13520  	goto __109
 13521  __109:
 13522  	if 0 != 0 {
 13523  		goto __108
 13524  	}
 13525  	goto __110
 13526  __110:
 13527  	;
 13528  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 13529  		goto __117
 13530  	}
 13531  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = (int32(hold & uint64(0xff)))
 13532  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fos = (int32(hold >> 8))
 13533  __117:
 13534  	;
 13535  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) {
 13536  		goto __118
 13537  	}
 13538  __119:
 13539  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold)
 13540  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8))
 13541  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2))
 13542  	goto __120
 13543  __120:
 13544  	if 0 != 0 {
 13545  		goto __119
 13546  	}
 13547  	goto __121
 13548  __121:
 13549  	;
 13550  __118:
 13551  	;
 13552  __122:
 13553  	hold = uint64(0)
 13554  	bits = uint32(0)
 13555  	goto __123
 13556  __123:
 13557  	if 0 != 0 {
 13558  		goto __122
 13559  	}
 13560  	goto __124
 13561  __124:
 13562  	;
 13563  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = EXLEN
 13564  __14:
 13565  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0400) != 0) {
 13566  		goto __125
 13567  	}
 13568  __127:
 13569  __130:
 13570  	if !(bits < (uint32(16))) {
 13571  		goto __131
 13572  	}
 13573  __132:
 13574  	if !(have == uint32(0)) {
 13575  		goto __135
 13576  	}
 13577  	goto inf_leave
 13578  __135:
 13579  	;
 13580  	have--
 13581  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 13582  	bits = bits + (uint32(8))
 13583  	goto __133
 13584  __133:
 13585  	if 0 != 0 {
 13586  		goto __132
 13587  	}
 13588  	goto __134
 13589  __134:
 13590  	;
 13591  	goto __130
 13592  __131:
 13593  	;
 13594  	goto __128
 13595  __128:
 13596  	if 0 != 0 {
 13597  		goto __127
 13598  	}
 13599  	goto __129
 13600  __129:
 13601  	;
 13602  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(hold)
 13603  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 13604  		goto __136
 13605  	}
 13606  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold)
 13607  __136:
 13608  	;
 13609  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) {
 13610  		goto __137
 13611  	}
 13612  __138:
 13613  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */)) = uint8(hold)
 13614  	*(*uint8)(unsafe.Pointer(bp /* &hbuf[0] */ + 1)) = (uint8((hold) >> 8))
 13615  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, bp /* &hbuf[0] */, uint32(2))
 13616  	goto __139
 13617  __139:
 13618  	if 0 != 0 {
 13619  		goto __138
 13620  	}
 13621  	goto __140
 13622  __140:
 13623  	;
 13624  __137:
 13625  	;
 13626  __141:
 13627  	hold = uint64(0)
 13628  	bits = uint32(0)
 13629  	goto __142
 13630  __142:
 13631  	if 0 != 0 {
 13632  		goto __141
 13633  	}
 13634  	goto __143
 13635  __143:
 13636  	;
 13637  	goto __126
 13638  __125:
 13639  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 13640  		goto __144
 13641  	}
 13642  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(Z_NULL)
 13643  __144:
 13644  	;
 13645  __126:
 13646  	;
 13647  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = EXTRA
 13648  __15:
 13649  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0400) != 0) {
 13650  		goto __145
 13651  	}
 13652  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 13653  	if !(copy > have) {
 13654  		goto __146
 13655  	}
 13656  	copy = have
 13657  __146:
 13658  	;
 13659  	if !(copy != 0) {
 13660  		goto __147
 13661  	}
 13662  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) && ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(Z_NULL))) {
 13663  		goto __148
 13664  	}
 13665  	len = ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Inflate_state)(unsafe.Pointer(state)).Flength)
 13666  	libc.Xmemcpy(tls, ((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra + uintptr(len)), next,
 13667  		func() uint64 {
 13668  			if (len + copy) > (*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max {
 13669  				return (uint64((*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len))
 13670  			}
 13671  			return uint64(copy)
 13672  		}())
 13673  __148:
 13674  	;
 13675  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) {
 13676  		goto __149
 13677  	}
 13678  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
 13679  __149:
 13680  	;
 13681  	have = have - (copy)
 13682  	next += uintptr(copy)
 13683  	*(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy)
 13684  __147:
 13685  	;
 13686  	if !((*Inflate_state)(unsafe.Pointer(state)).Flength != 0) {
 13687  		goto __150
 13688  	}
 13689  	goto inf_leave
 13690  __150:
 13691  	;
 13692  __145:
 13693  	;
 13694  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0)
 13695  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = NAME
 13696  __16:
 13697  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0800) != 0) {
 13698  		goto __151
 13699  	}
 13700  	if !(have == uint32(0)) {
 13701  		goto __153
 13702  	}
 13703  	goto inf_leave
 13704  __153:
 13705  	;
 13706  	copy = uint32(0)
 13707  __154:
 13708  	len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(&copy, 1)))))
 13709  	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)) {
 13710  		goto __157
 13711  	}
 13712  	*(*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)
 13713  __157:
 13714  	;
 13715  	goto __155
 13716  __155:
 13717  	if (len != 0) && (copy < have) {
 13718  		goto __154
 13719  	}
 13720  	goto __156
 13721  __156:
 13722  	;
 13723  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) {
 13724  		goto __158
 13725  	}
 13726  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
 13727  __158:
 13728  	;
 13729  	have = have - (copy)
 13730  	next += uintptr(copy)
 13731  	if !(len != 0) {
 13732  		goto __159
 13733  	}
 13734  	goto inf_leave
 13735  __159:
 13736  	;
 13737  	goto __152
 13738  __151:
 13739  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 13740  		goto __160
 13741  	}
 13742  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(Z_NULL)
 13743  __160:
 13744  	;
 13745  __152:
 13746  	;
 13747  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(0)
 13748  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COMMENT
 13749  __17:
 13750  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x1000) != 0) {
 13751  		goto __161
 13752  	}
 13753  	if !(have == uint32(0)) {
 13754  		goto __163
 13755  	}
 13756  	goto inf_leave
 13757  __163:
 13758  	;
 13759  	copy = uint32(0)
 13760  __164:
 13761  	len = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(libc.PostIncUint32(&copy, 1)))))
 13762  	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)) {
 13763  		goto __167
 13764  	}
 13765  	*(*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)
 13766  __167:
 13767  	;
 13768  	goto __165
 13769  __165:
 13770  	if (len != 0) && (copy < have) {
 13771  		goto __164
 13772  	}
 13773  	goto __166
 13774  __166:
 13775  	;
 13776  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) && (((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0)) {
 13777  		goto __168
 13778  	}
 13779  	(*Inflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, next, copy)
 13780  __168:
 13781  	;
 13782  	have = have - (copy)
 13783  	next += uintptr(copy)
 13784  	if !(len != 0) {
 13785  		goto __169
 13786  	}
 13787  	goto inf_leave
 13788  __169:
 13789  	;
 13790  	goto __162
 13791  __161:
 13792  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 13793  		goto __170
 13794  	}
 13795  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(Z_NULL)
 13796  __170:
 13797  	;
 13798  __162:
 13799  	;
 13800  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = HCRC
 13801  __18:
 13802  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fflags & 0x0200) != 0) {
 13803  		goto __171
 13804  	}
 13805  __172:
 13806  __175:
 13807  	if !(bits < (uint32(16))) {
 13808  		goto __176
 13809  	}
 13810  __177:
 13811  	if !(have == uint32(0)) {
 13812  		goto __180
 13813  	}
 13814  	goto inf_leave
 13815  __180:
 13816  	;
 13817  	have--
 13818  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 13819  	bits = bits + (uint32(8))
 13820  	goto __178
 13821  __178:
 13822  	if 0 != 0 {
 13823  		goto __177
 13824  	}
 13825  	goto __179
 13826  __179:
 13827  	;
 13828  	goto __175
 13829  __176:
 13830  	;
 13831  	goto __173
 13832  __173:
 13833  	if 0 != 0 {
 13834  		goto __172
 13835  	}
 13836  	goto __174
 13837  __174:
 13838  	;
 13839  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (hold != ((*Inflate_state)(unsafe.Pointer(state)).Fcheck & uint64(0xffff)))) {
 13840  		goto __181
 13841  	}
 13842  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 764 /* "header crc misma..." */
 13843  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 13844  	goto __9
 13845  __181:
 13846  	;
 13847  __182:
 13848  	hold = uint64(0)
 13849  	bits = uint32(0)
 13850  	goto __183
 13851  __183:
 13852  	if 0 != 0 {
 13853  		goto __182
 13854  	}
 13855  	goto __184
 13856  __184:
 13857  	;
 13858  __171:
 13859  	;
 13860  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhead != uintptr(Z_NULL)) {
 13861  		goto __185
 13862  	}
 13863  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (((*Inflate_state)(unsafe.Pointer(state)).Fflags >> 9) & 1)
 13864  	(*Gz_header)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = 1
 13865  __185:
 13866  	;
 13867  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xcrc32(tls, uint64(0), uintptr(Z_NULL), uint32(0)))
 13868  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 13869  	goto __9
 13870  __19:
 13871  __186:
 13872  __189:
 13873  	if !(bits < (uint32(32))) {
 13874  		goto __190
 13875  	}
 13876  __191:
 13877  	if !(have == uint32(0)) {
 13878  		goto __194
 13879  	}
 13880  	goto inf_leave
 13881  __194:
 13882  	;
 13883  	have--
 13884  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 13885  	bits = bits + (uint32(8))
 13886  	goto __192
 13887  __192:
 13888  	if 0 != 0 {
 13889  		goto __191
 13890  	}
 13891  	goto __193
 13892  __193:
 13893  	;
 13894  	goto __189
 13895  __190:
 13896  	;
 13897  	goto __187
 13898  __187:
 13899  	if 0 != 0 {
 13900  		goto __186
 13901  	}
 13902  	goto __188
 13903  __188:
 13904  	;
 13905  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, ((((((hold) >> 24) & uint64(0xff)) + (((hold) >> 8) & uint64(0xff00))) + (((hold) & uint64(0xff00)) << 8)) + (((hold) & uint64(0xff)) << 24)))
 13906  __195:
 13907  	hold = uint64(0)
 13908  	bits = uint32(0)
 13909  	goto __196
 13910  __196:
 13911  	if 0 != 0 {
 13912  		goto __195
 13913  	}
 13914  	goto __197
 13915  __197:
 13916  	;
 13917  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DICT
 13918  __20:
 13919  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhavedict == 0) {
 13920  		goto __198
 13921  	}
 13922  __199:
 13923  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 13924  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 13925  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
 13926  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 13927  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 13928  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 13929  	goto __200
 13930  __200:
 13931  	if 0 != 0 {
 13932  		goto __199
 13933  	}
 13934  	goto __201
 13935  __201:
 13936  	;
 13937  	return Z_NEED_DICT
 13938  __198:
 13939  	;
 13940  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0)))
 13941  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 13942  __21:
 13943  	if !((flush == Z_BLOCK) || (flush == Z_TREES)) {
 13944  		goto __202
 13945  	}
 13946  	goto inf_leave
 13947  __202:
 13948  	;
 13949  __22:
 13950  	if !((*Inflate_state)(unsafe.Pointer(state)).Flast != 0) {
 13951  		goto __203
 13952  	}
 13953  __204:
 13954  	hold >>= (bits & uint32(7))
 13955  	bits = bits - (bits & uint32(7))
 13956  	goto __205
 13957  __205:
 13958  	if 0 != 0 {
 13959  		goto __204
 13960  	}
 13961  	goto __206
 13962  __206:
 13963  	;
 13964  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = CHECK
 13965  	goto __9
 13966  __203:
 13967  	;
 13968  __207:
 13969  __210:
 13970  	if !(bits < (uint32(3))) {
 13971  		goto __211
 13972  	}
 13973  __212:
 13974  	if !(have == uint32(0)) {
 13975  		goto __215
 13976  	}
 13977  	goto inf_leave
 13978  __215:
 13979  	;
 13980  	have--
 13981  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 13982  	bits = bits + (uint32(8))
 13983  	goto __213
 13984  __213:
 13985  	if 0 != 0 {
 13986  		goto __212
 13987  	}
 13988  	goto __214
 13989  __214:
 13990  	;
 13991  	goto __210
 13992  __211:
 13993  	;
 13994  	goto __208
 13995  __208:
 13996  	if 0 != 0 {
 13997  		goto __207
 13998  	}
 13999  	goto __209
 14000  __209:
 14001  	;
 14002  	(*Inflate_state)(unsafe.Pointer(state)).Flast = (int32(uint32(hold) & ((uint32(1) << (1)) - uint32(1))))
 14003  __216:
 14004  	hold >>= 1
 14005  	bits = bits - (uint32(1))
 14006  	goto __217
 14007  __217:
 14008  	if 0 != 0 {
 14009  		goto __216
 14010  	}
 14011  	goto __218
 14012  __218:
 14013  	;
 14014  	switch uint32(hold) & ((uint32(1) << (2)) - uint32(1)) {
 14015  	case uint32(0):
 14016  		goto __220
 14017  	case uint32(1):
 14018  		goto __221
 14019  	case uint32(2):
 14020  		goto __222
 14021  	case uint32(3):
 14022  		goto __223
 14023  	}
 14024  	goto __219
 14025  __220: // stored block
 14026  	;
 14027  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = STORED
 14028  	goto __219
 14029  __221: // fixed block
 14030  	fixedtables1(tls, state)
 14031  
 14032  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_ // decode codes
 14033  	if !(flush == Z_TREES) {
 14034  		goto __224
 14035  	}
 14036  __225:
 14037  	hold >>= 2
 14038  	bits = bits - (uint32(2))
 14039  	goto __226
 14040  __226:
 14041  	if 0 != 0 {
 14042  		goto __225
 14043  	}
 14044  	goto __227
 14045  __227:
 14046  	;
 14047  	goto inf_leave
 14048  __224:
 14049  	;
 14050  	goto __219
 14051  __222: // dynamic block
 14052  	;
 14053  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TABLE
 14054  	goto __219
 14055  __223:
 14056  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 367 /* "invalid block ty..." */
 14057  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14058  __219:
 14059  	;
 14060  __228:
 14061  	hold >>= 2
 14062  	bits = bits - (uint32(2))
 14063  	goto __229
 14064  __229:
 14065  	if 0 != 0 {
 14066  		goto __228
 14067  	}
 14068  	goto __230
 14069  __230:
 14070  	;
 14071  	goto __9
 14072  __23:
 14073  __231:
 14074  	hold >>= (bits & uint32(7))
 14075  	bits = bits - (bits & uint32(7))
 14076  	goto __232
 14077  __232:
 14078  	if 0 != 0 {
 14079  		goto __231
 14080  	}
 14081  	goto __233
 14082  __233:
 14083  	; // go to byte boundary
 14084  __234:
 14085  __237:
 14086  	if !(bits < (uint32(32))) {
 14087  		goto __238
 14088  	}
 14089  __239:
 14090  	if !(have == uint32(0)) {
 14091  		goto __242
 14092  	}
 14093  	goto inf_leave
 14094  __242:
 14095  	;
 14096  	have--
 14097  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14098  	bits = bits + (uint32(8))
 14099  	goto __240
 14100  __240:
 14101  	if 0 != 0 {
 14102  		goto __239
 14103  	}
 14104  	goto __241
 14105  __241:
 14106  	;
 14107  	goto __237
 14108  __238:
 14109  	;
 14110  	goto __235
 14111  __235:
 14112  	if 0 != 0 {
 14113  		goto __234
 14114  	}
 14115  	goto __236
 14116  __236:
 14117  	;
 14118  	if !((hold & uint64(0xffff)) != ((hold >> 16) ^ uint64(0xffff))) {
 14119  		goto __243
 14120  	}
 14121  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 386 /* "invalid stored b..." */
 14122  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14123  	goto __9
 14124  __243:
 14125  	;
 14126  	(*Inflate_state)(unsafe.Pointer(state)).Flength = (uint32(hold) & uint32(0xffff))
 14127  
 14128  __244:
 14129  	hold = uint64(0)
 14130  	bits = uint32(0)
 14131  	goto __245
 14132  __245:
 14133  	if 0 != 0 {
 14134  		goto __244
 14135  	}
 14136  	goto __246
 14137  __246:
 14138  	;
 14139  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY_
 14140  	if !(flush == Z_TREES) {
 14141  		goto __247
 14142  	}
 14143  	goto inf_leave
 14144  __247:
 14145  	;
 14146  __24:
 14147  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = COPY
 14148  __25:
 14149  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 14150  	if !(copy != 0) {
 14151  		goto __248
 14152  	}
 14153  	if !(copy > have) {
 14154  		goto __249
 14155  	}
 14156  	copy = have
 14157  __249:
 14158  	;
 14159  	if !(copy > left) {
 14160  		goto __250
 14161  	}
 14162  	copy = left
 14163  __250:
 14164  	;
 14165  	if !(copy == uint32(0)) {
 14166  		goto __251
 14167  	}
 14168  	goto inf_leave
 14169  __251:
 14170  	;
 14171  	libc.Xmemcpy(tls, put, next, uint64(copy))
 14172  	have = have - (copy)
 14173  	next += uintptr(copy)
 14174  	left = left - (copy)
 14175  	put += uintptr(copy)
 14176  	*(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy)
 14177  	goto __9
 14178  __248:
 14179  	;
 14180  
 14181  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 14182  	goto __9
 14183  __26:
 14184  __252:
 14185  __255:
 14186  	if !(bits < (uint32(14))) {
 14187  		goto __256
 14188  	}
 14189  __257:
 14190  	if !(have == uint32(0)) {
 14191  		goto __260
 14192  	}
 14193  	goto inf_leave
 14194  __260:
 14195  	;
 14196  	have--
 14197  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14198  	bits = bits + (uint32(8))
 14199  	goto __258
 14200  __258:
 14201  	if 0 != 0 {
 14202  		goto __257
 14203  	}
 14204  	goto __259
 14205  __259:
 14206  	;
 14207  	goto __255
 14208  __256:
 14209  	;
 14210  	goto __253
 14211  __253:
 14212  	if 0 != 0 {
 14213  		goto __252
 14214  	}
 14215  	goto __254
 14216  __254:
 14217  	;
 14218  	(*Inflate_state)(unsafe.Pointer(state)).Fnlen = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(257))
 14219  __261:
 14220  	hold >>= 5
 14221  	bits = bits - (uint32(5))
 14222  	goto __262
 14223  __262:
 14224  	if 0 != 0 {
 14225  		goto __261
 14226  	}
 14227  	goto __263
 14228  __263:
 14229  	;
 14230  	(*Inflate_state)(unsafe.Pointer(state)).Fndist = ((uint32(hold) & ((uint32(1) << (5)) - uint32(1))) + uint32(1))
 14231  __264:
 14232  	hold >>= 5
 14233  	bits = bits - (uint32(5))
 14234  	goto __265
 14235  __265:
 14236  	if 0 != 0 {
 14237  		goto __264
 14238  	}
 14239  	goto __266
 14240  __266:
 14241  	;
 14242  	(*Inflate_state)(unsafe.Pointer(state)).Fncode = ((uint32(hold) & ((uint32(1) << (4)) - uint32(1))) + uint32(4))
 14243  __267:
 14244  	hold >>= 4
 14245  	bits = bits - (uint32(4))
 14246  	goto __268
 14247  __268:
 14248  	if 0 != 0 {
 14249  		goto __267
 14250  	}
 14251  	goto __269
 14252  __269:
 14253  	;
 14254  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286)) || ((*Inflate_state)(unsafe.Pointer(state)).Fndist > uint32(30))) {
 14255  		goto __270
 14256  	}
 14257  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 415 /* "too many length ..." */
 14258  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14259  	goto __9
 14260  __270:
 14261  	;
 14262  
 14263  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 14264  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENLENS
 14265  __27:
 14266  __271:
 14267  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < (*Inflate_state)(unsafe.Pointer(state)).Fncode) {
 14268  		goto __272
 14269  	}
 14270  __273:
 14271  __276:
 14272  	if !(bits < (uint32(3))) {
 14273  		goto __277
 14274  	}
 14275  __278:
 14276  	if !(have == uint32(0)) {
 14277  		goto __281
 14278  	}
 14279  	goto inf_leave
 14280  __281:
 14281  	;
 14282  	have--
 14283  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14284  	bits = bits + (uint32(8))
 14285  	goto __279
 14286  __279:
 14287  	if 0 != 0 {
 14288  		goto __278
 14289  	}
 14290  	goto __280
 14291  __280:
 14292  	;
 14293  	goto __276
 14294  __277:
 14295  	;
 14296  	goto __274
 14297  __274:
 14298  	if 0 != 0 {
 14299  		goto __273
 14300  	}
 14301  	goto __275
 14302  __275:
 14303  	;
 14304  	*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = (uint16(uint32(hold) & ((uint32(1) << (3)) - uint32(1))))
 14305  __282:
 14306  	hold >>= 3
 14307  	bits = bits - (uint32(3))
 14308  	goto __283
 14309  __283:
 14310  	if 0 != 0 {
 14311  		goto __282
 14312  	}
 14313  	goto __284
 14314  __284:
 14315  	;
 14316  	goto __271
 14317  __272:
 14318  	;
 14319  __285:
 14320  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < uint32(19)) {
 14321  		goto __286
 14322  	}
 14323  	*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(order1[libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1)])*2)) = uint16(0)
 14324  	goto __285
 14325  __286:
 14326  	;
 14327  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */
 14328  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 14329  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7)
 14330  	ret = Xinflate_table(tls, CODES, state+152 /* &.lens */, uint32(19), (state + 144 /* &.next */),
 14331  		(state + 120 /* &.lenbits */), state+792 /* &.work */)
 14332  	if !(ret != 0) {
 14333  		goto __287
 14334  	}
 14335  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 451 /* "invalid code len..." */
 14336  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14337  	goto __9
 14338  __287:
 14339  	;
 14340  
 14341  	(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 14342  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = CODELENS
 14343  __28:
 14344  __288:
 14345  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave < ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) {
 14346  		goto __289
 14347  	}
 14348  __290:
 14349  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4))
 14350  	if !((uint32(here.Fbits)) <= bits) {
 14351  		goto __293
 14352  	}
 14353  	goto __292
 14354  __293:
 14355  	;
 14356  __294:
 14357  	if !(have == uint32(0)) {
 14358  		goto __297
 14359  	}
 14360  	goto inf_leave
 14361  __297:
 14362  	;
 14363  	have--
 14364  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14365  	bits = bits + (uint32(8))
 14366  	goto __295
 14367  __295:
 14368  	if 0 != 0 {
 14369  		goto __294
 14370  	}
 14371  	goto __296
 14372  __296:
 14373  	;
 14374  	goto __291
 14375  __291:
 14376  	goto __290
 14377  	goto __292
 14378  __292:
 14379  	;
 14380  	if !(int32(here.Fval) < 16) {
 14381  		goto __298
 14382  	}
 14383  __300:
 14384  	hold >>= int32(here.Fbits)
 14385  	bits = bits - (uint32(here.Fbits))
 14386  	goto __301
 14387  __301:
 14388  	if 0 != 0 {
 14389  		goto __300
 14390  	}
 14391  	goto __302
 14392  __302:
 14393  	;
 14394  	*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = here.Fval
 14395  	goto __299
 14396  __298:
 14397  	if !(int32(here.Fval) == 16) {
 14398  		goto __303
 14399  	}
 14400  __305:
 14401  __308:
 14402  	if !(bits < (uint32(int32(here.Fbits) + 2))) {
 14403  		goto __309
 14404  	}
 14405  __310:
 14406  	if !(have == uint32(0)) {
 14407  		goto __313
 14408  	}
 14409  	goto inf_leave
 14410  __313:
 14411  	;
 14412  	have--
 14413  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14414  	bits = bits + (uint32(8))
 14415  	goto __311
 14416  __311:
 14417  	if 0 != 0 {
 14418  		goto __310
 14419  	}
 14420  	goto __312
 14421  __312:
 14422  	;
 14423  	goto __308
 14424  __309:
 14425  	;
 14426  	goto __306
 14427  __306:
 14428  	if 0 != 0 {
 14429  		goto __305
 14430  	}
 14431  	goto __307
 14432  __307:
 14433  	;
 14434  __314:
 14435  	hold >>= int32(here.Fbits)
 14436  	bits = bits - (uint32(here.Fbits))
 14437  	goto __315
 14438  __315:
 14439  	if 0 != 0 {
 14440  		goto __314
 14441  	}
 14442  	goto __316
 14443  __316:
 14444  	;
 14445  	if !((*Inflate_state)(unsafe.Pointer(state)).Fhave == uint32(0)) {
 14446  		goto __317
 14447  	}
 14448  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
 14449  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14450  	goto __289
 14451  __317:
 14452  	;
 14453  	len = uint32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fhave-uint32(1)))*2)))
 14454  	copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (2)) - uint32(1))))
 14455  __318:
 14456  	hold >>= 2
 14457  	bits = bits - (uint32(2))
 14458  	goto __319
 14459  __319:
 14460  	if 0 != 0 {
 14461  		goto __318
 14462  	}
 14463  	goto __320
 14464  __320:
 14465  	;
 14466  	goto __304
 14467  __303:
 14468  	if !(int32(here.Fval) == 17) {
 14469  		goto __321
 14470  	}
 14471  __323:
 14472  __326:
 14473  	if !(bits < (uint32(int32(here.Fbits) + 3))) {
 14474  		goto __327
 14475  	}
 14476  __328:
 14477  	if !(have == uint32(0)) {
 14478  		goto __331
 14479  	}
 14480  	goto inf_leave
 14481  __331:
 14482  	;
 14483  	have--
 14484  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14485  	bits = bits + (uint32(8))
 14486  	goto __329
 14487  __329:
 14488  	if 0 != 0 {
 14489  		goto __328
 14490  	}
 14491  	goto __330
 14492  __330:
 14493  	;
 14494  	goto __326
 14495  __327:
 14496  	;
 14497  	goto __324
 14498  __324:
 14499  	if 0 != 0 {
 14500  		goto __323
 14501  	}
 14502  	goto __325
 14503  __325:
 14504  	;
 14505  __332:
 14506  	hold >>= int32(here.Fbits)
 14507  	bits = bits - (uint32(here.Fbits))
 14508  	goto __333
 14509  __333:
 14510  	if 0 != 0 {
 14511  		goto __332
 14512  	}
 14513  	goto __334
 14514  __334:
 14515  	;
 14516  	len = uint32(0)
 14517  	copy = (uint32(3) + (uint32(hold) & ((uint32(1) << (3)) - uint32(1))))
 14518  __335:
 14519  	hold >>= 3
 14520  	bits = bits - (uint32(3))
 14521  	goto __336
 14522  __336:
 14523  	if 0 != 0 {
 14524  		goto __335
 14525  	}
 14526  	goto __337
 14527  __337:
 14528  	;
 14529  	goto __322
 14530  __321:
 14531  __338:
 14532  __341:
 14533  	if !(bits < (uint32(int32(here.Fbits) + 7))) {
 14534  		goto __342
 14535  	}
 14536  __343:
 14537  	if !(have == uint32(0)) {
 14538  		goto __346
 14539  	}
 14540  	goto inf_leave
 14541  __346:
 14542  	;
 14543  	have--
 14544  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14545  	bits = bits + (uint32(8))
 14546  	goto __344
 14547  __344:
 14548  	if 0 != 0 {
 14549  		goto __343
 14550  	}
 14551  	goto __345
 14552  __345:
 14553  	;
 14554  	goto __341
 14555  __342:
 14556  	;
 14557  	goto __339
 14558  __339:
 14559  	if 0 != 0 {
 14560  		goto __338
 14561  	}
 14562  	goto __340
 14563  __340:
 14564  	;
 14565  __347:
 14566  	hold >>= int32(here.Fbits)
 14567  	bits = bits - (uint32(here.Fbits))
 14568  	goto __348
 14569  __348:
 14570  	if 0 != 0 {
 14571  		goto __347
 14572  	}
 14573  	goto __349
 14574  __349:
 14575  	;
 14576  	len = uint32(0)
 14577  	copy = (uint32(11) + (uint32(hold) & ((uint32(1) << (7)) - uint32(1))))
 14578  __350:
 14579  	hold >>= 7
 14580  	bits = bits - (uint32(7))
 14581  	goto __351
 14582  __351:
 14583  	if 0 != 0 {
 14584  		goto __350
 14585  	}
 14586  	goto __352
 14587  __352:
 14588  	;
 14589  __322:
 14590  	;
 14591  __304:
 14592  	;
 14593  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fhave + copy) > ((*Inflate_state)(unsafe.Pointer(state)).Fnlen + (*Inflate_state)(unsafe.Pointer(state)).Fndist)) {
 14594  		goto __353
 14595  	}
 14596  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 476 /* "invalid bit leng..." */
 14597  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14598  	goto __289
 14599  __353:
 14600  	;
 14601  __354:
 14602  	if !(libc.PostDecUint32(&copy, 1) != 0) {
 14603  		goto __355
 14604  	}
 14605  	*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + uintptr(libc.PostIncUint32(&(*Inflate_state)(unsafe.Pointer(state)).Fhave, 1))*2)) = uint16(len)
 14606  	goto __354
 14607  __355:
 14608  	;
 14609  __299:
 14610  	;
 14611  	goto __288
 14612  __289:
 14613  	;
 14614  
 14615  	// handle error breaks in while
 14616  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == BAD) {
 14617  		goto __356
 14618  	}
 14619  	goto __9
 14620  __356:
 14621  	;
 14622  
 14623  	// check for end-of-block code (better have one)
 14624  	if !(int32(*(*uint16)(unsafe.Pointer((state + 152 /* &.lens */) + 256*2))) == 0) {
 14625  		goto __357
 14626  	}
 14627  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 502 /* "invalid code -- ..." */
 14628  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14629  	goto __9
 14630  __357:
 14631  	;
 14632  
 14633  	// build code tables -- note: do not change the lenbits or distbits
 14634  	//                values here (9 and 6) without reading the comments in inftrees.h
 14635  	//                concerning the ENOUGH constants, which depend on those values
 14636  	(*Inflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 /* &.codes */
 14637  	(*Inflate_state)(unsafe.Pointer(state)).Flencode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 14638  	(*Inflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9)
 14639  	ret = Xinflate_table(tls, LENS, state+152 /* &.lens */, (*Inflate_state)(unsafe.Pointer(state)).Fnlen, (state + 144 /* &.next */),
 14640  		(state + 120 /* &.lenbits */), state+792 /* &.work */)
 14641  	if !(ret != 0) {
 14642  		goto __358
 14643  	}
 14644  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 539 /* "invalid literal/..." */
 14645  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14646  	goto __9
 14647  __358:
 14648  	;
 14649  	(*Inflate_state)(unsafe.Pointer(state)).Fdistcode = (*Inflate_state)(unsafe.Pointer(state)).Fnext
 14650  	(*Inflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6)
 14651  	ret = Xinflate_table(tls, DISTS, ((state + 152 /* &.lens */) + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fnlen)*2), (*Inflate_state)(unsafe.Pointer(state)).Fndist,
 14652  		(state + 144 /* &.next */), (state + 124 /* &.distbits */), state+792 /* &.work */)
 14653  	if !(ret != 0) {
 14654  		goto __359
 14655  	}
 14656  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 567 /* "invalid distance..." */
 14657  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14658  	goto __9
 14659  __359:
 14660  	;
 14661  
 14662  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_
 14663  	if !(flush == Z_TREES) {
 14664  		goto __360
 14665  	}
 14666  	goto inf_leave
 14667  __360:
 14668  	;
 14669  __29:
 14670  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 14671  __30:
 14672  	if !((have >= uint32(6)) && (left >= uint32(258))) {
 14673  		goto __361
 14674  	}
 14675  __362:
 14676  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 14677  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 14678  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
 14679  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 14680  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 14681  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 14682  	goto __363
 14683  __363:
 14684  	if 0 != 0 {
 14685  		goto __362
 14686  	}
 14687  	goto __364
 14688  __364:
 14689  	;
 14690  	Xinflate_fast(tls, strm, out)
 14691  __365:
 14692  	put = (*Z_stream)(unsafe.Pointer(strm)).Fnext_out
 14693  	left = (*Z_stream)(unsafe.Pointer(strm)).Favail_out
 14694  	next = (*Z_stream)(unsafe.Pointer(strm)).Fnext_in
 14695  	have = (*Z_stream)(unsafe.Pointer(strm)).Favail_in
 14696  	hold = (*Inflate_state)(unsafe.Pointer(state)).Fhold
 14697  	bits = (*Inflate_state)(unsafe.Pointer(state)).Fbits
 14698  	goto __366
 14699  __366:
 14700  	if 0 != 0 {
 14701  		goto __365
 14702  	}
 14703  	goto __367
 14704  __367:
 14705  	;
 14706  	if !((*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE) {
 14707  		goto __368
 14708  	}
 14709  	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
 14710  __368:
 14711  	;
 14712  	goto __9
 14713  __361:
 14714  	;
 14715  	(*Inflate_state)(unsafe.Pointer(state)).Fback = 0
 14716  __369:
 14717  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Flencode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Flenbits))-uint32(1))))*4))
 14718  	if !((uint32(here.Fbits)) <= bits) {
 14719  		goto __372
 14720  	}
 14721  	goto __371
 14722  __372:
 14723  	;
 14724  __373:
 14725  	if !(have == uint32(0)) {
 14726  		goto __376
 14727  	}
 14728  	goto inf_leave
 14729  __376:
 14730  	;
 14731  	have--
 14732  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14733  	bits = bits + (uint32(8))
 14734  	goto __374
 14735  __374:
 14736  	if 0 != 0 {
 14737  		goto __373
 14738  	}
 14739  	goto __375
 14740  __375:
 14741  	;
 14742  	goto __370
 14743  __370:
 14744  	goto __369
 14745  	goto __371
 14746  __371:
 14747  	;
 14748  	if !((here.Fop != 0) && ((int32(here.Fop) & 0xf0) == 0)) {
 14749  		goto __377
 14750  	}
 14751  	last = here
 14752  __378:
 14753  	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))
 14754  	if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) {
 14755  		goto __381
 14756  	}
 14757  	goto __380
 14758  __381:
 14759  	;
 14760  __382:
 14761  	if !(have == uint32(0)) {
 14762  		goto __385
 14763  	}
 14764  	goto inf_leave
 14765  __385:
 14766  	;
 14767  	have--
 14768  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14769  	bits = bits + (uint32(8))
 14770  	goto __383
 14771  __383:
 14772  	if 0 != 0 {
 14773  		goto __382
 14774  	}
 14775  	goto __384
 14776  __384:
 14777  	;
 14778  	goto __379
 14779  __379:
 14780  	goto __378
 14781  	goto __380
 14782  __380:
 14783  	;
 14784  __386:
 14785  	hold >>= int32(last.Fbits)
 14786  	bits = bits - (uint32(last.Fbits))
 14787  	goto __387
 14788  __387:
 14789  	if 0 != 0 {
 14790  		goto __386
 14791  	}
 14792  	goto __388
 14793  __388:
 14794  	;
 14795  	*(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(last.Fbits))
 14796  __377:
 14797  	;
 14798  __389:
 14799  	hold >>= int32(here.Fbits)
 14800  	bits = bits - (uint32(here.Fbits))
 14801  	goto __390
 14802  __390:
 14803  	if 0 != 0 {
 14804  		goto __389
 14805  	}
 14806  	goto __391
 14807  __391:
 14808  	;
 14809  	*(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(here.Fbits))
 14810  	(*Inflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval)
 14811  	if !((int32(here.Fop)) == 0) {
 14812  		goto __392
 14813  	}
 14814  
 14815  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LIT
 14816  	goto __9
 14817  __392:
 14818  	;
 14819  	if !((int32(here.Fop) & 32) != 0) {
 14820  		goto __393
 14821  	}
 14822  
 14823  	(*Inflate_state)(unsafe.Pointer(state)).Fback = -1
 14824  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 14825  	goto __9
 14826  __393:
 14827  	;
 14828  	if !((int32(here.Fop) & 64) != 0) {
 14829  		goto __394
 14830  	}
 14831  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 589 /* "invalid literal/..." */
 14832  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14833  	goto __9
 14834  __394:
 14835  	;
 14836  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15))
 14837  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENEXT
 14838  __31:
 14839  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) {
 14840  		goto __395
 14841  	}
 14842  __396:
 14843  __399:
 14844  	if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) {
 14845  		goto __400
 14846  	}
 14847  __401:
 14848  	if !(have == uint32(0)) {
 14849  		goto __404
 14850  	}
 14851  	goto inf_leave
 14852  __404:
 14853  	;
 14854  	have--
 14855  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14856  	bits = bits + (uint32(8))
 14857  	goto __402
 14858  __402:
 14859  	if 0 != 0 {
 14860  		goto __401
 14861  	}
 14862  	goto __403
 14863  __403:
 14864  	;
 14865  	goto __399
 14866  __400:
 14867  	;
 14868  	goto __397
 14869  __397:
 14870  	if 0 != 0 {
 14871  		goto __396
 14872  	}
 14873  	goto __398
 14874  __398:
 14875  	;
 14876  	*(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1)))
 14877  __405:
 14878  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 14879  	bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra)
 14880  	goto __406
 14881  __406:
 14882  	if 0 != 0 {
 14883  		goto __405
 14884  	}
 14885  	goto __407
 14886  __407:
 14887  	;
 14888  	*(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += int32(((*Inflate_state)(unsafe.Pointer(state)).Fextra))
 14889  __395:
 14890  	;
 14891  
 14892  	(*Inflate_state)(unsafe.Pointer(state)).Fwas = (*Inflate_state)(unsafe.Pointer(state)).Flength
 14893  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DIST
 14894  __32:
 14895  __408:
 14896  	here = *(*Code)(unsafe.Pointer((*Inflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr((uint32(hold)&((uint32(1)<<((*Inflate_state)(unsafe.Pointer(state)).Fdistbits))-uint32(1))))*4))
 14897  	if !((uint32(here.Fbits)) <= bits) {
 14898  		goto __411
 14899  	}
 14900  	goto __410
 14901  __411:
 14902  	;
 14903  __412:
 14904  	if !(have == uint32(0)) {
 14905  		goto __415
 14906  	}
 14907  	goto inf_leave
 14908  __415:
 14909  	;
 14910  	have--
 14911  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14912  	bits = bits + (uint32(8))
 14913  	goto __413
 14914  __413:
 14915  	if 0 != 0 {
 14916  		goto __412
 14917  	}
 14918  	goto __414
 14919  __414:
 14920  	;
 14921  	goto __409
 14922  __409:
 14923  	goto __408
 14924  	goto __410
 14925  __410:
 14926  	;
 14927  	if !((int32(here.Fop) & 0xf0) == 0) {
 14928  		goto __416
 14929  	}
 14930  	last = here
 14931  __417:
 14932  	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))
 14933  	if !((uint32(int32(last.Fbits) + int32(here.Fbits))) <= bits) {
 14934  		goto __420
 14935  	}
 14936  	goto __419
 14937  __420:
 14938  	;
 14939  __421:
 14940  	if !(have == uint32(0)) {
 14941  		goto __424
 14942  	}
 14943  	goto inf_leave
 14944  __424:
 14945  	;
 14946  	have--
 14947  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 14948  	bits = bits + (uint32(8))
 14949  	goto __422
 14950  __422:
 14951  	if 0 != 0 {
 14952  		goto __421
 14953  	}
 14954  	goto __423
 14955  __423:
 14956  	;
 14957  	goto __418
 14958  __418:
 14959  	goto __417
 14960  	goto __419
 14961  __419:
 14962  	;
 14963  __425:
 14964  	hold >>= int32(last.Fbits)
 14965  	bits = bits - (uint32(last.Fbits))
 14966  	goto __426
 14967  __426:
 14968  	if 0 != 0 {
 14969  		goto __425
 14970  	}
 14971  	goto __427
 14972  __427:
 14973  	;
 14974  	*(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(last.Fbits))
 14975  __416:
 14976  	;
 14977  __428:
 14978  	hold >>= int32(here.Fbits)
 14979  	bits = bits - (uint32(here.Fbits))
 14980  	goto __429
 14981  __429:
 14982  	if 0 != 0 {
 14983  		goto __428
 14984  	}
 14985  	goto __430
 14986  __430:
 14987  	;
 14988  	*(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += (int32(here.Fbits))
 14989  	if !((int32(here.Fop) & 64) != 0) {
 14990  		goto __431
 14991  	}
 14992  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 617 /* "invalid distance..." */
 14993  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 14994  	goto __9
 14995  __431:
 14996  	;
 14997  	(*Inflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval)
 14998  	(*Inflate_state)(unsafe.Pointer(state)).Fextra = ((uint32(here.Fop)) & uint32(15))
 14999  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DISTEXT
 15000  __33:
 15001  	if !((*Inflate_state)(unsafe.Pointer(state)).Fextra != 0) {
 15002  		goto __432
 15003  	}
 15004  __433:
 15005  __436:
 15006  	if !(bits < ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) {
 15007  		goto __437
 15008  	}
 15009  __438:
 15010  	if !(have == uint32(0)) {
 15011  		goto __441
 15012  	}
 15013  	goto inf_leave
 15014  __441:
 15015  	;
 15016  	have--
 15017  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 15018  	bits = bits + (uint32(8))
 15019  	goto __439
 15020  __439:
 15021  	if 0 != 0 {
 15022  		goto __438
 15023  	}
 15024  	goto __440
 15025  __440:
 15026  	;
 15027  	goto __436
 15028  __437:
 15029  	;
 15030  	goto __434
 15031  __434:
 15032  	if 0 != 0 {
 15033  		goto __433
 15034  	}
 15035  	goto __435
 15036  __435:
 15037  	;
 15038  	*(*uint32)(unsafe.Pointer(state + 96 /* &.offset */)) += (uint32(hold) & ((uint32(1) << ((*Inflate_state)(unsafe.Pointer(state)).Fextra)) - uint32(1)))
 15039  __442:
 15040  	hold >>= (*Inflate_state)(unsafe.Pointer(state)).Fextra
 15041  	bits = bits - ((*Inflate_state)(unsafe.Pointer(state)).Fextra)
 15042  	goto __443
 15043  __443:
 15044  	if 0 != 0 {
 15045  		goto __442
 15046  	}
 15047  	goto __444
 15048  __444:
 15049  	;
 15050  	*(*int32)(unsafe.Pointer(state + 7148 /* &.back */)) += int32(((*Inflate_state)(unsafe.Pointer(state)).Fextra))
 15051  __432:
 15052  	;
 15053  
 15054  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = MATCH
 15055  __34:
 15056  	if !(left == uint32(0)) {
 15057  		goto __445
 15058  	}
 15059  	goto inf_leave
 15060  __445:
 15061  	;
 15062  	copy = (out - left)
 15063  	if !((*Inflate_state)(unsafe.Pointer(state)).Foffset > copy) {
 15064  		goto __446
 15065  	} // copy from window
 15066  	copy = ((*Inflate_state)(unsafe.Pointer(state)).Foffset - copy)
 15067  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwhave) {
 15068  		goto __448
 15069  	}
 15070  	if !((*Inflate_state)(unsafe.Pointer(state)).Fsane != 0) {
 15071  		goto __449
 15072  	}
 15073  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 639 /* "invalid distance..." */
 15074  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 15075  	goto __9
 15076  __449:
 15077  	;
 15078  __448:
 15079  	;
 15080  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Fwnext) {
 15081  		goto __450
 15082  	}
 15083  	copy = copy - ((*Inflate_state)(unsafe.Pointer(state)).Fwnext)
 15084  	from = ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fwsize - copy)))
 15085  	goto __451
 15086  __450:
 15087  	from = ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr(((*Inflate_state)(unsafe.Pointer(state)).Fwnext - copy)))
 15088  __451:
 15089  	;
 15090  	if !(copy > (*Inflate_state)(unsafe.Pointer(state)).Flength) {
 15091  		goto __452
 15092  	}
 15093  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 15094  __452:
 15095  	;
 15096  	goto __447
 15097  __446: // copy from output
 15098  	from = (put - uintptr((*Inflate_state)(unsafe.Pointer(state)).Foffset))
 15099  	copy = (*Inflate_state)(unsafe.Pointer(state)).Flength
 15100  __447:
 15101  	;
 15102  	if !(copy > left) {
 15103  		goto __453
 15104  	}
 15105  	copy = left
 15106  __453:
 15107  	;
 15108  	left = left - (copy)
 15109  	*(*uint32)(unsafe.Pointer(state + 92 /* &.length */)) -= (copy)
 15110  __454:
 15111  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&from, 1)))
 15112  	goto __455
 15113  __455:
 15114  	if libc.PreDecUint32(&copy, 1) != 0 {
 15115  		goto __454
 15116  	}
 15117  	goto __456
 15118  __456:
 15119  	;
 15120  	if !((*Inflate_state)(unsafe.Pointer(state)).Flength == uint32(0)) {
 15121  		goto __457
 15122  	}
 15123  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 15124  __457:
 15125  	;
 15126  	goto __9
 15127  __35:
 15128  	if !(left == uint32(0)) {
 15129  		goto __458
 15130  	}
 15131  	goto inf_leave
 15132  __458:
 15133  	;
 15134  	*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&put, 1))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Flength)
 15135  	left--
 15136  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN
 15137  	goto __9
 15138  __36:
 15139  	if !((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) {
 15140  		goto __459
 15141  	}
 15142  __460:
 15143  __463:
 15144  	if !(bits < (uint32(32))) {
 15145  		goto __464
 15146  	}
 15147  __465:
 15148  	if !(have == uint32(0)) {
 15149  		goto __468
 15150  	}
 15151  	goto inf_leave
 15152  __468:
 15153  	;
 15154  	have--
 15155  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 15156  	bits = bits + (uint32(8))
 15157  	goto __466
 15158  __466:
 15159  	if 0 != 0 {
 15160  		goto __465
 15161  	}
 15162  	goto __467
 15163  __467:
 15164  	;
 15165  	goto __463
 15166  __464:
 15167  	;
 15168  	goto __461
 15169  __461:
 15170  	if 0 != 0 {
 15171  		goto __460
 15172  	}
 15173  	goto __462
 15174  __462:
 15175  	;
 15176  	out = out - (left)
 15177  	*(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(out))
 15178  	*(*uint64)(unsafe.Pointer(state + 40 /* &.total */)) += (uint64(out))
 15179  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (out != 0)) {
 15180  		goto __469
 15181  	}
 15182  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, func() uint64 {
 15183  		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
 15184  			return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (put - uintptr(out)), out)
 15185  		}
 15186  		return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, (put - uintptr(out)), out)
 15187  	}())
 15188  __469:
 15189  	;
 15190  	out = left
 15191  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && ((func() uint64 {
 15192  		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
 15193  			return hold
 15194  		}
 15195  		return ((((((hold) >> 24) & uint64(0xff)) + (((hold) >> 8) & uint64(0xff00))) + (((hold) & uint64(0xff00)) << 8)) + (((hold) & uint64(0xff)) << 24))
 15196  	}()) != (*Inflate_state)(unsafe.Pointer(state)).Fcheck)) {
 15197  		goto __470
 15198  	}
 15199  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 784 /* "incorrect data c..." */
 15200  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 15201  	goto __9
 15202  __470:
 15203  	;
 15204  __471:
 15205  	hold = uint64(0)
 15206  	bits = uint32(0)
 15207  	goto __472
 15208  __472:
 15209  	if 0 != 0 {
 15210  		goto __471
 15211  	}
 15212  	goto __473
 15213  __473:
 15214  	;
 15215  
 15216  __459:
 15217  	;
 15218  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = LENGTH
 15219  __37:
 15220  	if !(((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) && ((*Inflate_state)(unsafe.Pointer(state)).Fflags != 0)) {
 15221  		goto __474
 15222  	}
 15223  __475:
 15224  __478:
 15225  	if !(bits < (uint32(32))) {
 15226  		goto __479
 15227  	}
 15228  __480:
 15229  	if !(have == uint32(0)) {
 15230  		goto __483
 15231  	}
 15232  	goto inf_leave
 15233  __483:
 15234  	;
 15235  	have--
 15236  	hold = hold + ((uint64(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&next, 1))))) << bits)
 15237  	bits = bits + (uint32(8))
 15238  	goto __481
 15239  __481:
 15240  	if 0 != 0 {
 15241  		goto __480
 15242  	}
 15243  	goto __482
 15244  __482:
 15245  	;
 15246  	goto __478
 15247  __479:
 15248  	;
 15249  	goto __476
 15250  __476:
 15251  	if 0 != 0 {
 15252  		goto __475
 15253  	}
 15254  	goto __477
 15255  __477:
 15256  	;
 15257  	if !(hold != ((*Inflate_state)(unsafe.Pointer(state)).Ftotal & 0xffffffff)) {
 15258  		goto __484
 15259  	}
 15260  	(*Z_stream)(unsafe.Pointer(strm)).Fmsg = ts + 805 /* "incorrect length..." */
 15261  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = BAD
 15262  	goto __9
 15263  __484:
 15264  	;
 15265  __485:
 15266  	hold = uint64(0)
 15267  	bits = uint32(0)
 15268  	goto __486
 15269  __486:
 15270  	if 0 != 0 {
 15271  		goto __485
 15272  	}
 15273  	goto __487
 15274  __487:
 15275  	;
 15276  
 15277  __474:
 15278  	;
 15279  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = DONE
 15280  __38:
 15281  	ret = Z_STREAM_END
 15282  	goto inf_leave
 15283  __39:
 15284  	ret = -3
 15285  	goto inf_leave
 15286  __40:
 15287  	return -4
 15288  __41:
 15289  __42:
 15290  	return -2
 15291  __9:
 15292  	;
 15293  	goto __7
 15294  __7:
 15295  	goto __6
 15296  	goto __8
 15297  __8:
 15298  	;
 15299  
 15300  	//
 15301  	//        Return from inflate(), updating the total counts and the check value.
 15302  	//        If there was no progress during the inflate() call, return a buffer
 15303  	//        error.  Call updatewindow() to create and/or update the window state.
 15304  	//        Note: a memory error from inflate() is non-recoverable.
 15305  	//
 15306  inf_leave:
 15307  __488:
 15308  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_out = put
 15309  	(*Z_stream)(unsafe.Pointer(strm)).Favail_out = left
 15310  	(*Z_stream)(unsafe.Pointer(strm)).Fnext_in = next
 15311  	(*Z_stream)(unsafe.Pointer(strm)).Favail_in = have
 15312  	(*Inflate_state)(unsafe.Pointer(state)).Fhold = hold
 15313  	(*Inflate_state)(unsafe.Pointer(state)).Fbits = bits
 15314  	goto __489
 15315  __489:
 15316  	if 0 != 0 {
 15317  		goto __488
 15318  	}
 15319  	goto __490
 15320  __490:
 15321  	;
 15322  	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)))) {
 15323  		goto __491
 15324  	}
 15325  	if !(updatewindow(tls, strm, (*Z_stream)(unsafe.Pointer(strm)).Fnext_out, (out-(*Z_stream)(unsafe.Pointer(strm)).Favail_out)) != 0) {
 15326  		goto __492
 15327  	}
 15328  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM
 15329  	return -4
 15330  __492:
 15331  	;
 15332  __491:
 15333  	;
 15334  	in = in - ((*Z_stream)(unsafe.Pointer(strm)).Favail_in)
 15335  	out = out - ((*Z_stream)(unsafe.Pointer(strm)).Favail_out)
 15336  	*(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(in))
 15337  	*(*ULong)(unsafe.Pointer(strm + 40 /* &.total_out */)) += (ULong(out))
 15338  	*(*uint64)(unsafe.Pointer(state + 40 /* &.total */)) += (uint64(out))
 15339  	if !((((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 4) != 0) && (out != 0)) {
 15340  		goto __493
 15341  	}
 15342  	(*Z_stream)(unsafe.Pointer(strm)).Fadler = libc.AssignPtrUint64(state+32 /* &.check */, func() uint64 {
 15343  		if (*Inflate_state)(unsafe.Pointer(state)).Fflags != 0 {
 15344  			return Xcrc32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr(out)), out)
 15345  		}
 15346  		return Xadler32(tls, (*Inflate_state)(unsafe.Pointer(state)).Fcheck, ((*Z_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr(out)), out)
 15347  	}())
 15348  __493:
 15349  	;
 15350  	(*Z_stream)(unsafe.Pointer(strm)).Fdata_type = (((int32((*Inflate_state)(unsafe.Pointer(state)).Fbits) + (func() int32 {
 15351  		if (*Inflate_state)(unsafe.Pointer(state)).Flast != 0 {
 15352  			return 64
 15353  		}
 15354  		return 0
 15355  	}())) + (func() int32 {
 15356  		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == TYPE {
 15357  			return 128
 15358  		}
 15359  		return 0
 15360  	}())) + (func() int32 {
 15361  		if ((*Inflate_state)(unsafe.Pointer(state)).Fmode == LEN_) || ((*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY_) {
 15362  			return 256
 15363  		}
 15364  		return 0
 15365  	}()))
 15366  	if !((((in == uint32(0)) && (out == uint32(0))) || (flush == Z_FINISH)) && (ret == Z_OK)) {
 15367  		goto __494
 15368  	}
 15369  	ret = -5
 15370  __494:
 15371  	;
 15372  	return ret
 15373  }
 15374  
 15375  var order1 =                                                                                                                                                                                                                         // permutation of code lengths
 15376  [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 */
 15377  
 15378  func XinflateEnd(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1277:13: */
 15379  	var state uintptr
 15380  	if inflateStateCheck(tls, strm) != 0 {
 15381  		return -2
 15382  	}
 15383  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 15384  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) {
 15385  		(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((strm + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Inflate_state)(unsafe.Pointer(state)).Fwindow)
 15386  	}
 15387  	(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((strm + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(strm)).Fopaque, (*Z_stream)(unsafe.Pointer(strm)).Fstate)
 15388  	(*Z_stream)(unsafe.Pointer(strm)).Fstate = uintptr(Z_NULL)
 15389  
 15390  	return Z_OK
 15391  }
 15392  
 15393  func XinflateGetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength uintptr) int32 { /* inflate.c:1291:13: */
 15394  	var state uintptr
 15395  
 15396  	// check state
 15397  	if inflateStateCheck(tls, strm) != 0 {
 15398  		return -2
 15399  	}
 15400  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 15401  
 15402  	// copy dictionary
 15403  	if ((*Inflate_state)(unsafe.Pointer(state)).Fwhave != 0) && (dictionary != uintptr(Z_NULL)) {
 15404  		libc.Xmemcpy(tls, dictionary, ((*Inflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)),
 15405  			(uint64((*Inflate_state)(unsafe.Pointer(state)).Fwhave - (*Inflate_state)(unsafe.Pointer(state)).Fwnext)))
 15406  		libc.Xmemcpy(tls, ((dictionary + uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwhave)) - uintptr((*Inflate_state)(unsafe.Pointer(state)).Fwnext)),
 15407  			(*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64((*Inflate_state)(unsafe.Pointer(state)).Fwnext))
 15408  	}
 15409  	if dictLength != uintptr(Z_NULL) {
 15410  		*(*UInt)(unsafe.Pointer(dictLength)) = (*Inflate_state)(unsafe.Pointer(state)).Fwhave
 15411  	}
 15412  	return Z_OK
 15413  }
 15414  
 15415  func XinflateSetDictionary(tls *libc.TLS, strm Z_streamp, dictionary uintptr, dictLength UInt) int32 { /* inflate.c:1314:13: */
 15416  	var state uintptr
 15417  	var dictid uint64
 15418  	var ret int32
 15419  
 15420  	// check state
 15421  	if inflateStateCheck(tls, strm) != 0 {
 15422  		return -2
 15423  	}
 15424  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 15425  	if ((*Inflate_state)(unsafe.Pointer(state)).Fwrap != 0) && ((*Inflate_state)(unsafe.Pointer(state)).Fmode != DICT) {
 15426  		return -2
 15427  	}
 15428  
 15429  	// check for correct dictionary identifier
 15430  	if (*Inflate_state)(unsafe.Pointer(state)).Fmode == DICT {
 15431  		dictid = Xadler32(tls, uint64(0), uintptr(Z_NULL), uint32(0))
 15432  		dictid = Xadler32(tls, dictid, dictionary, dictLength)
 15433  		if dictid != (*Inflate_state)(unsafe.Pointer(state)).Fcheck {
 15434  			return -3
 15435  		}
 15436  	}
 15437  
 15438  	// copy dictionary to window using updatewindow(), which will amend the
 15439  	//        existing dictionary if appropriate
 15440  	ret = updatewindow(tls, strm, (dictionary + uintptr(dictLength)), dictLength)
 15441  	if ret != 0 {
 15442  		(*Inflate_state)(unsafe.Pointer(state)).Fmode = MEM
 15443  		return -4
 15444  	}
 15445  	(*Inflate_state)(unsafe.Pointer(state)).Fhavedict = 1
 15446  
 15447  	return Z_OK
 15448  }
 15449  
 15450  func XinflateGetHeader(tls *libc.TLS, strm Z_streamp, head Gz_headerp) int32 { /* inflate.c:1349:13: */
 15451  	var state uintptr
 15452  
 15453  	// check state
 15454  	if inflateStateCheck(tls, strm) != 0 {
 15455  		return -2
 15456  	}
 15457  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 15458  	if ((*Inflate_state)(unsafe.Pointer(state)).Fwrap & 2) == 0 {
 15459  		return -2
 15460  	}
 15461  
 15462  	// save header structure
 15463  	(*Inflate_state)(unsafe.Pointer(state)).Fhead = head
 15464  	(*Gz_header)(unsafe.Pointer(head)).Fdone = 0
 15465  	return Z_OK
 15466  }
 15467  
 15468  //
 15469  //    Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff.  Return when found
 15470  //    or when out of input.  When called, *have is the number of pattern bytes
 15471  //    found in order so far, in 0..3.  On return *have is updated to the new
 15472  //    state.  If on return *have equals four, then the pattern was found and the
 15473  //    return value is how many bytes were read including the last byte of the
 15474  //    pattern.  If *have is less than four, then the pattern has not been found
 15475  //    yet and the return value is len.  In the latter case, syncsearch() can be
 15476  //    called again with more data and the *have state.  *have is initialized to
 15477  //    zero for the first call.
 15478  //
 15479  func syncsearch(tls *libc.TLS, have uintptr, buf uintptr, len uint32) uint32 { /* inflate.c:1377:16: */
 15480  	var got uint32
 15481  	var next uint32
 15482  
 15483  	got = *(*uint32)(unsafe.Pointer(have))
 15484  	next = uint32(0)
 15485  	for (next < len) && (got < uint32(4)) {
 15486  		if (int32(*(*uint8)(unsafe.Pointer(buf + uintptr(next))))) == (func() int32 {
 15487  			if got < uint32(2) {
 15488  				return 0
 15489  			}
 15490  			return 0xff
 15491  		}()) {
 15492  			got++
 15493  		} else if *(*uint8)(unsafe.Pointer(buf + uintptr(next))) != 0 {
 15494  			got = uint32(0)
 15495  		} else {
 15496  			got = (uint32(4) - got)
 15497  		}
 15498  		next++
 15499  	}
 15500  	*(*uint32)(unsafe.Pointer(have)) = got
 15501  	return next
 15502  }
 15503  
 15504  func XinflateSync(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1400:13: */
 15505  	bp := tls.Alloc(4)
 15506  	defer tls.Free(4)
 15507  
 15508  	var len uint32 // number of bytes to look at or looked at
 15509  	var in uint64
 15510  	var out uint64 // temporary to save total_in and total_out
 15511  	// var buf [4]uint8 at bp, 4
 15512  	// to restore bit buffer to byte string
 15513  	var state uintptr
 15514  
 15515  	// check parameters
 15516  	if inflateStateCheck(tls, strm) != 0 {
 15517  		return -2
 15518  	}
 15519  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 15520  	if ((*Z_stream)(unsafe.Pointer(strm)).Favail_in == UInt(0)) && ((*Inflate_state)(unsafe.Pointer(state)).Fbits < uint32(8)) {
 15521  		return -5
 15522  	}
 15523  
 15524  	// if first time, start search in bit buffer
 15525  	if (*Inflate_state)(unsafe.Pointer(state)).Fmode != SYNC {
 15526  		(*Inflate_state)(unsafe.Pointer(state)).Fmode = SYNC
 15527  		libc.AssignShlPtrUint64(state+80 /* &.hold */, int(((*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7))))
 15528  		*(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) -= ((*Inflate_state)(unsafe.Pointer(state)).Fbits & uint32(7))
 15529  		len = uint32(0)
 15530  		for (*Inflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) {
 15531  			*(*uint8)(unsafe.Pointer(bp /* &buf[0] */ + uintptr(libc.PostIncUint32(&len, 1)))) = uint8((*Inflate_state)(unsafe.Pointer(state)).Fhold)
 15532  			libc.AssignShrPtrUint64(state+80 /* &.hold */, int(8))
 15533  			*(*uint32)(unsafe.Pointer(state + 88 /* &.bits */)) -= (uint32(8))
 15534  		}
 15535  		(*Inflate_state)(unsafe.Pointer(state)).Fhave = uint32(0)
 15536  		syncsearch(tls, (state + 140 /* &.have */), bp /* &buf[0] */, len)
 15537  	}
 15538  
 15539  	// search available input
 15540  	len = syncsearch(tls, (state + 140 /* &.have */), (*Z_stream)(unsafe.Pointer(strm)).Fnext_in, (*Z_stream)(unsafe.Pointer(strm)).Favail_in)
 15541  	*(*UInt)(unsafe.Pointer(strm + 8 /* &.avail_in */)) -= (len)
 15542  	*(*uintptr)(unsafe.Pointer(strm /* &.next_in */)) += (uintptr(len))
 15543  	*(*ULong)(unsafe.Pointer(strm + 16 /* &.total_in */)) += (ULong(len))
 15544  
 15545  	// return no joy or set up to restart inflate() on a new block
 15546  	if (*Inflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) {
 15547  		return -3
 15548  	}
 15549  	in = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_in
 15550  	out = (*Z_stream)(unsafe.Pointer(strm)).Ftotal_out
 15551  	XinflateReset(tls, strm)
 15552  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_in = in
 15553  	(*Z_stream)(unsafe.Pointer(strm)).Ftotal_out = out
 15554  	(*Inflate_state)(unsafe.Pointer(state)).Fmode = TYPE
 15555  	return Z_OK
 15556  }
 15557  
 15558  //
 15559  //    Returns true if inflate is currently at the end of a block generated by
 15560  //    Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
 15561  //    implementation to provide an additional safety check. PPP uses
 15562  //    Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
 15563  //    block. When decompressing, PPP checks that at the end of input packet,
 15564  //    inflate is waiting for these length bytes.
 15565  //
 15566  func XinflateSyncPoint(tls *libc.TLS, strm Z_streamp) int32 { /* inflate.c:1451:13: */
 15567  	var state uintptr
 15568  
 15569  	if inflateStateCheck(tls, strm) != 0 {
 15570  		return -2
 15571  	}
 15572  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 15573  	return (libc.Bool32(((*Inflate_state)(unsafe.Pointer(state)).Fmode == STORED) && ((*Inflate_state)(unsafe.Pointer(state)).Fbits == uint32(0))))
 15574  }
 15575  
 15576  func XinflateCopy(tls *libc.TLS, dest Z_streamp, source Z_streamp) int32 { /* inflate.c:1461:13: */
 15577  	var state uintptr
 15578  	var copy uintptr
 15579  	var window uintptr
 15580  	var wsize uint32
 15581  
 15582  	// check input
 15583  	if (inflateStateCheck(tls, source) != 0) || (dest == uintptr(Z_NULL)) {
 15584  		return -2
 15585  	}
 15586  	state = (*Z_stream)(unsafe.Pointer(source)).Fstate
 15587  
 15588  	// allocate space
 15589  	copy = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((source + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, uint32(1), uint32(unsafe.Sizeof(Inflate_state{})))
 15590  	if copy == uintptr(Z_NULL) {
 15591  		return -4
 15592  	}
 15593  	window = uintptr(Z_NULL)
 15594  	if (*Inflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(Z_NULL) {
 15595  		window = (*(*func(*libc.TLS, Voidpf, UInt, UInt) Voidpf)(unsafe.Pointer((source + 64 /* &.zalloc */))))(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits), uint32(unsafe.Sizeof(uint8(0))))
 15596  		if window == uintptr(Z_NULL) {
 15597  			(*(*func(*libc.TLS, Voidpf, Voidpf))(unsafe.Pointer((source + 72 /* &.zfree */))))(tls, (*Z_stream)(unsafe.Pointer(source)).Fopaque, copy)
 15598  			return -4
 15599  		}
 15600  	}
 15601  
 15602  	// copy state
 15603  	libc.Xmemcpy(tls, dest, source, uint64(unsafe.Sizeof(Z_stream{})))
 15604  	libc.Xmemcpy(tls, copy, state, uint64(unsafe.Sizeof(Inflate_state{})))
 15605  	(*Inflate_state)(unsafe.Pointer(copy)).Fstrm = dest
 15606  	if ((*Inflate_state)(unsafe.Pointer(state)).Flencode >= state+1368 /* &.codes */) && ((*Inflate_state)(unsafe.Pointer(state)).Flencode <= (((state + 1368 /* &.codes */) + uintptr((ENOUGH_LENS+ENOUGH_DISTS))*4) - uintptr(1)*4)) {
 15607  		(*Inflate_state)(unsafe.Pointer(copy)).Flencode = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Flencode-(state+1368 /* &.codes */))/4)))*4)
 15608  		(*Inflate_state)(unsafe.Pointer(copy)).Fdistcode = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Fdistcode-(state+1368 /* &.codes */))/4)))*4)
 15609  	}
 15610  	(*Inflate_state)(unsafe.Pointer(copy)).Fnext = ((copy + 1368 /* &.codes */) + uintptr((int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext-(state+1368 /* &.codes */))/4)))*4)
 15611  	if window != uintptr(Z_NULL) {
 15612  		wsize = (uint32(1) << (*Inflate_state)(unsafe.Pointer(state)).Fwbits)
 15613  		libc.Xmemcpy(tls, window, (*Inflate_state)(unsafe.Pointer(state)).Fwindow, uint64(wsize))
 15614  	}
 15615  	(*Inflate_state)(unsafe.Pointer(copy)).Fwindow = window
 15616  	(*Z_stream)(unsafe.Pointer(dest)).Fstate = copy
 15617  	return Z_OK
 15618  }
 15619  
 15620  func XinflateUndermine(tls *libc.TLS, strm Z_streamp, subvert int32) int32 { /* inflate.c:1508:13: */
 15621  	var state uintptr
 15622  
 15623  	if inflateStateCheck(tls, strm) != 0 {
 15624  		return -2
 15625  	}
 15626  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 15627  	_ = subvert
 15628  	(*Inflate_state)(unsafe.Pointer(state)).Fsane = 1
 15629  	return -3
 15630  }
 15631  
 15632  func XinflateValidate(tls *libc.TLS, strm Z_streamp, check int32) int32 { /* inflate.c:1526:13: */
 15633  	var state uintptr
 15634  
 15635  	if inflateStateCheck(tls, strm) != 0 {
 15636  		return -2
 15637  	}
 15638  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 15639  	if check != 0 {
 15640  		*(*int32)(unsafe.Pointer(state + 16 /* &.wrap */)) |= (4)
 15641  	} else {
 15642  		*(*int32)(unsafe.Pointer(state + 16 /* &.wrap */)) &= (libc.CplInt32(4))
 15643  	}
 15644  	return Z_OK
 15645  }
 15646  
 15647  func XinflateMark(tls *libc.TLS, strm Z_streamp) int64 { /* inflate.c:1541:14: */
 15648  	var state uintptr
 15649  
 15650  	if inflateStateCheck(tls, strm) != 0 {
 15651  		return -(int64(1) << 16)
 15652  	}
 15653  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 15654  	return ((int64((uint64(int64((*Inflate_state)(unsafe.Pointer(state)).Fback))) << 16)) + (func() int64 {
 15655  		if (*Inflate_state)(unsafe.Pointer(state)).Fmode == COPY {
 15656  			return int64((*Inflate_state)(unsafe.Pointer(state)).Flength)
 15657  		}
 15658  		return func() int64 {
 15659  			if (*Inflate_state)(unsafe.Pointer(state)).Fmode == MATCH {
 15660  				return (int64((*Inflate_state)(unsafe.Pointer(state)).Fwas - (*Inflate_state)(unsafe.Pointer(state)).Flength))
 15661  			}
 15662  			return int64(0)
 15663  		}()
 15664  	}()))
 15665  }
 15666  
 15667  func XinflateCodesUsed(tls *libc.TLS, strm Z_streamp) uint64 { /* inflate.c:1554:23: */
 15668  	var state uintptr
 15669  	if inflateStateCheck(tls, strm) != 0 {
 15670  		return libc.Uint64(libc.Uint64FromInt32(-1))
 15671  	}
 15672  	state = (*Z_stream)(unsafe.Pointer(strm)).Fstate
 15673  	return (uint64(int64(((*Inflate_state)(unsafe.Pointer(state)).Fnext - (state + 1368 /* &.codes */)) / 4)))
 15674  }
 15675  
 15676  var Xinflate_copyright = *(*[48]int8)(unsafe.Pointer(ts + 828 /* " inflate 1.2.11 ..." */)) /* inftrees.c:11:12 */
 15677  
 15678  //
 15679  //   If you use the zlib library in a product, an acknowledgment is welcome
 15680  //   in the documentation of your product. If for some reason you cannot
 15681  //   include such an acknowledgment, I would appreciate that you keep this
 15682  //   copyright string in the executable of your product.
 15683  //
 15684  
 15685  //
 15686  //    Build a set of tables to decode the provided canonical Huffman code.
 15687  //    The code lengths are lens[0..codes-1].  The result starts at *table,
 15688  //    whose indices are 0..2^bits-1.  work is a writable array of at least
 15689  //    lens shorts, which is used as a work area.  type is the type of code
 15690  //    to be generated, CODES, LENS, or DISTS.  On return, zero is success,
 15691  //    -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
 15692  //    on return points to the next available entry's address.  bits is the
 15693  //    requested root table index bits, and on return it is the actual root
 15694  //    table index bits.  It will differ if the request is greater than the
 15695  //    longest code or if it is less than the shortest code.
 15696  //
 15697  func Xinflate_table(tls *libc.TLS, type1 Codetype, lens uintptr, codes uint32, table uintptr, bits uintptr, work uintptr) int32 { /* inftrees.c:32:19: */
 15698  	bp := tls.Alloc(64)
 15699  	defer tls.Free(64)
 15700  
 15701  	var len uint32 // a code's length in bits
 15702  	var sym uint32 // index of code symbols
 15703  	var min uint32
 15704  	var max uint32    // minimum and maximum code lengths
 15705  	var root uint32   // number of index bits for root table
 15706  	var curr uint32   // number of index bits for current table
 15707  	var drop uint32   // code bits to drop for sub-table
 15708  	var left int32    // number of prefix codes available
 15709  	var used uint32   // code entries in table used
 15710  	var huff uint32   // Huffman code
 15711  	var incr uint32   // for incrementing code, index
 15712  	var fill uint32   // index for replicating entries
 15713  	var low uint32    // low bits for current root entry
 15714  	var mask uint32   // mask for low root bits
 15715  	var here Code     // table entry for duplication
 15716  	var next uintptr  // next available space in table
 15717  	var base uintptr  // base value table to use
 15718  	var extra uintptr // extra bits table to use
 15719  	var match uint32  // use base and extra for symbol >= match
 15720  	// var count [16]uint16 at bp, 32
 15721  	// number of codes of each length
 15722  	// var offs [16]uint16 at bp+32, 32
 15723  
 15724  	//
 15725  	//        Process a set of code lengths to create a canonical Huffman code.  The
 15726  	//        code lengths are lens[0..codes-1].  Each length corresponds to the
 15727  	//        symbols 0..codes-1.  The Huffman code is generated by first sorting the
 15728  	//        symbols by length from short to long, and retaining the symbol order
 15729  	//        for codes with equal lengths.  Then the code starts with all zero bits
 15730  	//        for the first code of the shortest length, and the codes are integer
 15731  	//        increments for the same length, and zeros are appended as the length
 15732  	//        increases.  For the deflate format, these bits are stored backwards
 15733  	//        from their more natural integer increment ordering, and so when the
 15734  	//        decoding tables are built in the large loop below, the integer codes
 15735  	//        are incremented backwards.
 15736  	//
 15737  	//        This routine assumes, but does not check, that all of the entries in
 15738  	//        lens[] are in the range 0..MAXBITS.  The caller must assure this.
 15739  	//        1..MAXBITS is interpreted as that code length.  zero means that that
 15740  	//        symbol does not occur in this code.
 15741  	//
 15742  	//        The codes are sorted by computing a count of codes for each length,
 15743  	//        creating from that a table of starting indices for each length in the
 15744  	//        sorted table, and then entering the symbols in order in the sorted
 15745  	//        table.  The sorted table is work[], with that space being provided by
 15746  	//        the caller.
 15747  	//
 15748  	//        The length counts are used for other purposes as well, i.e. finding
 15749  	//        the minimum and maximum length codes, determining if there are any
 15750  	//        codes at all, checking for a valid set of lengths, and looking ahead
 15751  	//        at length counts to determine sub-table sizes when building the
 15752  	//        decoding tables.
 15753  	//
 15754  
 15755  	// accumulate lengths for codes (assumes lens[] all in 0..MAXBITS)
 15756  	for len = uint32(0); len <= uint32(MAXBITS); len++ {
 15757  		*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2)) = uint16(0)
 15758  	}
 15759  	for sym = uint32(0); sym < codes; sym++ {
 15760  		*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2))++
 15761  	}
 15762  
 15763  	// bound code lengths, force root to be within code lengths
 15764  	root = *(*uint32)(unsafe.Pointer(bits))
 15765  	for max = uint32(MAXBITS); max >= uint32(1); max-- {
 15766  		if int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(max)*2))) != 0 {
 15767  			break
 15768  		}
 15769  	}
 15770  	if root > max {
 15771  		root = max
 15772  	}
 15773  	if max == uint32(0) { // no symbols to code at all
 15774  		here.Fop = uint8(64) // invalid code marker
 15775  		here.Fbits = uint8(1)
 15776  		here.Fval = uint16(0)
 15777  		*(*Code)(unsafe.Pointer(libc.PostIncUintptr(&(*(*uintptr)(unsafe.Pointer(table))), 4))) = here // make a table to force an error
 15778  		*(*Code)(unsafe.Pointer(libc.PostIncUintptr(&(*(*uintptr)(unsafe.Pointer(table))), 4))) = here
 15779  		*(*uint32)(unsafe.Pointer(bits)) = uint32(1)
 15780  		return 0 // no symbols, but wait for decoding to report error
 15781  	}
 15782  	for min = uint32(1); min < max; min++ {
 15783  		if int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(min)*2))) != 0 {
 15784  			break
 15785  		}
 15786  	}
 15787  	if root < min {
 15788  		root = min
 15789  	}
 15790  
 15791  	// check for an over-subscribed or incomplete set of lengths
 15792  	left = 1
 15793  	for len = uint32(1); len <= uint32(MAXBITS); len++ {
 15794  		left <<= 1
 15795  		left = left - (int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2))))
 15796  		if left < 0 {
 15797  			return -1
 15798  		} // over-subscribed
 15799  	}
 15800  	if (left > 0) && ((type1 == CODES) || (max != uint32(1))) {
 15801  		return -1
 15802  	} // incomplete set
 15803  
 15804  	// generate offsets into symbol table for each length for sorting
 15805  	*(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + 1*2)) = uint16(0)
 15806  	for len = uint32(1); len < uint32(MAXBITS); len++ {
 15807  		*(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + uintptr((len+uint32(1)))*2)) = (uint16(int32(*(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + uintptr(len)*2))) + int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2)))))
 15808  	}
 15809  
 15810  	// sort symbols by length, by symbol order within each length
 15811  	for sym = uint32(0); sym < codes; sym++ {
 15812  		if int32(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 {
 15813  			*(*uint16)(unsafe.Pointer(work + uintptr(libc.PostIncUint16(&*(*uint16)(unsafe.Pointer(bp + 32 /* &offs[0] */ + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2)), 1))*2)) = uint16(sym)
 15814  		}
 15815  	}
 15816  
 15817  	//
 15818  	//        Create and fill in decoding tables.  In this loop, the table being
 15819  	//        filled is at next and has curr index bits.  The code being used is huff
 15820  	//        with length len.  That code is converted to an index by dropping drop
 15821  	//        bits off of the bottom.  For codes where len is less than drop + curr,
 15822  	//        those top drop + curr - len bits are incremented through all values to
 15823  	//        fill the table with replicated entries.
 15824  	//
 15825  	//        root is the number of index bits for the root table.  When len exceeds
 15826  	//        root, sub-tables are created pointed to by the root entry with an index
 15827  	//        of the low root bits of huff.  This is saved in low to check for when a
 15828  	//        new sub-table should be started.  drop is zero when the root table is
 15829  	//        being filled, and drop is root when sub-tables are being filled.
 15830  	//
 15831  	//        When a new sub-table is needed, it is necessary to look ahead in the
 15832  	//        code lengths to determine what size sub-table is needed.  The length
 15833  	//        counts are used for this, and so count[] is decremented as codes are
 15834  	//        entered in the tables.
 15835  	//
 15836  	//        used keeps track of how many table entries have been allocated from the
 15837  	//        provided *table space.  It is checked for LENS and DIST tables against
 15838  	//        the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
 15839  	//        the initial root table size constants.  See the comments in inftrees.h
 15840  	//        for more information.
 15841  	//
 15842  	//        sym increments through all symbols, and the loop terminates when
 15843  	//        all codes of length max, i.e. all codes, have been processed.  This
 15844  	//        routine permits incomplete codes, so another loop after this one fills
 15845  	//        in the rest of the decoding tables with invalid code markers.
 15846  	//
 15847  
 15848  	// set up for code type
 15849  	switch type1 {
 15850  	case CODES:
 15851  		base = libc.AssignUintptr(&extra, work) // dummy value--not used
 15852  		match = uint32(20)
 15853  		break
 15854  	case LENS:
 15855  		base = uintptr(unsafe.Pointer(&lbase))
 15856  		extra = uintptr(unsafe.Pointer(&lext))
 15857  		match = uint32(257)
 15858  		break
 15859  	default: // DISTS
 15860  		base = uintptr(unsafe.Pointer(&dbase))
 15861  		extra = uintptr(unsafe.Pointer(&dext))
 15862  		match = uint32(0)
 15863  	}
 15864  
 15865  	// initialize state for loop
 15866  	huff = uint32(0)                            // starting code
 15867  	sym = uint32(0)                             // starting code symbol
 15868  	len = min                                   // starting code length
 15869  	next = *(*uintptr)(unsafe.Pointer(table))   // current table to fill in
 15870  	curr = root                                 // current table index bits
 15871  	drop = uint32(0)                            // current bits to drop from code for index
 15872  	low = libc.Uint32(libc.Uint32FromInt32(-1)) // trigger new sub-table when len > root
 15873  	used = (uint32(1) << root)                  // use root table entries
 15874  	mask = (used - uint32(1))                   // mask for comparing low
 15875  
 15876  	// check available table space
 15877  	if ((type1 == LENS) && (used > uint32(ENOUGH_LENS))) || ((type1 == DISTS) && (used > uint32(ENOUGH_DISTS))) {
 15878  		return 1
 15879  	}
 15880  
 15881  	// process all codes and make table entries
 15882  	for {
 15883  		// create table entry
 15884  		here.Fbits = (uint8(len - drop))
 15885  		if (uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) + 1) < match {
 15886  			here.Fop = uint8(0)
 15887  			here.Fval = *(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))
 15888  		} else if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) >= match {
 15889  			here.Fop = uint8(*(*uint16)(unsafe.Pointer(extra + uintptr((uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match))*2)))
 15890  			here.Fval = *(*uint16)(unsafe.Pointer(base + uintptr((uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match))*2))
 15891  		} else {
 15892  			here.Fop = (uint8(32 + 64)) // end of block
 15893  			here.Fval = uint16(0)
 15894  		}
 15895  
 15896  		// replicate for those indices with low len bits equal to huff
 15897  		incr = (uint32(1) << (len - drop))
 15898  		fill = (uint32(1) << curr)
 15899  		min = fill // save offset to next table
 15900  		for ok := true; ok; ok = (fill != uint32(0)) {
 15901  			fill = fill - (incr)
 15902  			*(*Code)(unsafe.Pointer(next + uintptr(((huff>>drop)+fill))*4)) = here
 15903  		}
 15904  
 15905  		// backwards increment the len-bit code huff
 15906  		incr = (uint32(1) << (len - uint32(1)))
 15907  		for (huff & incr) != 0 {
 15908  			incr >>= 1
 15909  		}
 15910  		if incr != uint32(0) {
 15911  			huff = huff & (incr - uint32(1))
 15912  			huff = huff + (incr)
 15913  		} else {
 15914  			huff = uint32(0)
 15915  		}
 15916  
 15917  		// go to next symbol, update count, len
 15918  		sym++
 15919  		if int32(libc.PreDecUint16(&(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr(len)*2))), 1)) == 0 {
 15920  			if len == max {
 15921  				break
 15922  			}
 15923  			len = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2)))
 15924  		}
 15925  
 15926  		// create new sub-table if needed
 15927  		if (len > root) && ((huff & mask) != low) {
 15928  			// if first time, transition to sub-tables
 15929  			if drop == uint32(0) {
 15930  				drop = root
 15931  			}
 15932  
 15933  			// increment past last table
 15934  			next += 4 * (uintptr(min)) // here min is 1 << curr
 15935  
 15936  			// determine length of next table
 15937  			curr = (len - drop)
 15938  			left = (int32(1) << curr)
 15939  			for (curr + drop) < max {
 15940  				left = left - (int32(*(*uint16)(unsafe.Pointer(bp /* &count[0] */ + uintptr((curr+drop))*2))))
 15941  				if left <= 0 {
 15942  					break
 15943  				}
 15944  				curr++
 15945  				left <<= 1
 15946  			}
 15947  
 15948  			// check for enough space
 15949  			used = used + (uint32(1) << curr)
 15950  			if ((type1 == LENS) && (used > uint32(ENOUGH_LENS))) || ((type1 == DISTS) && (used > uint32(ENOUGH_DISTS))) {
 15951  				return 1
 15952  			}
 15953  
 15954  			// point entry in root table to sub-table
 15955  			low = (huff & mask)
 15956  			(*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fop = uint8(curr)
 15957  			(*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fbits = uint8(root)
 15958  			(*Code)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(table))) + uintptr(low)*4)).Fval = (uint16((int64(next) - int64(*(*uintptr)(unsafe.Pointer(table)))) / 4))
 15959  		}
 15960  	}
 15961  
 15962  	// fill in remaining table entry if code is incomplete (guaranteed to have
 15963  	//        at most one remaining entry, since if the code is incomplete, the
 15964  	//        maximum code length that was allowed to get this far is one bit)
 15965  	if huff != uint32(0) {
 15966  		here.Fop = uint8(64) // invalid code marker
 15967  		here.Fbits = (uint8(len - drop))
 15968  		here.Fval = uint16(0)
 15969  		*(*Code)(unsafe.Pointer(next + uintptr(huff)*4)) = here
 15970  	}
 15971  
 15972  	// set return parameters
 15973  	*(*uintptr)(unsafe.Pointer(table)) += (uintptr(used)) * 4
 15974  	*(*uint32)(unsafe.Pointer(bits)) = root
 15975  	return 0
 15976  }
 15977  
 15978  var lbase = [31]uint16{ // Length codes 257..285 base
 15979  	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),
 15980  			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 */
 15981  var lext = [31]uint16{ // Length codes 257..285 extra
 15982  	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),
 15983  			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 */
 15984  var dbase = [32]uint16{ // Distance codes 0..29 base
 15985  	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),
 15986  	uint16(257), uint16(385), uint16(513), uint16(769), uint16(1025), uint16(1537), uint16(2049), uint16(3073), uint16(4097), uint16(6145),
 15987  			uint16(8193), uint16(12289), uint16(16385), uint16(24577), uint16(0), uint16(0)} /* inftrees.c:66:33 */
 15988  var dext = [32]uint16{ // Distance codes 0..29 extra
 15989  	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),
 15990  	uint16(23), uint16(23), uint16(24), uint16(24), uint16(25), uint16(25), uint16(26), uint16(26), uint16(27), uint16(27),
 15991  	uint16(28), uint16(28), uint16(29), uint16(29), uint16(64), uint16(64)} /* inftrees.c:70:33 */
 15992  
 15993  type Static_tree_desc = Static_tree_desc_s /* deflate.h:84:36 */
 15994  
 15995  // ===========================================================================
 15996  // Constants
 15997  
 15998  // Bit length codes must not exceed MAX_BL_BITS bits
 15999  
 16000  // end of block literal code
 16001  
 16002  // repeat previous bit length 3-6 times (2 bits of repeat count)
 16003  
 16004  // repeat a zero length 3-10 times  (3 bits of repeat count)
 16005  
 16006  // repeat a zero length 11-138 times  (7 bits of repeat count)
 16007  
 16008  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 */
 16009  
 16010  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 */
 16011  
 16012  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 */
 16013  
 16014  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 */
 16015  // The lengths of the bit length codes are sent in order of decreasing
 16016  // probability, to avoid transmitting the lengths for unused bit length codes.
 16017  
 16018  // ===========================================================================
 16019  // Local data. These are initialized only once.
 16020  
 16021  // header created automatically with -DGEN_TREES_H
 16022  
 16023  var static_ltree = [288]Ct_data{{
 16024  	Ffc: struct{ Ffreq Ush }{Ffreq: Ush(12)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(140)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(76)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(204)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(44)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16025  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(172)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(108)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(236)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(28)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(156)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16026  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(92)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(220)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(60)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(188)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(124)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16027  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(252)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(2)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(130)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(66)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(194)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16028  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(34)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(162)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(98)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(226)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(18)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16029  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(146)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(82)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(210)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(50)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(178)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16030  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(114)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(242)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(10)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(138)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(74)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16031  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(202)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(42)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(170)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(106)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(234)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16032  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(26)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(154)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(90)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(218)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(58)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16033  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(186)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(122)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(250)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(6)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(134)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16034  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(70)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(198)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(38)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(166)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(102)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16035  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(230)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(22)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(150)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(86)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(214)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16036  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(54)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(182)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(118)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(246)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(14)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16037  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(142)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(78)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(206)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(46)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(174)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16038  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(110)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(238)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(30)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(158)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(94)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16039  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(222)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(62)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(190)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(126)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(254)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16040  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(1)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(129)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(65)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(193)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(33)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16041  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(161)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(97)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(225)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(17)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(145)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16042  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(81)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(209)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(49)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(177)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(113)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16043  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(241)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(9)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(137)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(73)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(201)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16044  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(41)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(169)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(105)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(233)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(25)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16045  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(153)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(89)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(217)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(57)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(185)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16046  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(121)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(249)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(5)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(133)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(69)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16047  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(197)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(37)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(165)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(101)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(229)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16048  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(21)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(149)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(85)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(213)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(53)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16049  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(181)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(117)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(245)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(13)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(141)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16050  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(77)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(205)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(45)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(173)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(109)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16051  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(237)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(29)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(157)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(93)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(221)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16052  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(61)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(189)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(125)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(253)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(19)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16053  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(275)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(147)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(403)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(83)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(339)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16054  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(211)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(467)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(51)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(307)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(179)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16055  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(435)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(115)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(371)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(243)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(499)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16056  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(11)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(267)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(139)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(395)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(75)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16057  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(331)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(203)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(459)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(43)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(299)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16058  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(171)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(427)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(107)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(363)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(235)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16059  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(491)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(27)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(283)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(155)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(411)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16060  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(91)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(347)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(219)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(475)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(59)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16061  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(315)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(187)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(443)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(123)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(379)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16062  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(251)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(507)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(7)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(263)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(135)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16063  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(391)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(71)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(327)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(199)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(455)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16064  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(39)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(295)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(167)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(423)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(103)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16065  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(359)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(231)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(487)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(23)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(279)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16066  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(151)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(407)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(87)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(343)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(215)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16067  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(471)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(55)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(311)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(183)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(439)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16068  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(119)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(375)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(247)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(503)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(15)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16069  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(271)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(143)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(399)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(79)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(335)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16070  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(207)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(463)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(47)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(303)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(175)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16071  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(431)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(111)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(367)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(239)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(495)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16072  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(31)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(287)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(159)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(415)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(95)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16073  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(351)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(223)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(479)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(63)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(319)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16074  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(191)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(447)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(127)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(383)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(255)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}},
 16075  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(511)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(9)}}, {Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(64)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(32)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(96)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}},
 16076  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(16)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(80)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(48)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(112)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(8)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}},
 16077  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(72)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(40)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(104)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(24)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(88)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}},
 16078  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(56)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(120)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(4)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(68)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(36)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}},
 16079  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(100)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(20)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(84)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(52)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(116)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(7)}},
 16080  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(3)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(131)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(67)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(195)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(35)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}},
 16081  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(163)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(99)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(227)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(8)}}} /* trees.h:3:21 */
 16082  
 16083  var static_dtree = [30]Ct_data{{Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(16)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(8)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(24)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(4)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}},
 16084  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(20)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(12)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(28)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(2)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(18)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}},
 16085  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(10)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(26)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(6)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(22)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(14)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}},
 16086  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(30)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(1)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(17)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(9)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(25)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}},
 16087  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(5)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(21)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(13)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(29)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(3)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}},
 16088  	{Ffc: struct{ Ffreq Ush }{Ffreq: Ush(19)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(11)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(27)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(7)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}, {Ffc: struct{ Ffreq Ush }{Ffreq: Ush(23)}, Fdl: struct{ Fdad Ush }{Fdad: Ush(5)}}} /* trees.h:64:21 */
 16089  
 16090  var X_dist_code = [512]Uch{
 16091  	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),
 16092  	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),
 16093  	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),
 16094  	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),
 16095  	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),
 16096  	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),
 16097  	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),
 16098  	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),
 16099  	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),
 16100  	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),
 16101  	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),
 16102  	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),
 16103  	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),
 16104  	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),
 16105  	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),
 16106  	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),
 16107  	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),
 16108  	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),
 16109  	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),
 16110  	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),
 16111  	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),
 16112  	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),
 16113  	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),
 16114  	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),
 16115  	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),
 16116  	Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29), Uch(29),
 16117  } /* trees.h:73:25 */
 16118  
 16119  var X_length_code = [256]Uch{
 16120  	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),
 16121  	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),
 16122  	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),
 16123  	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),
 16124  	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),
 16125  	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),
 16126  	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),
 16127  	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),
 16128  	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),
 16129  	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),
 16130  	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),
 16131  	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),
 16132  	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),
 16133  } /* trees.h:102:25 */
 16134  
 16135  var base_length = [29]int32{
 16136  	0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
 16137  	64, 80, 96, 112, 128, 160, 192, 224, 0,
 16138  } /* trees.h:118:17 */
 16139  
 16140  var base_dist = [30]int32{
 16141  	0, 1, 2, 3, 4, 6, 8, 12, 16, 24,
 16142  	32, 48, 64, 96, 128, 192, 256, 384, 512, 768,
 16143  	1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576,
 16144  } /* trees.h:123:17 */
 16145  
 16146  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 */
 16147  
 16148  var static_d_desc = Static_tree_desc{Fstatic_tree: 0, Fextra_bits: 0, Felems: D_CODES, Fmax_length: MAX_BITS} /* trees.c:128:31 */
 16149  
 16150  var static_bl_desc = Static_tree_desc{Fextra_bits: 0, Felems: BL_CODES, Fmax_length: MAX_BL_BITS} /* trees.c:131:31 */
 16151  
 16152  // Send a code of the given tree. c and tree must not have side effects
 16153  
 16154  // ===========================================================================
 16155  // Output a short LSB first on the stream.
 16156  // IN assertion: there is enough room in pendingBuf.
 16157  
 16158  // ===========================================================================
 16159  // Send a value on a given number of bits.
 16160  // IN assertion: length <= 16 and value fits in length bits.
 16161  
 16162  // the arguments must not have side effects
 16163  
 16164  // ===========================================================================
 16165  // Initialize the various 'constant' tables.
 16166  func tr_static_init(tls *libc.TLS) { /* trees.c:232:12: */
 16167  }
 16168  
 16169  // ===========================================================================
 16170  // Genererate the file trees.h describing the static trees.
 16171  
 16172  // ===========================================================================
 16173  // Initialize the tree data structures for a new zlib stream.
 16174  func X_tr_init(tls *libc.TLS, s uintptr) { /* trees.c:379:20: */
 16175  	tr_static_init(tls)
 16176  
 16177  	(*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 212 /* &.dyn_ltree */
 16178  	(*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_l_desc))
 16179  
 16180  	(*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2504 /* &.dyn_dtree */
 16181  	(*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_d_desc))
 16182  
 16183  	(*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2748 /* &.bl_tree */
 16184  	(*Deflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&static_bl_desc))
 16185  
 16186  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
 16187  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
 16188  
 16189  	// Initialize the first block of the first file:
 16190  	init_block(tls, s)
 16191  }
 16192  
 16193  // ===========================================================================
 16194  // Initialize a new block.
 16195  func init_block(tls *libc.TLS, s uintptr) { /* trees.c:407:12: */
 16196  	var n int32 // iterates over tree elements
 16197  
 16198  	// Initialize the trees.
 16199  	for n = 0; n < ((LITERALS + 1) + LENGTH_CODES); n++ {
 16200  		*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */)) = Ush(0)
 16201  	}
 16202  	for n = 0; n < D_CODES; n++ {
 16203  		*(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr(n)*4 /* &.fc */)) = Ush(0)
 16204  	}
 16205  	for n = 0; n < BL_CODES; n++ {
 16206  		*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(n)*4 /* &.fc */)) = Ush(0)
 16207  	}
 16208  
 16209  	*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 256*4 /* &.fc */)) = Ush(1)
 16210  	(*Deflate_state)(unsafe.Pointer(s)).Fopt_len = libc.AssignPtrUint64(s+5920 /* &.static_len */, uint64(0))
 16211  	(*Deflate_state)(unsafe.Pointer(s)).Flast_lit = libc.AssignPtrUint32(s+5928 /* &.matches */, UInt(0))
 16212  }
 16213  
 16214  // Index within the heap array of least frequent node in the Huffman tree
 16215  
 16216  // ===========================================================================
 16217  // Remove the smallest element from the heap and recreate the heap with
 16218  // one less element. Updates heap and heap_len.
 16219  
 16220  // ===========================================================================
 16221  // Compares to subtrees, using the tree depth as tie breaker when
 16222  // the subtrees have equal frequency. This minimizes the worst case length.
 16223  
 16224  // ===========================================================================
 16225  // Restore the heap property by moving down the tree starting at node k,
 16226  // exchanging a node with the smallest of its two sons if necessary, stopping
 16227  // when the heap property is re-established (each father smaller than its
 16228  // two sons).
 16229  func pqdownheap(tls *libc.TLS, s uintptr, tree uintptr, k int32) { /* trees.c:451:12: */
 16230  	var v int32 = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4))
 16231  	var j int32 = (k << 1) // left son of k
 16232  	for j <= (*Deflate_state)(unsafe.Pointer(s)).Fheap_len {
 16233  		// Set j to the smallest of the two sons:
 16234  		if (j < (*Deflate_state)(unsafe.Pointer(s)).Fheap_len) && ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((j+1))*4)))*4 /* &.fc */))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) || ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((j+1))*4)))*4 /* &.fc */))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) && (int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((j+1))*4)))))) <= int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4))))))))) {
 16235  			j++
 16236  		}
 16237  		// Exit if v is smaller than both sons
 16238  		if (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4 /* &.fc */))) < int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) || ((int32(*(*Ush)(unsafe.Pointer(tree + uintptr(v)*4 /* &.fc */))) == int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))*4 /* &.fc */)))) && (int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(v)))) <= int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4)))))))) {
 16239  			break
 16240  		}
 16241  
 16242  		// Exchange v with the smallest son
 16243  		*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(j)*4))
 16244  		k = j
 16245  
 16246  		// And continue down the tree, setting j to the left son of k
 16247  		j <<= 1
 16248  	}
 16249  	*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(k)*4)) = v
 16250  }
 16251  
 16252  // ===========================================================================
 16253  // Compute the optimal bit lengths for a tree and update the total bit length
 16254  // for the current block.
 16255  // IN assertion: the fields freq and dad are set, heap[heap_max] and
 16256  //    above are the tree nodes sorted by increasing frequency.
 16257  // OUT assertions: the field len is set to the optimal bit length, the
 16258  //     array bl_count contains the frequencies for each bit length.
 16259  //     The length opt_len is updated; static_len is also updated if stree is
 16260  //     not null.
 16261  func gen_bitlen(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:486:12: */
 16262  	var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree
 16263  	var max_code int32 = (*Tree_desc)(unsafe.Pointer(desc)).Fmax_code
 16264  	var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree
 16265  	var extra uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits
 16266  	var base int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base
 16267  	var max_length int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length
 16268  	var h int32 // heap index
 16269  	var n int32
 16270  	var m int32            // iterate over the tree elements
 16271  	var bits int32         // bit length
 16272  	var xbits int32        // extra bits
 16273  	var f Ush              // frequency
 16274  	var overflow int32 = 0 // number of elements with bit length too large
 16275  
 16276  	for bits = 0; bits <= MAX_BITS; bits++ {
 16277  		*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2)) = Ush(0)
 16278  	}
 16279  
 16280  	// In a first pass, compute the optimal bit lengths (which may
 16281  	// overflow in the case of the bit length tree).
 16282  	*(*Ush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fheap_max)*4)))*4 + 2 /* &.dl */)) = Ush(0) // root of the heap
 16283  
 16284  	for h = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_max + 1); h < ((2 * ((LITERALS + 1) + LENGTH_CODES)) + 1); h++ {
 16285  		n = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(h)*4))
 16286  		bits = (int32(*(*Ush)(unsafe.Pointer(tree + uintptr(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)))*4 + 2 /* &.dl */))) + 1)
 16287  		if bits > max_length {
 16288  			bits = max_length
 16289  			overflow++
 16290  		}
 16291  		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = Ush(bits)
 16292  		// We overwrite tree[n].Dad which is no longer needed
 16293  
 16294  		if n > max_code {
 16295  			continue
 16296  		} // not a leaf node
 16297  
 16298  		*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))++
 16299  		xbits = 0
 16300  		if n >= base {
 16301  			xbits = *(*Intf)(unsafe.Pointer(extra + uintptr((n-base))*4))
 16302  		}
 16303  		f = *(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */))
 16304  		*(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += (Ulg(f) * Ulg((uint32(bits + xbits))))
 16305  		if stree != 0 {
 16306  			*(*Ulg)(unsafe.Pointer(s + 5920 /* &.static_len */)) += (Ulg(f) * Ulg((uint32(int32(*(*Ush)(unsafe.Pointer(stree + uintptr(n)*4 + 2 /* &.dl */))) + xbits))))
 16307  		}
 16308  	}
 16309  	if overflow == 0 {
 16310  		return
 16311  	}
 16312  
 16313  	// This happens for example on obj2 and pic of the Calgary corpus
 16314  
 16315  	// Find the first bit length which could increase:
 16316  	for ok := true; ok; ok = (overflow > 0) {
 16317  		bits = (max_length - 1)
 16318  		for int32(*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))) == 0 {
 16319  			bits--
 16320  		}
 16321  		*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2))--               // move one leaf down the tree
 16322  		*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr((bits+1))*2)) += Ush((2)) // move one overflow item as its brother
 16323  		*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(max_length)*2))--
 16324  		// The brother of the overflow item also moves one step up,
 16325  		// but this does not affect bl_count[max_length]
 16326  		overflow = overflow - (2)
 16327  	}
 16328  
 16329  	// Now recompute all bit lengths, scanning in increasing frequency.
 16330  	// h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
 16331  	// lengths instead of fixing only the wrong ones. This idea is taken
 16332  	// from 'ar' written by Haruhiko Okumura.)
 16333  	for bits = max_length; bits != 0; bits-- {
 16334  		n = int32(*(*Ush)(unsafe.Pointer((s + 2976 /* &.bl_count */) + uintptr(bits)*2)))
 16335  		for n != 0 {
 16336  			m = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&h, 1))*4))
 16337  			if m > max_code {
 16338  				continue
 16339  			}
 16340  			if uint32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */))) != uint32(bits) {
 16341  
 16342  				*(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += ((Ulg(bits) - Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */)))) * Ulg(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 /* &.fc */))))
 16343  				*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 + 2 /* &.dl */)) = Ush(bits)
 16344  			}
 16345  			n--
 16346  		}
 16347  	}
 16348  }
 16349  
 16350  // ===========================================================================
 16351  // Generate the codes for a given tree and bit counts (which need not be
 16352  // optimal).
 16353  // IN assertion: the array bl_count contains the bit length statistics for
 16354  // the given tree and the field len is set for all tree elements.
 16355  // OUT assertion: the field code is set for all tree elements of non
 16356  //     zero code length.
 16357  func gen_codes(tls *libc.TLS, tree uintptr, max_code int32, bl_count uintptr) { /* trees.c:572:12: */
 16358  	bp := tls.Alloc(32)
 16359  	defer tls.Free(32)
 16360  
 16361  	// var next_code [16]Ush at bp, 32
 16362  	// next code value for each bit length
 16363  	var code uint32 = uint32(0) // running code value
 16364  	var bits int32              // bit index
 16365  	var n int32                 // code index
 16366  
 16367  	// The distribution counts are first used to generate the code values
 16368  	// without bit reversal.
 16369  	for bits = 1; bits <= MAX_BITS; bits++ {
 16370  		code = ((code + uint32(*(*Ushf)(unsafe.Pointer(bl_count + uintptr((bits-1))*2)))) << 1)
 16371  		*(*Ush)(unsafe.Pointer(bp /* &next_code[0] */ + uintptr(bits)*2)) = Ush(code)
 16372  	}
 16373  	// Check that the bit counts in bl_count are consistent. The last code
 16374  	// must be all ones.
 16375  
 16376  	for n = 0; n <= max_code; n++ {
 16377  		var len int32 = int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)))
 16378  		if len == 0 {
 16379  			continue
 16380  		}
 16381  		// Now reverse the bits
 16382  		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */)) = Ush(bi_reverse(tls, uint32(libc.PostIncUint16(&*(*Ush)(unsafe.Pointer(bp /* &next_code[0] */ + uintptr(len)*2)), 1)), len))
 16383  
 16384  	}
 16385  }
 16386  
 16387  // ===========================================================================
 16388  // Construct one Huffman tree and assigns the code bit strings and lengths.
 16389  // Update the total bit length for the current block.
 16390  // IN assertion: the field freq is set for all tree elements.
 16391  // OUT assertions: the fields len and code are set to the optimal bit length
 16392  //     and corresponding code. The length opt_len is updated; static_len is
 16393  //     also updated if stree is not null. The field max_code is set.
 16394  func build_tree(tls *libc.TLS, s uintptr, desc uintptr) { /* trees.c:615:12: */
 16395  	var tree uintptr = (*Tree_desc)(unsafe.Pointer(desc)).Fdyn_tree
 16396  	var stree uintptr = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree
 16397  	var elems int32 = (*Static_tree_desc)(unsafe.Pointer((*Tree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems
 16398  	var n int32
 16399  	var m int32             // iterate over heap elements
 16400  	var max_code int32 = -1 // largest code with non zero frequency
 16401  	var node int32          // new node being created
 16402  
 16403  	// Construct the initial heap, with least frequent element in
 16404  	// heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
 16405  	// heap[0] is not used.
 16406  	(*Deflate_state)(unsafe.Pointer(s)).Fheap_len = 0
 16407  	(*Deflate_state)(unsafe.Pointer(s)).Fheap_max = ((2 * ((LITERALS + 1) + LENGTH_CODES)) + 1)
 16408  
 16409  	for n = 0; n < elems; n++ {
 16410  		if int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */))) != 0 {
 16411  			*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreIncInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_len), 1))*4)) = libc.AssignInt32(&max_code, n)
 16412  			*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n))) = Uch(0)
 16413  		} else {
 16414  			*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = Ush(0)
 16415  		}
 16416  	}
 16417  
 16418  	// The pkzip format requires that at least one distance code exists,
 16419  	// and that at least one bit should be sent even if there is only one
 16420  	// possible code. So to avoid special checks later on we force at least
 16421  	// two codes of non zero frequency.
 16422  	for (*Deflate_state)(unsafe.Pointer(s)).Fheap_len < 2 {
 16423  		node = libc.AssignPtrInt32((s+3008 /* &.heap */)+uintptr(libc.PreIncInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_len), 1))*4, func() int32 {
 16424  			if max_code < 2 {
 16425  				return libc.PreIncInt32(&max_code, 1)
 16426  			}
 16427  			return 0
 16428  		}())
 16429  		*(*Ush)(unsafe.Pointer(tree + uintptr(node)*4 /* &.fc */)) = Ush(1)
 16430  		*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(node))) = Uch(0)
 16431  		(*Deflate_state)(unsafe.Pointer(s)).Fopt_len--
 16432  		if stree != 0 {
 16433  			*(*Ulg)(unsafe.Pointer(s + 5920 /* &.static_len */)) -= (Ulg(*(*Ush)(unsafe.Pointer(stree + uintptr(node)*4 + 2 /* &.dl */))))
 16434  		}
 16435  		// node is 0 or 1 so it does not have extra bits
 16436  	}
 16437  	(*Tree_desc)(unsafe.Pointer(desc)).Fmax_code = max_code
 16438  
 16439  	// The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
 16440  	// establish sub-heaps of increasing lengths:
 16441  	for n = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_len / 2); n >= 1; n-- {
 16442  		pqdownheap(tls, s, tree, n)
 16443  	}
 16444  
 16445  	// Construct the Huffman tree by repeatedly combining the least two
 16446  	// frequent nodes.
 16447  	node = elems // next internal node of the tree
 16448  	for ok := true; ok; ok = ((*Deflate_state)(unsafe.Pointer(s)).Fheap_len >= 2) {
 16449  		{
 16450  			n = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4))
 16451  			*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PostDecInt32(&(*Deflate_state)(unsafe.Pointer(s)).Fheap_len, 1))*4))
 16452  			pqdownheap(tls, s, tree, SMALLEST)
 16453  		}
 16454  		// n = node of least frequency
 16455  		m = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) // m = node of next least frequency
 16456  
 16457  		*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = n // keep the nodes sorted by frequency
 16458  		*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = m
 16459  
 16460  		// Create a new node father of n and m
 16461  		*(*Ush)(unsafe.Pointer(tree + uintptr(node)*4 /* &.fc */)) = (Ush(int32(*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 /* &.fc */))) + int32(*(*Ush)(unsafe.Pointer(tree + uintptr(m)*4 /* &.fc */)))))
 16462  		*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(node))) = (Uch((func() int32 {
 16463  			if int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n)))) >= int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(m)))) {
 16464  				return int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(n))))
 16465  			}
 16466  			return int32(*(*Uch)(unsafe.Pointer((s + 5308 /* &.depth */) + uintptr(m))))
 16467  		}()) + 1))
 16468  		*(*Ush)(unsafe.Pointer(tree + uintptr(n)*4 + 2 /* &.dl */)) = libc.AssignPtrUint16(tree+uintptr(m)*4+2 /* &.dl */ /* &.dad */, Ush(node))
 16469  		// and insert the new node in the heap
 16470  		*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4)) = libc.PostIncInt32(&node, 1)
 16471  		pqdownheap(tls, s, tree, SMALLEST)
 16472  
 16473  	}
 16474  
 16475  	*(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + uintptr(libc.PreDecInt32(&((*Deflate_state)(unsafe.Pointer(s)).Fheap_max), 1))*4)) = *(*int32)(unsafe.Pointer((s + 3008 /* &.heap */) + 1*4))
 16476  
 16477  	// At this point, the fields freq and dad are set. We can now
 16478  	// generate the bit lengths.
 16479  	gen_bitlen(tls, s, desc)
 16480  
 16481  	// The field len is now set, we can generate the bit codes
 16482  	gen_codes(tls, tree, max_code, s+2976 /* &.bl_count */)
 16483  }
 16484  
 16485  // ===========================================================================
 16486  // Scan a literal or distance tree to determine the frequencies of the codes
 16487  // in the bit length tree.
 16488  func scan_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:703:12: */
 16489  	var n int32                                                             // iterates over all tree elements
 16490  	var prevlen int32 = -1                                                  // last emitted length
 16491  	var curlen int32                                                        // length of current code
 16492  	var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2 /* &.dl */))) // length of next code
 16493  	var count int32 = 0                                                     // repeat count of the current code
 16494  	var max_count int32 = 7                                                 // max repeat count
 16495  	var min_count int32 = 4                                                 // min repeat count
 16496  
 16497  	if nextlen == 0 {
 16498  		max_count = 138
 16499  		min_count = 3
 16500  	}
 16501  	*(*Ush)(unsafe.Pointer(tree + uintptr((max_code+1))*4 + 2 /* &.dl */)) = Ush(0xffff) // guard
 16502  
 16503  	for n = 0; n <= max_code; n++ {
 16504  		curlen = nextlen
 16505  		nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr((n+1))*4 + 2 /* &.dl */)))
 16506  		if (libc.PreIncInt32(&count, 1) < max_count) && (curlen == nextlen) {
 16507  			continue
 16508  		} else if count < min_count {
 16509  			*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */ /* &.freq */)) += Ush((count))
 16510  		} else if curlen != 0 {
 16511  			if curlen != prevlen {
 16512  				*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */))++
 16513  			}
 16514  			*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */))++
 16515  		} else if count <= 10 {
 16516  			*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */))++
 16517  		} else {
 16518  			*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */))++
 16519  		}
 16520  		count = 0
 16521  		prevlen = curlen
 16522  		if nextlen == 0 {
 16523  			max_count = 138
 16524  			min_count = 3
 16525  		} else if curlen == nextlen {
 16526  			max_count = 6
 16527  			min_count = 3
 16528  		} else {
 16529  			max_count = 7
 16530  			min_count = 4
 16531  		}
 16532  	}
 16533  }
 16534  
 16535  // ===========================================================================
 16536  // Send a literal or distance tree in compressed form, using the codes in
 16537  // bl_tree.
 16538  func send_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { /* trees.c:748:12: */
 16539  	var n int32                                                             // iterates over all tree elements
 16540  	var prevlen int32 = -1                                                  // last emitted length
 16541  	var curlen int32                                                        // length of current code
 16542  	var nextlen int32 = int32(*(*Ush)(unsafe.Pointer(tree + 2 /* &.dl */))) // length of next code
 16543  	var count int32 = 0                                                     // repeat count of the current code
 16544  	var max_count int32 = 7                                                 // max repeat count
 16545  	var min_count int32 = 4                                                 // min repeat count
 16546  
 16547  	/* tree[max_code+1].Len = -1; */ // guard already set
 16548  	if nextlen == 0 {
 16549  		max_count = 138
 16550  		min_count = 3
 16551  	}
 16552  
 16553  	for n = 0; n <= max_code; n++ {
 16554  		curlen = nextlen
 16555  		nextlen = int32(*(*Ush)(unsafe.Pointer(tree + uintptr((n+1))*4 + 2 /* &.dl */)))
 16556  		if (libc.PreIncInt32(&count, 1) < max_count) && (curlen == nextlen) {
 16557  			continue
 16558  		} else if count < min_count {
 16559  			for ok := true; ok; ok = (libc.PreDecInt32(&count, 1) != 0) {
 16560  				{
 16561  					var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 + 2 /* &.dl */)))
 16562  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16563  						var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */)))
 16564  						*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16565  						{
 16566  							{
 16567  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16568  							}
 16569  							{
 16570  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16571  							}
 16572  
 16573  						}
 16574  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16575  						*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16576  					} else {
 16577  						*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16578  						*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16579  					}
 16580  				}
 16581  			}
 16582  
 16583  		} else if curlen != 0 {
 16584  			if curlen != prevlen {
 16585  				{
 16586  					var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 + 2 /* &.dl */)))
 16587  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16588  						var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */)))
 16589  						*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16590  						{
 16591  							{
 16592  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16593  							}
 16594  							{
 16595  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16596  							}
 16597  
 16598  						}
 16599  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16600  						*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16601  					} else {
 16602  						*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(curlen)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16603  						*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16604  					}
 16605  				}
 16606  				count--
 16607  			}
 16608  
 16609  			{
 16610  				var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 + 2 /* &.dl */)))
 16611  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16612  					var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */)))
 16613  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16614  					{
 16615  						{
 16616  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16617  						}
 16618  						{
 16619  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16620  						}
 16621  
 16622  					}
 16623  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16624  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16625  				} else {
 16626  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 16*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16627  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16628  				}
 16629  			}
 16630  			{
 16631  				var len int32 = 2
 16632  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16633  					var val int32 = (count - 3)
 16634  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16635  					{
 16636  						{
 16637  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16638  						}
 16639  						{
 16640  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16641  						}
 16642  
 16643  					}
 16644  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16645  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16646  				} else {
 16647  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 3))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16648  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16649  				}
 16650  			}
 16651  
 16652  		} else if count <= 10 {
 16653  			{
 16654  				var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 + 2 /* &.dl */)))
 16655  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16656  					var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */)))
 16657  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16658  					{
 16659  						{
 16660  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16661  						}
 16662  						{
 16663  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16664  						}
 16665  
 16666  					}
 16667  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16668  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16669  				} else {
 16670  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 17*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16671  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16672  				}
 16673  			}
 16674  			{
 16675  				var len int32 = 3
 16676  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16677  					var val int32 = (count - 3)
 16678  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16679  					{
 16680  						{
 16681  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16682  						}
 16683  						{
 16684  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16685  						}
 16686  
 16687  					}
 16688  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16689  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16690  				} else {
 16691  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 3))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16692  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16693  				}
 16694  			}
 16695  
 16696  		} else {
 16697  			{
 16698  				var len int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 + 2 /* &.dl */)))
 16699  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16700  					var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */)))
 16701  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16702  					{
 16703  						{
 16704  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16705  						}
 16706  						{
 16707  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16708  						}
 16709  
 16710  					}
 16711  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16712  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16713  				} else {
 16714  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + 18*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16715  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16716  				}
 16717  			}
 16718  			{
 16719  				var len int32 = 7
 16720  				if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16721  					var val int32 = (count - 11)
 16722  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16723  					{
 16724  						{
 16725  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16726  						}
 16727  						{
 16728  							*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16729  						}
 16730  
 16731  					}
 16732  					(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16733  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16734  				} else {
 16735  					*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(count - 11))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16736  					*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16737  				}
 16738  			}
 16739  
 16740  		}
 16741  		count = 0
 16742  		prevlen = curlen
 16743  		if nextlen == 0 {
 16744  			max_count = 138
 16745  			min_count = 3
 16746  		} else if curlen == nextlen {
 16747  			max_count = 6
 16748  			min_count = 3
 16749  		} else {
 16750  			max_count = 7
 16751  			min_count = 4
 16752  		}
 16753  	}
 16754  }
 16755  
 16756  // ===========================================================================
 16757  // Construct the Huffman tree for the bit lengths and return the index in
 16758  // bl_order of the last bit length code to send.
 16759  func build_bl_tree(tls *libc.TLS, s uintptr) int32 { /* trees.c:799:11: */
 16760  	var max_blindex int32 // index of last bit length code of non zero freq
 16761  
 16762  	// Determine the bit length frequencies for literal and distance trees
 16763  	scan_tree(tls, s, s+212 /* &.dyn_ltree */, (*Deflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code)
 16764  	scan_tree(tls, s, s+2504 /* &.dyn_dtree */, (*Deflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code)
 16765  
 16766  	// Build the bit length tree:
 16767  	build_tree(tls, s, (s + 2952 /* &.bl_desc */))
 16768  	// opt_len now includes the length of the tree representations, except
 16769  	// the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
 16770  
 16771  	// Determine the number of bit length codes to send. The pkzip format
 16772  	// requires that at least 4 bit length codes be sent. (appnote.txt says
 16773  	// 3 but the actual value used is 4.)
 16774  	for max_blindex = (BL_CODES - 1); max_blindex >= 3; max_blindex-- {
 16775  		if int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[max_blindex])*4 + 2 /* &.dl */))) != 0 {
 16776  			break
 16777  		}
 16778  	}
 16779  	// Update opt_len to include the bit length tree and counts
 16780  	*(*Ulg)(unsafe.Pointer(s + 5912 /* &.opt_len */)) += ((((uint64(3) * (Ulg(max_blindex) + uint64(1))) + uint64(5)) + uint64(5)) + uint64(4))
 16781  
 16782  	return max_blindex
 16783  }
 16784  
 16785  // ===========================================================================
 16786  // Send the header for a block using dynamic Huffman trees: the counts, the
 16787  // lengths of the bit length codes, the literal tree and the distance tree.
 16788  // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
 16789  func send_all_trees(tls *libc.TLS, s uintptr, lcodes int32, dcodes int32, blcodes int32) { /* trees.c:834:12: */
 16790  	var rank int32 // index in bl_order
 16791  
 16792  	{
 16793  		var len int32 = 5
 16794  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16795  			var val int32 = (lcodes - 257)
 16796  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16797  			{
 16798  				{
 16799  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16800  				}
 16801  				{
 16802  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16803  				}
 16804  
 16805  			}
 16806  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16807  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16808  		} else {
 16809  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(lcodes - 257))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16810  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16811  		}
 16812  	}
 16813  	/* not +255 as stated in appnote.txt */
 16814  	{
 16815  		var len int32 = 5
 16816  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16817  			var val int32 = (dcodes - 1)
 16818  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16819  			{
 16820  				{
 16821  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16822  				}
 16823  				{
 16824  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16825  				}
 16826  
 16827  			}
 16828  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16829  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16830  		} else {
 16831  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(dcodes - 1))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16832  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16833  		}
 16834  	}
 16835  
 16836  	{
 16837  		var len int32 = 4
 16838  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16839  			var val int32 = (blcodes - 4)
 16840  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16841  			{
 16842  				{
 16843  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16844  				}
 16845  				{
 16846  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16847  				}
 16848  
 16849  			}
 16850  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16851  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16852  		} else {
 16853  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(blcodes - 4))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16854  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16855  		}
 16856  	}
 16857  	// not -3 as stated in appnote.txt
 16858  	for rank = 0; rank < blcodes; rank++ {
 16859  
 16860  		{
 16861  			var len int32 = 3
 16862  			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16863  				var val int32 = int32(*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[rank])*4 + 2 /* &.dl */)))
 16864  				*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16865  				{
 16866  					{
 16867  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16868  					}
 16869  					{
 16870  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16871  					}
 16872  
 16873  				}
 16874  				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16875  				*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16876  			} else {
 16877  				*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer((s + 2748 /* &.bl_tree */) + uintptr(bl_order[rank])*4 + 2 /* &.dl */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16878  				*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16879  			}
 16880  		}
 16881  
 16882  	}
 16883  
 16884  	send_tree(tls, s, s+212 /* &.dyn_ltree */, (lcodes - 1)) // literal tree
 16885  
 16886  	send_tree(tls, s, s+2504 /* &.dyn_dtree */, (dcodes - 1)) // distance tree
 16887  
 16888  }
 16889  
 16890  // ===========================================================================
 16891  // Send a stored block
 16892  func X_tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:863:20: */
 16893  	{
 16894  		var len int32 = 3
 16895  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16896  			var val int32 = ((int32(STORED_BLOCK) << 1) + last)
 16897  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16898  			{
 16899  				{
 16900  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16901  				}
 16902  				{
 16903  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16904  				}
 16905  
 16906  			}
 16907  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16908  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16909  		} else {
 16910  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(STORED_BLOCK) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16911  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16912  		}
 16913  	}
 16914  	// send block type
 16915  	bi_windup(tls, s) /* align on byte boundary */
 16916  	{
 16917  		{
 16918  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32(Ush(stored_len))) & 0xff))
 16919  		}
 16920  		{
 16921  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32((Ush(stored_len))) >> 8))
 16922  		}
 16923  
 16924  	}
 16925  
 16926  	{
 16927  		{
 16928  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32(Ush(^stored_len))) & 0xff))
 16929  		}
 16930  		{
 16931  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32((Ush(^stored_len))) >> 8))
 16932  		}
 16933  
 16934  	}
 16935  
 16936  	libc.Xmemcpy(tls, ((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Fpending)), buf, stored_len)
 16937  	*(*Ulg)(unsafe.Pointer(s + 40 /* &.pending */)) += (stored_len)
 16938  }
 16939  
 16940  // ===========================================================================
 16941  // Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
 16942  func X_tr_flush_bits(tls *libc.TLS, s uintptr) { /* trees.c:886:20: */
 16943  	bi_flush(tls, s)
 16944  }
 16945  
 16946  // ===========================================================================
 16947  // Send one empty static block to give enough lookahead for inflate.
 16948  // This takes 10 bits, of which 7 may remain in the bit buffer.
 16949  func X_tr_align(tls *libc.TLS, s uintptr) { /* trees.c:896:20: */
 16950  	{
 16951  		var len int32 = 3
 16952  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16953  			var val int32 = (int32(STATIC_TREES) << 1)
 16954  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16955  			{
 16956  				{
 16957  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16958  				}
 16959  				{
 16960  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16961  				}
 16962  
 16963  			}
 16964  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16965  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16966  		} else {
 16967  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(int32((Ush(int32(STATIC_TREES) << 1)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16968  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16969  		}
 16970  	}
 16971  
 16972  	{
 16973  		var len int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 + 2 /* &.dl */)))
 16974  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 16975  			var val int32 = int32(*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 /* &.fc */)))
 16976  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16977  			{
 16978  				{
 16979  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 16980  				}
 16981  				{
 16982  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 16983  				}
 16984  
 16985  			}
 16986  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 16987  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 16988  		} else {
 16989  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_ltree)) + 256*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 16990  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 16991  		}
 16992  	}
 16993  
 16994  	bi_flush(tls, s)
 16995  }
 16996  
 16997  // ===========================================================================
 16998  // Determine the best encoding for the current block: dynamic trees, static
 16999  // trees or store, and write out the encoded block.
 17000  func X_tr_flush_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Ulg, last int32) { /* trees.c:911:20: */
 17001  	var opt_lenb Ulg
 17002  	var static_lenb Ulg       // opt_len and static_len in bytes
 17003  	var max_blindex int32 = 0 // index of last bit length code of non zero freq
 17004  
 17005  	// Build the Huffman trees unless a stored block is forced
 17006  	if (*Deflate_state)(unsafe.Pointer(s)).Flevel > 0 {
 17007  
 17008  		// Check if the file is binary or text
 17009  		if (*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == Z_UNKNOWN {
 17010  			(*Z_stream)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = detect_data_type(tls, s)
 17011  		}
 17012  
 17013  		// Construct the literal and distance trees
 17014  		build_tree(tls, s, (s + 2904 /* &.l_desc */))
 17015  
 17016  		build_tree(tls, s, (s + 2928 /* &.d_desc */))
 17017  
 17018  		// At this point, opt_len and static_len are the total bit lengths of
 17019  		// the compressed block data, excluding the tree representations.
 17020  
 17021  		// Build the bit length tree for the above two trees, and get the index
 17022  		// in bl_order of the last bit length code to send.
 17023  		max_blindex = build_bl_tree(tls, s)
 17024  
 17025  		// Determine the best encoding. Compute the block lengths in bytes.
 17026  		opt_lenb = ((((*Deflate_state)(unsafe.Pointer(s)).Fopt_len + uint64(3)) + uint64(7)) >> 3)
 17027  		static_lenb = ((((*Deflate_state)(unsafe.Pointer(s)).Fstatic_len + uint64(3)) + uint64(7)) >> 3)
 17028  
 17029  		if static_lenb <= opt_lenb {
 17030  			opt_lenb = static_lenb
 17031  		}
 17032  
 17033  	} else {
 17034  
 17035  		opt_lenb = libc.AssignUint64(&static_lenb, (stored_len + uint64(5))) // force a stored block
 17036  	}
 17037  
 17038  	if ((stored_len + uint64(4)) <= opt_lenb) && (buf != uintptr(0)) {
 17039  		// 4: two words for the lengths
 17040  		// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
 17041  		// Otherwise we can't have processed more than WSIZE input bytes since
 17042  		// the last block flush, because compression would have been
 17043  		// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
 17044  		// transform a block into a stored block.
 17045  		X_tr_stored_block(tls, s, buf, stored_len, last)
 17046  
 17047  	} else if ((*Deflate_state)(unsafe.Pointer(s)).Fstrategy == Z_FIXED) || (static_lenb == opt_lenb) {
 17048  		{
 17049  			var len int32 = 3
 17050  			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 17051  				var val int32 = ((int32(STATIC_TREES) << 1) + last)
 17052  				*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17053  				{
 17054  					{
 17055  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 17056  					}
 17057  					{
 17058  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 17059  					}
 17060  
 17061  				}
 17062  				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 17063  				*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 17064  			} else {
 17065  				*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(STATIC_TREES) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17066  				*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 17067  			}
 17068  		}
 17069  
 17070  		compress_block(tls, s, uintptr(uintptr(unsafe.Pointer(&static_ltree))),
 17071  			uintptr(uintptr(unsafe.Pointer(&static_dtree))))
 17072  	} else {
 17073  		{
 17074  			var len int32 = 3
 17075  			if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 17076  				var val int32 = ((int32(DYN_TREES) << 1) + last)
 17077  				*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17078  				{
 17079  					{
 17080  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 17081  					}
 17082  					{
 17083  						*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 17084  					}
 17085  
 17086  				}
 17087  				(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 17088  				*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 17089  			} else {
 17090  				*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush((int32(DYN_TREES) << 1) + last))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17091  				*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 17092  			}
 17093  		}
 17094  
 17095  		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),
 17096  			(max_blindex + 1))
 17097  		compress_block(tls, s, s+212, /* &.dyn_ltree */
 17098  			s+2504 /* &.dyn_dtree */)
 17099  	}
 17100  
 17101  	// The above check is made mod 2^32, for files larger than 512 MB
 17102  	// and uLong implemented on 32 bits.
 17103  	init_block(tls, s)
 17104  
 17105  	if last != 0 {
 17106  		bi_windup(tls, s)
 17107  	}
 17108  
 17109  }
 17110  
 17111  // ===========================================================================
 17112  // Save the match info and tally the frequency counts. Return true if
 17113  // the current block must be flushed.
 17114  func X_tr_tally(tls *libc.TLS, s uintptr, dist uint32, lc uint32) int32 { /* trees.c:1014:19: */
 17115  	*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr((*Deflate_state)(unsafe.Pointer(s)).Flast_lit)*2)) = Ush(dist)
 17116  	*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Flast_lit, 1)))) = Uch(lc)
 17117  	if dist == uint32(0) {
 17118  		// lc is the unmatched char
 17119  		*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(lc)*4 /* &.fc */))++
 17120  	} else {
 17121  		(*Deflate_state)(unsafe.Pointer(s)).Fmatches++
 17122  		// Here, lc is the match length - MIN_MATCH
 17123  		dist-- // dist = match distance - 1
 17124  
 17125  		*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(((int32(X_length_code[lc])+LITERALS)+1))*4 /* &.fc */))++
 17126  		*(*Ush)(unsafe.Pointer((s + 2504 /* &.dyn_dtree */) + uintptr((func() int32 {
 17127  			if (dist) < uint32(256) {
 17128  				return int32(X_dist_code[dist])
 17129  			}
 17130  			return int32(X_dist_code[(uint32(256) + ((dist) >> 7))])
 17131  		}()))*4 /* &.fc */))++
 17132  	}
 17133  
 17134  	return (libc.Bool32((*Deflate_state)(unsafe.Pointer(s)).Flast_lit == ((*Deflate_state)(unsafe.Pointer(s)).Flit_bufsize - UInt(1))))
 17135  	// We avoid equality with lit_bufsize because of wraparound at 64K
 17136  	// on 16 bit machines and because stored blocks are restricted to
 17137  	// 64K-1 bytes.
 17138  }
 17139  
 17140  // ===========================================================================
 17141  // Send the block data compressed using the given Huffman trees
 17142  func compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { /* trees.c:1064:12: */
 17143  	var dist uint32           // distance of matched string
 17144  	var lc int32              // match length or unmatched char (if dist == 0)
 17145  	var lx uint32 = uint32(0) // running index in l_buf
 17146  	var code uint32           // the code to send
 17147  	var extra int32           // number of extra bits to send
 17148  
 17149  	if (*Deflate_state)(unsafe.Pointer(s)).Flast_lit != UInt(0) {
 17150  		for ok := true; ok; ok = (lx < (*Deflate_state)(unsafe.Pointer(s)).Flast_lit) {
 17151  			dist = uint32(*(*Ushf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fd_buf + uintptr(lx)*2)))
 17152  			lc = int32(*(*Uchf)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fl_buf + uintptr(libc.PostIncUint32(&lx, 1)))))
 17153  			if dist == uint32(0) {
 17154  				{
 17155  					var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2 /* &.dl */)))
 17156  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 17157  						var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 /* &.fc */)))
 17158  						*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17159  						{
 17160  							{
 17161  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 17162  							}
 17163  							{
 17164  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 17165  							}
 17166  
 17167  						}
 17168  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 17169  						*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 17170  					} else {
 17171  						*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + uintptr(lc)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17172  						*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 17173  					}
 17174  				}
 17175  				// send a literal byte
 17176  
 17177  			} else {
 17178  				// Here, lc is the match length - MIN_MATCH
 17179  				code = uint32(X_length_code[lc])
 17180  				{
 17181  					var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 + 2 /* &.dl */)))
 17182  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 17183  						var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 /* &.fc */)))
 17184  						*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17185  						{
 17186  							{
 17187  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 17188  							}
 17189  							{
 17190  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 17191  							}
 17192  
 17193  						}
 17194  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 17195  						*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 17196  					} else {
 17197  						*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + uintptr(((code+uint32(LITERALS))+uint32(1)))*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17198  						*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 17199  					}
 17200  				}
 17201  				// send the length code
 17202  				extra = extra_lbits[code]
 17203  				if extra != 0 {
 17204  					lc = lc - (base_length[code])
 17205  					{
 17206  						var len int32 = extra
 17207  						if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 17208  							var val int32 = lc
 17209  							*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17210  							{
 17211  								{
 17212  									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 17213  								}
 17214  								{
 17215  									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 17216  								}
 17217  
 17218  							}
 17219  							(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 17220  							*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 17221  						} else {
 17222  							*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(lc))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17223  							*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 17224  						}
 17225  					}
 17226  					// send the extra length bits
 17227  				}
 17228  				dist-- // dist is now the match distance - 1
 17229  				code = func() uint32 {
 17230  					if (dist) < uint32(256) {
 17231  						return uint32(X_dist_code[dist])
 17232  					}
 17233  					return uint32(X_dist_code[(uint32(256) + ((dist) >> 7))])
 17234  				}()
 17235  
 17236  				{
 17237  					var len int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2 /* &.dl */)))
 17238  					if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 17239  						var val int32 = int32(*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 /* &.fc */)))
 17240  						*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17241  						{
 17242  							{
 17243  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 17244  							}
 17245  							{
 17246  								*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 17247  							}
 17248  
 17249  						}
 17250  						(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 17251  						*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 17252  					} else {
 17253  						*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(dtree + uintptr(code)*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17254  						*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 17255  					}
 17256  				}
 17257  				// send the distance code
 17258  				extra = extra_dbits[code]
 17259  				if extra != 0 {
 17260  					dist = dist - (uint32(base_dist[code]))
 17261  					{
 17262  						var len int32 = extra
 17263  						if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 17264  							var val int32 = int32(dist)
 17265  							*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17266  							{
 17267  								{
 17268  									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 17269  								}
 17270  								{
 17271  									*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 17272  								}
 17273  
 17274  							}
 17275  							(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 17276  							*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 17277  						} else {
 17278  							*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((Ush(dist))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17279  							*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 17280  						}
 17281  					}
 17282  					// send the extra distance bits
 17283  				}
 17284  			} // literal or match pair ?
 17285  
 17286  			// Check that the overlay between pending_buf and d_buf+l_buf is ok:
 17287  
 17288  		}
 17289  	}
 17290  
 17291  	{
 17292  		var len int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 + 2 /* &.dl */)))
 17293  		if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > (Buf_size - len) {
 17294  			var val int32 = int32(*(*Ush)(unsafe.Pointer(ltree + 256*4 /* &.fc */)))
 17295  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32(Ush(val)) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17296  			{
 17297  				{
 17298  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 17299  				}
 17300  				{
 17301  					*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 17302  				}
 17303  
 17304  			}
 17305  			(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = (Ush(int32(Ush(val)) >> (Buf_size - (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid)))
 17306  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len - Buf_size)
 17307  		} else {
 17308  			*(*Ush)(unsafe.Pointer(s + 5936 /* &.bi_buf */)) |= Ush((int32((*(*Ush)(unsafe.Pointer(ltree + 256*4 /* &.fc */)))) << (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid))
 17309  			*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) += (len)
 17310  		}
 17311  	}
 17312  
 17313  }
 17314  
 17315  // ===========================================================================
 17316  // Check if the data type is TEXT or BINARY, using the following algorithm:
 17317  // - TEXT if the two conditions below are satisfied:
 17318  //    a) There are no non-portable control characters belonging to the
 17319  //       "black list" (0..6, 14..25, 28..31).
 17320  //    b) There is at least one printable character belonging to the
 17321  //       "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
 17322  // - BINARY otherwise.
 17323  // - The following partially-portable control characters form a
 17324  //   "gray list" that is ignored in this detection algorithm:
 17325  //   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
 17326  // IN assertion: the fields Freq of dyn_ltree are set.
 17327  func detect_data_type(tls *libc.TLS, s uintptr) int32 { /* trees.c:1124:11: */
 17328  	// black_mask is the bit mask of black-listed bytes
 17329  	// set bits 0..6, 14..25, and 28..31
 17330  	// 0xf3ffc07f = binary 11110011111111111100000001111111
 17331  	var black_mask uint64 = 0xf3ffc07f
 17332  	var n int32
 17333  
 17334  	// Check for non-textual ("black-listed") bytes.
 17335  	n = 0
 17336  __1:
 17337  	if !(n <= 31) {
 17338  		goto __3
 17339  	}
 17340  	if ((black_mask & uint64(1)) != 0) && (int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */))) != 0) {
 17341  		return Z_BINARY
 17342  	}
 17343  	goto __2
 17344  __2:
 17345  	n++
 17346  	black_mask >>= 1
 17347  	goto __1
 17348  	goto __3
 17349  __3:
 17350  	;
 17351  
 17352  	// Check for textual ("white-listed") bytes.
 17353  	if ((int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 9*4 /* &.fc */))) != 0) || (int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 10*4 /* &.fc */))) != 0)) ||
 17354  		(int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + 13*4 /* &.fc */))) != 0) {
 17355  		return Z_TEXT
 17356  	}
 17357  	for n = 32; n < LITERALS; n++ {
 17358  		if int32(*(*Ush)(unsafe.Pointer((s + 212 /* &.dyn_ltree */) + uintptr(n)*4 /* &.fc */))) != 0 {
 17359  			return Z_TEXT
 17360  		}
 17361  	}
 17362  
 17363  	// There are no "black-listed" or "white-listed" bytes:
 17364  	// this stream either is empty or has tolerated ("gray-listed") bytes only.
 17365  	return Z_BINARY
 17366  }
 17367  
 17368  // ===========================================================================
 17369  // Reverse the first len bits of a code, using straightforward code (a faster
 17370  // method would use a table)
 17371  // IN assertion: 1 <= len <= 15
 17372  func bi_reverse(tls *libc.TLS, code uint32, len int32) uint32 { /* trees.c:1158:16: */
 17373  	var res uint32 = uint32(0)
 17374  	for ok := true; ok; ok = (libc.PreDecInt32(&len, 1) > 0) {
 17375  		res = res | (code & uint32(1))
 17376  		code >>= 1
 17377  		res <<= 1
 17378  	}
 17379  	return (res >> 1)
 17380  }
 17381  
 17382  // ===========================================================================
 17383  // Flush the bit buffer, keeping at most 7 bits in it.
 17384  func bi_flush(tls *libc.TLS, s uintptr) { /* trees.c:1173:12: */
 17385  	if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid == 16 {
 17386  		{
 17387  			{
 17388  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 17389  			}
 17390  			{
 17391  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 17392  			}
 17393  
 17394  		}
 17395  
 17396  		(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
 17397  		(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
 17398  	} else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid >= 8 {
 17399  		{
 17400  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)
 17401  		}
 17402  
 17403  		libc.AssignShrPtrUint16(s+5936 /* &.bi_buf */, int(8))
 17404  		*(*int32)(unsafe.Pointer(s + 5940 /* &.bi_valid */)) -= (8)
 17405  	}
 17406  }
 17407  
 17408  // ===========================================================================
 17409  // Flush the bit buffer and align the output on a byte boundary
 17410  func bi_windup(tls *libc.TLS, s uintptr) { /* trees.c:1190:12: */
 17411  	if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 8 {
 17412  		{
 17413  			{
 17414  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch((int32((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) & 0xff))
 17415  			}
 17416  			{
 17417  				*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
 17418  			}
 17419  
 17420  		}
 17421  
 17422  	} else if (*Deflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 {
 17423  		{
 17424  			*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint64(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = Byte((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)
 17425  		}
 17426  
 17427  	}
 17428  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_buf = Ush(0)
 17429  	(*Deflate_state)(unsafe.Pointer(s)).Fbi_valid = 0
 17430  }
 17431  
 17432  // ===========================================================================
 17433  //      Decompresses the source buffer into the destination buffer.  *sourceLen is
 17434  //    the byte length of the source buffer. Upon entry, *destLen is the total size
 17435  //    of the destination buffer, which must be large enough to hold the entire
 17436  //    uncompressed data. (The size of the uncompressed data must have been saved
 17437  //    previously by the compressor and transmitted to the decompressor by some
 17438  //    mechanism outside the scope of this compression library.) Upon exit,
 17439  //    *destLen is the size of the decompressed data and *sourceLen is the number
 17440  //    of source bytes consumed. Upon return, source + *sourceLen points to the
 17441  //    first unused input byte.
 17442  //
 17443  //      uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough
 17444  //    memory, Z_BUF_ERROR if there was not enough room in the output buffer, or
 17445  //    Z_DATA_ERROR if the input data was corrupted, including if the input data is
 17446  //    an incomplete zlib stream.
 17447  func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) int32 { /* uncompr.c:27:13: */
 17448  	bp := tls.Alloc(120)
 17449  	defer tls.Free(120)
 17450  
 17451  	// var stream Z_stream at bp+8, 112
 17452  
 17453  	var err int32
 17454  	var max UInt = libc.Uint32(libc.Uint32FromInt32(-1))
 17455  	var len ULong
 17456  	var left ULong
 17457  	// var buf [1]Byte at bp, 1
 17458  	// for detection of incomplete stream when *destLen == 0
 17459  
 17460  	len = *(*ULong)(unsafe.Pointer(sourceLen))
 17461  	if *(*ULongf)(unsafe.Pointer(destLen)) != 0 {
 17462  		left = *(*ULongf)(unsafe.Pointer(destLen))
 17463  		*(*ULongf)(unsafe.Pointer(destLen)) = uint64(0)
 17464  	} else {
 17465  		left = uint64(1)
 17466  		dest = bp /* &buf[0] */
 17467  	}
 17468  
 17469  	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_in = source
 17470  	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = UInt(0)
 17471  	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzalloc = uintptr(0)
 17472  	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fzfree = uintptr(0)
 17473  	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fopaque = uintptr(0)
 17474  
 17475  	err = XinflateInit_(tls, bp+8 /* &stream */, ts /* "1.2.11" */, int32(unsafe.Sizeof(Z_stream{})))
 17476  	if err != Z_OK {
 17477  		return err
 17478  	}
 17479  
 17480  	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Fnext_out = dest
 17481  	(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = UInt(0)
 17482  
 17483  	for ok := true; ok; ok = (err == Z_OK) {
 17484  		if (*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_out == UInt(0) {
 17485  			(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out = func() uint32 {
 17486  				if left > ULong(max) {
 17487  					return max
 17488  				}
 17489  				return UInt(left)
 17490  			}()
 17491  			left = left - (ULong((*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_out))
 17492  		}
 17493  		if (*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_in == UInt(0) {
 17494  			(*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in = func() uint32 {
 17495  				if len > ULong(max) {
 17496  					return max
 17497  				}
 17498  				return UInt(len)
 17499  			}()
 17500  			len = len - (ULong((*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Favail_in))
 17501  		}
 17502  		err = Xinflate(tls, bp+8 /* &stream */, Z_NO_FLUSH)
 17503  	}
 17504  
 17505  	*(*ULong)(unsafe.Pointer(sourceLen)) -= (len + ULong((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_in))
 17506  	if dest != bp /* buf */ {
 17507  		*(*ULongf)(unsafe.Pointer(destLen)) = (*Z_stream)(unsafe.Pointer(bp + 8 /* &stream */)).Ftotal_out
 17508  	} else if ((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Ftotal_out != 0) && (err == (-5)) {
 17509  		left = uint64(1)
 17510  	}
 17511  
 17512  	XinflateEnd(tls, bp+8 /* &stream */)
 17513  	if err == Z_STREAM_END {
 17514  		return Z_OK
 17515  	}
 17516  	if err == Z_NEED_DICT {
 17517  		return -3
 17518  	}
 17519  	if (err == (-5)) && ((left + ULong((*Z_stream)(unsafe.Pointer(bp+8 /* &stream */)).Favail_out)) != 0) {
 17520  		return -3
 17521  	}
 17522  	return err
 17523  }
 17524  
 17525  func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen ULong) int32 { /* uncompr.c:86:13: */
 17526  	bp := tls.Alloc(8)
 17527  	defer tls.Free(8)
 17528  	*(*ULong)(unsafe.Pointer(bp)) = sourceLen
 17529  
 17530  	return Xuncompress2(tls, dest, destLen, source, bp /* &sourceLen */)
 17531  }
 17532  
 17533  // GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
 17534  //    value -- needed when comparing unsigned to z_off64_t, which is signed
 17535  //    (possible z_off64_t types off_t, off64_t, and long are all signed)
 17536  
 17537  var Xz_errmsg = [10]uintptr{
 17538  	uintptr(ts + 876 /* "need dictionary" */),     // Z_NEED_DICT       2
 17539  	uintptr(ts + 892 /* "stream end" */),          // Z_STREAM_END      1
 17540  	uintptr(ts + 101 /* "" */),                    // Z_OK              0
 17541  	uintptr(ts + 903 /* "file error" */),          // Z_ERRNO         (-1)
 17542  	uintptr(ts + 914 /* "stream error" */),        // Z_STREAM_ERROR  (-2)
 17543  	uintptr(ts + 927 /* "data error" */),          // Z_DATA_ERROR    (-3)
 17544  	uintptr(ts + 938 /* "insufficient mem..." */), // Z_MEM_ERROR     (-4)
 17545  	uintptr(ts + 958 /* "buffer error" */),        // Z_BUF_ERROR     (-5)
 17546  	uintptr(ts + 971 /* "incompatible ver..." */), // Z_VERSION_ERROR (-6)
 17547  	uintptr(ts + 101 /* "" */),
 17548  } /* zutil.c:13:14 */
 17549  
 17550  func XzlibVersion(tls *libc.TLS) uintptr { /* zutil.c:27:12: */
 17551  	return ts /* "1.2.11" */
 17552  }
 17553  
 17554  func XzlibCompileFlags(tls *libc.TLS) ULong { /* zutil.c:32:15: */
 17555  	var flags ULong
 17556  
 17557  	flags = uint64(0)
 17558  	switch int32(unsafe.Sizeof(UInt(0))) {
 17559  	case 2:
 17560  		break
 17561  	case 4:
 17562  		flags = flags + (uint64(1))
 17563  		break
 17564  	case 8:
 17565  		flags = flags + (uint64(2))
 17566  		break
 17567  	default:
 17568  		flags = flags + (uint64(3))
 17569  	}
 17570  	switch int32(unsafe.Sizeof(ULong(0))) {
 17571  	case 2:
 17572  		break
 17573  	case 4:
 17574  		flags = flags + (uint64(int32(1) << 2))
 17575  		break
 17576  	case 8:
 17577  		flags = flags + (uint64(int32(2) << 2))
 17578  		break
 17579  	default:
 17580  		flags = flags + (uint64(int32(3) << 2))
 17581  	}
 17582  	switch int32(unsafe.Sizeof(Voidpf(0))) {
 17583  	case 2:
 17584  		break
 17585  	case 4:
 17586  		flags = flags + (uint64(int32(1) << 4))
 17587  		break
 17588  	case 8:
 17589  		flags = flags + (uint64(int32(2) << 4))
 17590  		break
 17591  	default:
 17592  		flags = flags + (uint64(int32(3) << 4))
 17593  	}
 17594  	switch int32(unsafe.Sizeof(Off_t(0))) {
 17595  	case 2:
 17596  		break
 17597  	case 4:
 17598  		flags = flags + (uint64(int32(1) << 6))
 17599  		break
 17600  	case 8:
 17601  		flags = flags + (uint64(int32(2) << 6))
 17602  		break
 17603  	default:
 17604  		flags = flags + (uint64(int32(3) << 6))
 17605  	}
 17606  	return flags
 17607  }
 17608  
 17609  // exported to allow conversion of error code to string for compress() and
 17610  // uncompress()
 17611  func XzError(tls *libc.TLS, err int32) uintptr { /* zutil.c:133:12: */
 17612  	return Xz_errmsg[(Z_NEED_DICT - (err))]
 17613  }
 17614  
 17615  func Xzcalloc(tls *libc.TLS, opaque Voidpf, items uint32, size uint32) Voidpf { /* zutil.c:305:22: */
 17616  	_ = opaque
 17617  	if uint64(unsafe.Sizeof(UInt(0))) > uint64(2) {
 17618  		return libc.Xmalloc(tls, (uint64(items * size)))
 17619  	}
 17620  	return libc.Xcalloc(tls, uint64(items), uint64(size))
 17621  }
 17622  
 17623  func Xzcfree(tls *libc.TLS, opaque Voidpf, ptr Voidpf) { /* zutil.c:315:20: */
 17624  	_ = opaque
 17625  	libc.Xfree(tls, ptr)
 17626  }
 17627  
 17628  func init() {
 17629  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 8 /* .func */)) = deflate_stored // deflate.c:136:29:
 17630  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 24 /* .func */)) = deflate_fast  // deflate.c:137:29:
 17631  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 40 /* .func */)) = deflate_fast  // deflate.c:138:29:
 17632  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 56 /* .func */)) = deflate_fast  // deflate.c:139:29:
 17633  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 72 /* .func */)) = deflate_slow  // deflate.c:141:29:
 17634  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 88 /* .func */)) = deflate_slow  // deflate.c:142:29:
 17635  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 104 /* .func */)) = deflate_slow // deflate.c:143:29:
 17636  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 120 /* .func */)) = deflate_slow // deflate.c:144:29:
 17637  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 136 /* .func */)) = deflate_slow // deflate.c:145:30:
 17638  	*(*func(*libc.TLS, uintptr, int32) Block_state)(unsafe.Pointer(uintptr(unsafe.Pointer(&configuration_table)) + 152 /* .func */)) = deflate_slow // deflate.c:146:30:
 17639  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_bl_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_blbits))            // trees.c:132:22:
 17640  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_dtree))            // trees.c:129:2:
 17641  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_d_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_dbits))              // trees.c:129:16:
 17642  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 0 /* .static_tree */)) = uintptr(unsafe.Pointer(&static_ltree))            // trees.c:126:2:
 17643  	*(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&static_l_desc)) + 8 /* .extra_bits */)) = uintptr(unsafe.Pointer(&extra_lbits))              // trees.c:126:16:
 17644  }
 17645  
 17646  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"
 17647  var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data