// Code generated for darwin/amd64 by 'generator --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-macro=m_ --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -extended-errors --libc modernc.org/libc --package-name=libz -o libz.a.go libz.a', DO NOT EDIT. //go:build darwin && amd64 package libz import ( "reflect" "unsafe" "modernc.org/libc" ) var _ reflect.Type var _ unsafe.Pointer const m_ACCESSX_MAX_DESCRIPTORS = 100 const m_BADSIG = "SIG_ERR" const m_BASE = 65521 const m_BC_BASE_MAX = 99 const m_BC_DIM_MAX = 2048 const m_BC_SCALE_MAX = 99 const m_BC_STRING_MAX = 1000 const m_BIG_ENDIAN = "__DARWIN_BIG_ENDIAN" const m_BUS_ADRALN = 1 const m_BUS_ADRERR = 2 const m_BUS_NOOP = 0 const m_BUS_OBJERR = 3 const m_BYTE_ORDER = "__DARWIN_BYTE_ORDER" const m_CHARCLASS_NAME_MAX = 14 const m_CHILD_MAX = 266 const m_CLD_CONTINUED = 6 const m_CLD_DUMPED = 3 const m_CLD_EXITED = 1 const m_CLD_KILLED = 2 const m_CLD_NOOP = 0 const m_CLD_STOPPED = 5 const m_CLD_TRAPPED = 4 const m_COLL_WEIGHTS_MAX = 2 const m_CPUMON_MAKE_FATAL = 0x1000 const m_DEF_MEM_LEVEL = 8 const m_DEF_WBITS = "MAX_WBITS" const m_DYN_TREES = 2 const m_EQUIV_CLASS_MAX = 2 const m_EXIT_FAILURE = 1 const m_EXIT_SUCCESS = 0 const m_EXPR_NEST_MAX = 32 const m_FD_SETSIZE = "__DARWIN_FD_SETSIZE" const m_FOOTPRINT_INTERVAL_RESET = 0x1 const m_FPE_FLTDIV = 1 const m_FPE_FLTINV = 5 const m_FPE_FLTOVF = 2 const m_FPE_FLTRES = 4 const m_FPE_FLTSUB = 6 const m_FPE_FLTUND = 3 const m_FPE_INTDIV = 7 const m_FPE_INTOVF = 8 const m_FPE_NOOP = 0 const m_FP_CHOP = 3 const m_FP_PREC_24B = 0 const m_FP_PREC_53B = 2 const m_FP_PREC_64B = 3 const m_FP_RND_DOWN = 1 const m_FP_RND_NEAR = 0 const m_FP_RND_UP = 2 const m_FP_STATE_BYTES = 512 const m_F_LOCK = 1 const m_F_OK = 0 const m_F_TEST = 3 const m_F_TLOCK = 2 const m_F_ULOCK = 0 const m_GID_MAX = 2147483647 const m_HAVE_HIDDEN = 1 const m_ILL_BADSTK = 8 const m_ILL_COPROC = 7 const m_ILL_ILLADR = 5 const m_ILL_ILLOPC = 1 const m_ILL_ILLOPN = 4 const m_ILL_ILLTRP = 2 const m_ILL_NOOP = 0 const m_ILL_PRVOPC = 3 const m_ILL_PRVREG = 6 const m_INTMAX_MAX = "__INTMAX_MAX__" const m_INTPTR_MAX = "__INTPTR_MAX__" const m_INT_FAST16_MAX = "__INT_LEAST16_MAX" const m_INT_FAST16_MIN = "__INT_LEAST16_MIN" const m_INT_FAST32_MAX = "__INT_LEAST32_MAX" const m_INT_FAST32_MIN = "__INT_LEAST32_MIN" const m_INT_FAST64_MAX = "__INT_LEAST64_MAX" const m_INT_FAST64_MIN = "__INT_LEAST64_MIN" const m_INT_FAST8_MAX = "__INT_LEAST8_MAX" const m_INT_FAST8_MIN = "__INT_LEAST8_MIN" const m_INT_LEAST16_MAX = "__INT_LEAST16_MAX" const m_INT_LEAST16_MIN = "__INT_LEAST16_MIN" const m_INT_LEAST32_MAX = "__INT_LEAST32_MAX" const m_INT_LEAST32_MIN = "__INT_LEAST32_MIN" const m_INT_LEAST64_MAX = "__INT_LEAST64_MAX" const m_INT_LEAST64_MIN = "__INT_LEAST64_MIN" const m_INT_LEAST8_MAX = "__INT_LEAST8_MAX" const m_INT_LEAST8_MIN = "__INT_LEAST8_MIN" const m_IOPOL_APPLICATION = "IOPOL_STANDARD" const m_IOPOL_ATIME_UPDATES_DEFAULT = 0 const m_IOPOL_ATIME_UPDATES_OFF = 1 const m_IOPOL_DEFAULT = 0 const m_IOPOL_IMPORTANT = 1 const m_IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT = 0 const m_IOPOL_MATERIALIZE_DATALESS_FILES_OFF = 1 const m_IOPOL_MATERIALIZE_DATALESS_FILES_ON = 2 const m_IOPOL_NORMAL = "IOPOL_IMPORTANT" const m_IOPOL_PASSIVE = 2 const m_IOPOL_SCOPE_DARWIN_BG = 2 const m_IOPOL_SCOPE_PROCESS = 0 const m_IOPOL_SCOPE_THREAD = 1 const m_IOPOL_STANDARD = 5 const m_IOPOL_THROTTLE = 3 const m_IOPOL_TYPE_DISK = 0 const m_IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES = 9 const m_IOPOL_TYPE_VFS_ATIME_UPDATES = 2 const m_IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY = 10 const m_IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION = 6 const m_IOPOL_TYPE_VFS_IGNORE_PERMISSIONS = 7 const m_IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3 const m_IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE = 8 const m_IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME = 4 const m_IOPOL_TYPE_VFS_TRIGGER_RESOLVE = 5 const m_IOPOL_UTILITY = 4 const m_IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF = 0 const m_IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON = 1 const m_IOPOL_VFS_CONTENT_PROTECTION_DEFAULT = 0 const m_IOPOL_VFS_CONTENT_PROTECTION_IGNORE = 1 const m_IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT = 0 const m_IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON = 1 const m_IOPOL_VFS_IGNORE_PERMISSIONS_OFF = 0 const m_IOPOL_VFS_IGNORE_PERMISSIONS_ON = 1 const m_IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_DEFAULT = 0 const m_IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_ON = 1 const m_IOPOL_VFS_SKIP_MTIME_UPDATE_IGNORE = 2 const m_IOPOL_VFS_SKIP_MTIME_UPDATE_OFF = 0 const m_IOPOL_VFS_SKIP_MTIME_UPDATE_ON = 1 const m_IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME = 1 const m_IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT = 0 const m_IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT = 0 const m_IOPOL_VFS_TRIGGER_RESOLVE_OFF = 1 const m_LINE_MAX = 2048 const m_LINK_MAX = 32767 const m_LITTLE_ENDIAN = "__DARWIN_LITTLE_ENDIAN" const m_L_INCR = "SEEK_CUR" const m_L_SET = "SEEK_SET" const m_L_XTND = "SEEK_END" const m_L_ctermid = 1024 const m_MAC_OS_VERSION_11_0 = "__MAC_11_0" const m_MAC_OS_VERSION_11_1 = "__MAC_11_1" const m_MAC_OS_VERSION_11_3 = "__MAC_11_3" const m_MAC_OS_VERSION_11_4 = "__MAC_11_4" const m_MAC_OS_VERSION_11_5 = "__MAC_11_5" const m_MAC_OS_VERSION_11_6 = "__MAC_11_6" const m_MAC_OS_VERSION_12_0 = "__MAC_12_0" const m_MAC_OS_VERSION_12_1 = "__MAC_12_1" const m_MAC_OS_VERSION_12_2 = "__MAC_12_2" const m_MAC_OS_VERSION_12_3 = "__MAC_12_3" const m_MAC_OS_VERSION_12_4 = "__MAC_12_4" const m_MAC_OS_VERSION_12_5 = "__MAC_12_5" const m_MAC_OS_VERSION_12_6 = "__MAC_12_6" const m_MAC_OS_VERSION_12_7 = "__MAC_12_7" const m_MAC_OS_VERSION_13_0 = "__MAC_13_0" const m_MAC_OS_VERSION_13_1 = "__MAC_13_1" const m_MAC_OS_VERSION_13_2 = "__MAC_13_2" const m_MAC_OS_VERSION_13_3 = "__MAC_13_3" const m_MAC_OS_VERSION_13_4 = "__MAC_13_4" const m_MAC_OS_VERSION_13_5 = "__MAC_13_5" const m_MAC_OS_VERSION_13_6 = "__MAC_13_6" const m_MAC_OS_VERSION_13_7 = "__MAC_13_7" const m_MAC_OS_VERSION_14_0 = "__MAC_14_0" const m_MAC_OS_VERSION_14_1 = "__MAC_14_1" const m_MAC_OS_VERSION_14_2 = "__MAC_14_2" const m_MAC_OS_VERSION_14_3 = "__MAC_14_3" const m_MAC_OS_VERSION_14_4 = "__MAC_14_4" const m_MAC_OS_VERSION_14_5 = "__MAC_14_5" const m_MAC_OS_VERSION_14_6 = "__MAC_14_6" const m_MAC_OS_VERSION_14_7 = "__MAC_14_7" const m_MAC_OS_VERSION_15_0 = "__MAC_15_0" const m_MAC_OS_VERSION_15_1 = "__MAC_15_1" const m_MAC_OS_VERSION_15_2 = "__MAC_15_2" const m_MAC_OS_VERSION_15_3 = "__MAC_15_3" const m_MAC_OS_VERSION_15_4 = "__MAC_15_4" const m_MAC_OS_X_VERSION_10_0 = "__MAC_10_0" const m_MAC_OS_X_VERSION_10_1 = "__MAC_10_1" const m_MAC_OS_X_VERSION_10_10 = "__MAC_10_10" const m_MAC_OS_X_VERSION_10_10_2 = "__MAC_10_10_2" const m_MAC_OS_X_VERSION_10_10_3 = "__MAC_10_10_3" const m_MAC_OS_X_VERSION_10_11 = "__MAC_10_11" const m_MAC_OS_X_VERSION_10_11_2 = "__MAC_10_11_2" const m_MAC_OS_X_VERSION_10_11_3 = "__MAC_10_11_3" const m_MAC_OS_X_VERSION_10_11_4 = "__MAC_10_11_4" const m_MAC_OS_X_VERSION_10_12 = "__MAC_10_12" const m_MAC_OS_X_VERSION_10_12_1 = "__MAC_10_12_1" const m_MAC_OS_X_VERSION_10_12_2 = "__MAC_10_12_2" const m_MAC_OS_X_VERSION_10_12_4 = "__MAC_10_12_4" const m_MAC_OS_X_VERSION_10_13 = "__MAC_10_13" const m_MAC_OS_X_VERSION_10_13_1 = "__MAC_10_13_1" const m_MAC_OS_X_VERSION_10_13_2 = "__MAC_10_13_2" const m_MAC_OS_X_VERSION_10_13_4 = "__MAC_10_13_4" const m_MAC_OS_X_VERSION_10_14 = "__MAC_10_14" const m_MAC_OS_X_VERSION_10_14_1 = "__MAC_10_14_1" const m_MAC_OS_X_VERSION_10_14_4 = "__MAC_10_14_4" const m_MAC_OS_X_VERSION_10_14_5 = "__MAC_10_14_5" const m_MAC_OS_X_VERSION_10_14_6 = "__MAC_10_14_6" const m_MAC_OS_X_VERSION_10_15 = "__MAC_10_15" const m_MAC_OS_X_VERSION_10_15_1 = "__MAC_10_15_1" const m_MAC_OS_X_VERSION_10_15_4 = "__MAC_10_15_4" const m_MAC_OS_X_VERSION_10_16 = "__MAC_10_16" const m_MAC_OS_X_VERSION_10_2 = "__MAC_10_2" const m_MAC_OS_X_VERSION_10_3 = "__MAC_10_3" const m_MAC_OS_X_VERSION_10_4 = "__MAC_10_4" const m_MAC_OS_X_VERSION_10_5 = "__MAC_10_5" const m_MAC_OS_X_VERSION_10_6 = "__MAC_10_6" const m_MAC_OS_X_VERSION_10_7 = "__MAC_10_7" const m_MAC_OS_X_VERSION_10_8 = "__MAC_10_8" const m_MAC_OS_X_VERSION_10_9 = "__MAC_10_9" const m_MAX_CANON = 1024 const m_MAX_INPUT = 1024 const m_MAX_MATCH = 258 const m_MAX_MEM_LEVEL = 9 const m_MAX_WBITS = 15 const m_MB_CUR_MAX = "__mb_cur_max" const m_MB_LEN_MAX = 1 const m_MINSIGSTKSZ = 32768 const m_MIN_MATCH = 3 const m_NAME_MAX = 255 const m_NBBY = "__DARWIN_NBBY" const m_NDEBUG = 1 const m_NFDBITS = "__DARWIN_NFDBITS" const m_NGROUPS_MAX = 16 const m_NMAX = 5552 const m_NSIG = "__DARWIN_NSIG" const m_NZERO = 20 const m_OPEN_MAX = 10240 const m_OS_CODE = 19 const m_PATH_MAX = 1024 const m_PDP_ENDIAN = "__DARWIN_PDP_ENDIAN" const m_PIPE_BUF = 512 const m_POLL_ERR = 4 const m_POLL_HUP = 6 const m_POLL_IN = 1 const m_POLL_MSG = 3 const m_POLL_OUT = 2 const m_POLL_PRI = 5 const m_PRESET_DICT = 0x20 const m_PRIO_DARWIN_BG = 0x1000 const m_PRIO_DARWIN_NONUI = 0x1001 const m_PRIO_DARWIN_PROCESS = 4 const m_PRIO_DARWIN_THREAD = 3 const m_PRIO_MAX = 20 const m_PRIO_PGRP = 1 const m_PRIO_PROCESS = 0 const m_PRIO_USER = 2 const m_PTRDIFF_MAX = "__PTRDIFF_MAX__" const m_RAND_MAX = 0x7fffffff const m_RE_DUP_MAX = 255 const m_RLIMIT_AS = 5 const m_RLIMIT_CORE = 4 const m_RLIMIT_CPU = 0 const m_RLIMIT_CPU_USAGE_MONITOR = 0x2 const m_RLIMIT_DATA = 2 const m_RLIMIT_FOOTPRINT_INTERVAL = 0x4 const m_RLIMIT_FSIZE = 1 const m_RLIMIT_MEMLOCK = 6 const m_RLIMIT_NOFILE = 8 const m_RLIMIT_NPROC = 7 const m_RLIMIT_RSS = "RLIMIT_AS" const m_RLIMIT_STACK = 3 const m_RLIMIT_THREAD_CPULIMITS = 0x3 const m_RLIMIT_WAKEUPS_MONITOR = 0x1 const m_RLIM_NLIMITS = 9 const m_RLIM_SAVED_CUR = "RLIM_INFINITY" const m_RLIM_SAVED_MAX = "RLIM_INFINITY" const m_RUSAGE_INFO_CURRENT = "RUSAGE_INFO_V6" const m_RUSAGE_INFO_V0 = 0 const m_RUSAGE_INFO_V1 = 1 const m_RUSAGE_INFO_V2 = 2 const m_RUSAGE_INFO_V3 = 3 const m_RUSAGE_INFO_V4 = 4 const m_RUSAGE_INFO_V5 = 5 const m_RUSAGE_INFO_V6 = 6 const m_RUSAGE_SELF = 0 const m_RU_PROC_RUNS_RESLIDE = 0x00000001 const m_SA_64REGSET = 0x0200 const m_SA_NOCLDSTOP = 0x0008 const m_SA_NOCLDWAIT = 0x0020 const m_SA_NODEFER = 0x0010 const m_SA_ONSTACK = 0x0001 const m_SA_RESETHAND = 0x0004 const m_SA_RESTART = 0x0002 const m_SA_SIGINFO = 0x0040 const m_SA_USERTRAMP = 0x0100 const m_SEEK_CUR = 1 const m_SEEK_DATA = 4 const m_SEEK_END = 2 const m_SEEK_HOLE = 3 const m_SEEK_SET = 0 const m_SEGV_ACCERR = 2 const m_SEGV_MAPERR = 1 const m_SEGV_NOOP = 0 const m_SIGABRT = 6 const m_SIGALRM = 14 const m_SIGBUS = 10 const m_SIGCHLD = 20 const m_SIGCONT = 19 const m_SIGEMT = 7 const m_SIGEV_NONE = 0 const m_SIGEV_SIGNAL = 1 const m_SIGEV_THREAD = 3 const m_SIGFPE = 8 const m_SIGHUP = 1 const m_SIGILL = 4 const m_SIGINFO = 29 const m_SIGINT = 2 const m_SIGIO = 23 const m_SIGIOT = "SIGABRT" const m_SIGKILL = 9 const m_SIGPIPE = 13 const m_SIGPROF = 27 const m_SIGQUIT = 3 const m_SIGSEGV = 11 const m_SIGSTKSZ = 131072 const m_SIGSTOP = 17 const m_SIGSYS = 12 const m_SIGTERM = 15 const m_SIGTRAP = 5 const m_SIGTSTP = 18 const m_SIGTTIN = 21 const m_SIGTTOU = 22 const m_SIGURG = 16 const m_SIGUSR1 = 30 const m_SIGUSR2 = 31 const m_SIGVTALRM = 26 const m_SIGWINCH = 28 const m_SIGXCPU = 24 const m_SIGXFSZ = 25 const m_SIG_BLOCK = 1 const m_SIG_SETMASK = 3 const m_SIG_UNBLOCK = 2 const m_SIZE_MAX = "__SIZE_MAX__" const m_SI_ASYNCIO = 0x10004 const m_SI_MESGQ = 0x10005 const m_SI_QUEUE = 0x10002 const m_SI_TIMER = 0x10003 const m_SI_USER = 0x10001 const m_SS_DISABLE = 0x0004 const m_SS_ONSTACK = 0x0001 const m_STATIC_TREES = 1 const m_STDERR_FILENO = 2 const m_STDIN_FILENO = 0 const m_STDOUT_FILENO = 1 const m_STORED_BLOCK = 0 const m_SV_INTERRUPT = "SA_RESTART" const m_SV_NOCLDSTOP = "SA_NOCLDSTOP" const m_SV_NODEFER = "SA_NODEFER" const m_SV_ONSTACK = "SA_ONSTACK" const m_SV_RESETHAND = "SA_RESETHAND" const m_SV_SIGINFO = "SA_SIGINFO" const m_SYNC_VOLUME_FULLSYNC = 0x01 const m_SYNC_VOLUME_WAIT = 0x02 const m_TARGET_IPHONE_SIMULATOR = 0 const m_TARGET_OS_ARROW = 0 const m_TARGET_OS_BRIDGE = 0 const m_TARGET_OS_DRIVERKIT = 0 const m_TARGET_OS_EMBEDDED = 0 const m_TARGET_OS_IOS = 0 const m_TARGET_OS_IOSMAC = 0 const m_TARGET_OS_IPHONE = 0 const m_TARGET_OS_LINUX = 0 const m_TARGET_OS_MAC = 1 const m_TARGET_OS_MACCATALYST = 0 const m_TARGET_OS_NANO = 0 const m_TARGET_OS_OSX = 1 const m_TARGET_OS_SIMULATOR = 0 const m_TARGET_OS_TV = 0 const m_TARGET_OS_UIKITFORMAC = 0 const m_TARGET_OS_UNIX = 0 const m_TARGET_OS_VISION = 0 const m_TARGET_OS_WATCH = 0 const m_TARGET_OS_WIN32 = 0 const m_TARGET_OS_WINDOWS = 0 const m_TARGET_OS_XR = 0 const m_TRAP_BRKPT = 1 const m_TRAP_TRACE = 2 const m_UID_MAX = 2147483647 const m_UINTMAX_MAX = "__UINTMAX_MAX__" const m_UINTPTR_MAX = "__UINTPTR_MAX__" const m_UINT_FAST16_MAX = "__UINT_LEAST16_MAX" const m_UINT_FAST32_MAX = "__UINT_LEAST32_MAX" const m_UINT_FAST64_MAX = "__UINT_LEAST64_MAX" const m_UINT_FAST8_MAX = "__UINT_LEAST8_MAX" const m_UINT_LEAST16_MAX = "__UINT_LEAST16_MAX" const m_UINT_LEAST32_MAX = "__UINT_LEAST32_MAX" const m_UINT_LEAST64_MAX = "__UINT_LEAST64_MAX" const m_UINT_LEAST8_MAX = "__UINT_LEAST8_MAX" const m_WAIT_MYPGRP = 0 const m_WAKEMON_DISABLE = 0x02 const m_WAKEMON_ENABLE = 0x01 const m_WAKEMON_GET_PARAMS = 0x04 const m_WAKEMON_MAKE_FATAL = 0x10 const m_WAKEMON_SET_DEFAULTS = 0x08 const m_WCHAR_MAX = "__WCHAR_MAX__" const m_WCONTINUED = 0x00000010 const m_WCOREFLAG = 0200 const m_WEXITED = 0x00000004 const m_WNOHANG = 0x00000001 const m_WNOWAIT = 0x00000020 const m_WSTOPPED = 0x00000008 const m_WUNTRACED = 0x00000002 const m_ZEXTERN = "extern" const m_ZLIB_VERNUM = 0x1310 const m_ZLIB_VERSION = "1.3.1" const m_ZLIB_VER_MAJOR = 1 const m_ZLIB_VER_MINOR = 3 const m_ZLIB_VER_REVISION = 1 const m_ZLIB_VER_SUBREVISION = 0 const m_Z_ASCII = "Z_TEXT" const m_Z_BEST_COMPRESSION = 9 const m_Z_BEST_SPEED = 1 const m_Z_BINARY = 0 const m_Z_BLOCK = 5 const m_Z_DEFAULT_STRATEGY = 0 const m_Z_DEFLATED = 8 const m_Z_FILTERED = 1 const m_Z_FINISH = 4 const m_Z_FIXED = 4 const m_Z_FULL_FLUSH = 3 const m_Z_HUFFMAN_ONLY = 2 const m_Z_NEED_DICT = 2 const m_Z_NO_COMPRESSION = 0 const m_Z_NO_FLUSH = 0 const m_Z_NULL = 0 const m_Z_OK = 0 const m_Z_PARTIAL_FLUSH = 1 const m_Z_RLE = 3 const m_Z_STREAM_END = 1 const m_Z_SYNC_FLUSH = 2 const m_Z_TEXT = 1 const m_Z_TREES = 6 const m_Z_U4 = "unsigned" const m_Z_UNKNOWN = 2 const m__CS_DARWIN_USER_CACHE_DIR = 65538 const m__CS_DARWIN_USER_DIR = 65536 const m__CS_DARWIN_USER_TEMP_DIR = 65537 const m__CS_PATH = 1 const m__CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2 const m__CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3 const m__CS_POSIX_V6_ILP32_OFF32_LIBS = 4 const m__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5 const m__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6 const m__CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7 const m__CS_POSIX_V6_LP64_OFF64_CFLAGS = 8 const m__CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9 const m__CS_POSIX_V6_LP64_OFF64_LIBS = 10 const m__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11 const m__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12 const m__CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13 const m__CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14 const m__CS_XBS5_ILP32_OFF32_CFLAGS = 20 const m__CS_XBS5_ILP32_OFF32_LDFLAGS = 21 const m__CS_XBS5_ILP32_OFF32_LIBS = 22 const m__CS_XBS5_ILP32_OFF32_LINTFLAGS = 23 const m__CS_XBS5_ILP32_OFFBIG_CFLAGS = 24 const m__CS_XBS5_ILP32_OFFBIG_LDFLAGS = 25 const m__CS_XBS5_ILP32_OFFBIG_LIBS = 26 const m__CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 27 const m__CS_XBS5_LP64_OFF64_CFLAGS = 28 const m__CS_XBS5_LP64_OFF64_LDFLAGS = 29 const m__CS_XBS5_LP64_OFF64_LIBS = 30 const m__CS_XBS5_LP64_OFF64_LINTFLAGS = 31 const m__CS_XBS5_LPBIG_OFFBIG_CFLAGS = 32 const m__CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 33 const m__CS_XBS5_LPBIG_OFFBIG_LIBS = 34 const m__CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 35 const m__DARWIN_FEATURE_64_BIT_INODE = 1 const m__DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1 const m__DARWIN_FEATURE_UNIX_CONFORMANCE = 3 const m__FORTIFY_SOURCE = 2 const m__I386_SIGNAL_H_ = 1 const m__LIBC_COUNT__MB_LEN_MAX = "_LIBC_UNSAFE_INDEXABLE" const m__LIBC_COUNT__PATH_MAX = "_LIBC_UNSAFE_INDEXABLE" const m__LP64 = 1 const m__PC_2_SYMLINKS = 15 const m__PC_ALLOC_SIZE_MIN = 16 const m__PC_ASYNC_IO = 17 const m__PC_AUTH_OPAQUE_NP = 14 const m__PC_CASE_PRESERVING = 12 const m__PC_CASE_SENSITIVE = 11 const m__PC_CHOWN_RESTRICTED = 7 const m__PC_EXTENDED_SECURITY_NP = 13 const m__PC_FILESIZEBITS = 18 const m__PC_LINK_MAX = 1 const m__PC_MAX_CANON = 2 const m__PC_MAX_INPUT = 3 const m__PC_MIN_HOLE_SIZE = 27 const m__PC_NAME_CHARS_MAX = 10 const m__PC_NAME_MAX = 4 const m__PC_NO_TRUNC = 8 const m__PC_PATH_MAX = 5 const m__PC_PIPE_BUF = 6 const m__PC_PRIO_IO = 19 const m__PC_REC_INCR_XFER_SIZE = 20 const m__PC_REC_MAX_XFER_SIZE = 21 const m__PC_REC_MIN_XFER_SIZE = 22 const m__PC_REC_XFER_ALIGN = 23 const m__PC_SYMLINK_MAX = 24 const m__PC_SYNC_IO = 25 const m__PC_VDISABLE = 9 const m__PC_XATTR_SIZE_BITS = 26 const m__POSIX2_CHAR_TERM = 200112 const m__POSIX2_C_BIND = 200112 const m__POSIX2_C_DEV = 200112 const m__POSIX2_FORT_RUN = 200112 const m__POSIX2_LOCALEDEF = 200112 const m__POSIX2_SW_DEV = 200112 const m__POSIX2_UPE = 200112 const m__POSIX2_VERSION = 200112 const m__POSIX_CHOWN_RESTRICTED = 200112 const m__POSIX_FSYNC = 200112 const m__POSIX_IPV6 = 200112 const m__POSIX_JOB_CONTROL = 200112 const m__POSIX_MAPPED_FILES = 200112 const m__POSIX_MEMORY_PROTECTION = 200112 const m__POSIX_NO_TRUNC = 200112 const m__POSIX_READER_WRITER_LOCKS = 200112 const m__POSIX_REGEXP = 200112 const m__POSIX_SAVED_IDS = 200112 const m__POSIX_SHELL = 200112 const m__POSIX_SPAWN = 200112 const m__POSIX_THREADS = 200112 const m__POSIX_THREAD_ATTR_STACKADDR = 200112 const m__POSIX_THREAD_ATTR_STACKSIZE = 200112 const m__POSIX_THREAD_KEYS_MAX = 128 const m__POSIX_THREAD_PROCESS_SHARED = 200112 const m__POSIX_THREAD_SAFE_FUNCTIONS = 200112 const m__POSIX_V6_ILP32_OFF32 = "__ILP32_OFF32" const m__POSIX_V6_ILP32_OFFBIG = "__ILP32_OFFBIG" const m__POSIX_V6_LP64_OFF64 = "__LP64_OFF64" const m__POSIX_V6_LPBIG_OFFBIG = "__LPBIG_OFFBIG" const m__POSIX_V7_ILP32_OFF32 = "__ILP32_OFF32" const m__POSIX_V7_ILP32_OFFBIG = "__ILP32_OFFBIG" const m__POSIX_V7_LP64_OFF64 = "__LP64_OFF64" const m__POSIX_V7_LPBIG_OFFBIG = "__LPBIG_OFFBIG" const m__POSIX_VERSION = 200112 const m__QUAD_HIGHWORD = 1 const m__QUAD_LOWWORD = 0 const m__RLIMIT_POSIX_FLAG = 0x1000 const m__SC_2_CHAR_TERM = 20 const m__SC_2_C_BIND = 18 const m__SC_2_C_DEV = 19 const m__SC_2_FORT_DEV = 21 const m__SC_2_FORT_RUN = 22 const m__SC_2_LOCALEDEF = 23 const m__SC_2_PBS = 59 const m__SC_2_PBS_ACCOUNTING = 60 const m__SC_2_PBS_CHECKPOINT = 61 const m__SC_2_PBS_LOCATE = 62 const m__SC_2_PBS_MESSAGE = 63 const m__SC_2_PBS_TRACK = 64 const m__SC_2_SW_DEV = 24 const m__SC_2_UPE = 25 const m__SC_2_VERSION = 17 const m__SC_ADVISORY_INFO = 65 const m__SC_AIO_LISTIO_MAX = 42 const m__SC_AIO_MAX = 43 const m__SC_AIO_PRIO_DELTA_MAX = 44 const m__SC_ARG_MAX = 1 const m__SC_ASYNCHRONOUS_IO = 28 const m__SC_ATEXIT_MAX = 107 const m__SC_BARRIERS = 66 const m__SC_BC_BASE_MAX = 9 const m__SC_BC_DIM_MAX = 10 const m__SC_BC_SCALE_MAX = 11 const m__SC_BC_STRING_MAX = 12 const m__SC_CHILD_MAX = 2 const m__SC_CLK_TCK = 3 const m__SC_CLOCK_SELECTION = 67 const m__SC_COLL_WEIGHTS_MAX = 13 const m__SC_CPUTIME = 68 const m__SC_DELAYTIMER_MAX = 45 const m__SC_EXPR_NEST_MAX = 14 const m__SC_FILE_LOCKING = 69 const m__SC_FSYNC = 38 const m__SC_GETGR_R_SIZE_MAX = 70 const m__SC_GETPW_R_SIZE_MAX = 71 const m__SC_HOST_NAME_MAX = 72 const m__SC_IOV_MAX = 56 const m__SC_IPV6 = 118 const m__SC_JOB_CONTROL = 6 const m__SC_LINE_MAX = 15 const m__SC_LOGIN_NAME_MAX = 73 const m__SC_MAPPED_FILES = 47 const m__SC_MEMLOCK = 30 const m__SC_MEMLOCK_RANGE = 31 const m__SC_MEMORY_PROTECTION = 32 const m__SC_MESSAGE_PASSING = 33 const m__SC_MONOTONIC_CLOCK = 74 const m__SC_MQ_OPEN_MAX = 46 const m__SC_MQ_PRIO_MAX = 75 const m__SC_NGROUPS_MAX = 4 const m__SC_NPROCESSORS_CONF = 57 const m__SC_NPROCESSORS_ONLN = 58 const m__SC_OPEN_MAX = 5 const m__SC_PAGESIZE = 29 const m__SC_PAGE_SIZE = "_SC_PAGESIZE" const m__SC_PASS_MAX = 131 const m__SC_PHYS_PAGES = 200 const m__SC_PRIORITIZED_IO = 34 const m__SC_PRIORITY_SCHEDULING = 35 const m__SC_RAW_SOCKETS = 119 const m__SC_READER_WRITER_LOCKS = 76 const m__SC_REALTIME_SIGNALS = 36 const m__SC_REGEXP = 77 const m__SC_RE_DUP_MAX = 16 const m__SC_RTSIG_MAX = 48 const m__SC_SAVED_IDS = 7 const m__SC_SEMAPHORES = 37 const m__SC_SEM_NSEMS_MAX = 49 const m__SC_SEM_VALUE_MAX = 50 const m__SC_SHARED_MEMORY_OBJECTS = 39 const m__SC_SHELL = 78 const m__SC_SIGQUEUE_MAX = 51 const m__SC_SPAWN = 79 const m__SC_SPIN_LOCKS = 80 const m__SC_SPORADIC_SERVER = 81 const m__SC_SS_REPL_MAX = 126 const m__SC_STREAM_MAX = 26 const m__SC_SYMLOOP_MAX = 120 const m__SC_SYNCHRONIZED_IO = 40 const m__SC_THREADS = 96 const m__SC_THREAD_ATTR_STACKADDR = 82 const m__SC_THREAD_ATTR_STACKSIZE = 83 const m__SC_THREAD_CPUTIME = 84 const m__SC_THREAD_DESTRUCTOR_ITERATIONS = 85 const m__SC_THREAD_KEYS_MAX = 86 const m__SC_THREAD_PRIORITY_SCHEDULING = 89 const m__SC_THREAD_PRIO_INHERIT = 87 const m__SC_THREAD_PRIO_PROTECT = 88 const m__SC_THREAD_PROCESS_SHARED = 90 const m__SC_THREAD_SAFE_FUNCTIONS = 91 const m__SC_THREAD_SPORADIC_SERVER = 92 const m__SC_THREAD_STACK_MIN = 93 const m__SC_THREAD_THREADS_MAX = 94 const m__SC_TIMEOUTS = 95 const m__SC_TIMERS = 41 const m__SC_TIMER_MAX = 52 const m__SC_TRACE = 97 const m__SC_TRACE_EVENT_FILTER = 98 const m__SC_TRACE_EVENT_NAME_MAX = 127 const m__SC_TRACE_INHERIT = 99 const m__SC_TRACE_LOG = 100 const m__SC_TRACE_NAME_MAX = 128 const m__SC_TRACE_SYS_MAX = 129 const m__SC_TRACE_USER_EVENT_MAX = 130 const m__SC_TTY_NAME_MAX = 101 const m__SC_TYPED_MEMORY_OBJECTS = 102 const m__SC_TZNAME_MAX = 27 const m__SC_V6_ILP32_OFF32 = 103 const m__SC_V6_ILP32_OFFBIG = 104 const m__SC_V6_LP64_OFF64 = 105 const m__SC_V6_LPBIG_OFFBIG = 106 const m__SC_VERSION = 8 const m__SC_XBS5_ILP32_OFF32 = 122 const m__SC_XBS5_ILP32_OFFBIG = 123 const m__SC_XBS5_LP64_OFF64 = 124 const m__SC_XBS5_LPBIG_OFFBIG = 125 const m__SC_XOPEN_CRYPT = 108 const m__SC_XOPEN_ENH_I18N = 109 const m__SC_XOPEN_LEGACY = 110 const m__SC_XOPEN_REALTIME = 111 const m__SC_XOPEN_REALTIME_THREADS = 112 const m__SC_XOPEN_SHM = 113 const m__SC_XOPEN_STREAMS = 114 const m__SC_XOPEN_UNIX = 115 const m__SC_XOPEN_VERSION = 116 const m__SC_XOPEN_XCU_VERSION = 121 const m__STRUCT_MCONTEXT = "_STRUCT_MCONTEXT64" const m__V6_ILP32_OFF32 = "__ILP32_OFF32" const m__V6_ILP32_OFFBIG = "__ILP32_OFFBIG" const m__V6_LP64_OFF64 = "__LP64_OFF64" const m__V6_LPBIG_OFFBIG = "__LPBIG_OFFBIG" const m__WSTOPPED = 0177 const m__X86_INSTRUCTION_STATE_CACHELINE_SIZE = 64 const m__XBS5_ILP32_OFF32 = "__ILP32_OFF32" const m__XBS5_ILP32_OFFBIG = "__ILP32_OFFBIG" const m__XBS5_LP64_OFF64 = "__LP64_OFF64" const m__XBS5_LPBIG_OFFBIG = "__LPBIG_OFFBIG" const m__XOPEN_CRYPT = 1 const m__XOPEN_ENH_I18N = 1 const m__XOPEN_SHM = 1 const m__XOPEN_UNIX = 1 const m__XOPEN_VERSION = 600 const m__XOPEN_XCU_VERSION = 4 const m___API_TO_BE_DEPRECATED = 100000 const m___API_TO_BE_DEPRECATED_DRIVERKIT = 100000 const m___API_TO_BE_DEPRECATED_IOS = 100000 const m___API_TO_BE_DEPRECATED_IOSAPPLICATIONEXTENSION = 100000 const m___API_TO_BE_DEPRECATED_KERNELKIT = 100000 const m___API_TO_BE_DEPRECATED_MACCATALYST = 100000 const m___API_TO_BE_DEPRECATED_MACCATALYSTAPPLICATIONEXTENSION = 100000 const m___API_TO_BE_DEPRECATED_MACOS = 100000 const m___API_TO_BE_DEPRECATED_MACOSAPPLICATIONEXTENSION = 100000 const m___API_TO_BE_DEPRECATED_TVOS = 100000 const m___API_TO_BE_DEPRECATED_TVOSAPPLICATIONEXTENSION = 100000 const m___API_TO_BE_DEPRECATED_VISIONOS = 100000 const m___API_TO_BE_DEPRECATED_VISIONOSAPPLICATIONEXTENSION = 100000 const m___API_TO_BE_DEPRECATED_WATCHOS = 100000 const m___API_TO_BE_DEPRECATED_WATCHOSAPPLICATIONEXTENSION = 100000 const m___APPLE_CC__ = 6000 const m___APPLE__ = 1 const m___ATOMIC_ACQUIRE = 2 const m___ATOMIC_ACQ_REL = 4 const m___ATOMIC_CONSUME = 1 const m___ATOMIC_RELAXED = 0 const m___ATOMIC_RELEASE = 3 const m___ATOMIC_SEQ_CST = 5 const m___AVAILABILITY_FILE = "AvailabilityVersions.h" const m___AVAILABILITY_VERSIONS_VERSION_HASH = 93585900 const m___AVAILABILITY_VERSIONS_VERSION_STRING = "Local" const m___BIGGEST_ALIGNMENT__ = 16 const m___BITINT_MAXWIDTH__ = 8388608 const m___BLOCKS__ = 1 const m___BOOL_WIDTH__ = 8 const m___BRIDGEOS_2_0 = 20000 const m___BRIDGEOS_3_0 = 30000 const m___BRIDGEOS_3_1 = 30100 const m___BRIDGEOS_3_4 = 30400 const m___BRIDGEOS_4_0 = 40000 const m___BRIDGEOS_4_1 = 40100 const m___BRIDGEOS_5_0 = 50000 const m___BRIDGEOS_5_1 = 50100 const m___BRIDGEOS_5_3 = 50300 const m___BRIDGEOS_6_0 = 60000 const m___BRIDGEOS_6_2 = 60200 const m___BRIDGEOS_6_4 = 60400 const m___BRIDGEOS_6_5 = 60500 const m___BRIDGEOS_6_6 = 60600 const m___BRIDGEOS_7_0 = 70000 const m___BRIDGEOS_7_1 = 70100 const m___BRIDGEOS_7_2 = 70200 const m___BRIDGEOS_7_3 = 70300 const m___BRIDGEOS_7_4 = 70400 const m___BRIDGEOS_7_6 = 70600 const m___BRIDGEOS_8_0 = 80000 const m___BRIDGEOS_8_1 = 80100 const m___BRIDGEOS_8_2 = 80200 const m___BRIDGEOS_8_3 = 80300 const m___BRIDGEOS_8_4 = 80400 const m___BRIDGEOS_8_5 = 80500 const m___BRIDGEOS_8_6 = 80600 const m___BRIDGEOS_9_0 = 90000 const m___BRIDGEOS_9_1 = 90100 const m___BRIDGEOS_9_2 = 90200 const m___BRIDGEOS_9_3 = 90300 const m___BRIDGEOS_9_4 = 90400 const m___BYTE_ORDER__ = "__ORDER_LITTLE_ENDIAN__" const m___CCGO__ = 1 const m___CHAR_BIT__ = 8 const m___CLANG_ATOMIC_BOOL_LOCK_FREE = 2 const m___CLANG_ATOMIC_CHAR16_T_LOCK_FREE = 2 const m___CLANG_ATOMIC_CHAR32_T_LOCK_FREE = 2 const m___CLANG_ATOMIC_CHAR_LOCK_FREE = 2 const m___CLANG_ATOMIC_INT_LOCK_FREE = 2 const m___CLANG_ATOMIC_LLONG_LOCK_FREE = 2 const m___CLANG_ATOMIC_LONG_LOCK_FREE = 2 const m___CLANG_ATOMIC_POINTER_LOCK_FREE = 2 const m___CLANG_ATOMIC_SHORT_LOCK_FREE = 2 const m___CLANG_ATOMIC_WCHAR_T_LOCK_FREE = 2 const m___CONSTANT_CFSTRINGS__ = 1 const m___DARWIN_64_BIT_INO_T = 1 const m___DARWIN_BIG_ENDIAN = 4321 const m___DARWIN_BYTE_ORDER = "__DARWIN_LITTLE_ENDIAN" const m___DARWIN_C_ANSI = 010000 const m___DARWIN_C_FULL = 900000 const m___DARWIN_C_LEVEL = "__DARWIN_C_FULL" const m___DARWIN_FD_SETSIZE = 1024 const m___DARWIN_LITTLE_ENDIAN = 1234 const m___DARWIN_NBBY = 8 const m___DARWIN_NON_CANCELABLE = 0 const m___DARWIN_NO_LONG_LONG = 0 const m___DARWIN_NSIG = 32 const m___DARWIN_ONLY_64_BIT_INO_T = 0 const m___DARWIN_ONLY_UNIX_CONFORMANCE = 1 const m___DARWIN_ONLY_VERS_1050 = 0 const m___DARWIN_PDP_ENDIAN = 3412 const m___DARWIN_SUF_1050 = "$1050" const m___DARWIN_SUF_64_BIT_INO_T = "$INODE64" const m___DARWIN_SUF_EXTSN = "$DARWIN_EXTSN" const m___DARWIN_UNIX03 = 1 const m___DARWIN_VERS_1050 = 1 const m___DARWIN_WCHAR_MAX = "__WCHAR_MAX__" const m___DBL_DECIMAL_DIG__ = 17 const m___DBL_DENORM_MIN__ = 4.9406564584124654e-324 const m___DBL_DIG__ = 15 const m___DBL_EPSILON__ = 2.2204460492503131e-16 const m___DBL_HAS_DENORM__ = 1 const m___DBL_HAS_INFINITY__ = 1 const m___DBL_HAS_QUIET_NAN__ = 1 const m___DBL_MANT_DIG__ = 53 const m___DBL_MAX_10_EXP__ = 308 const m___DBL_MAX_EXP__ = 1024 const m___DBL_MAX__ = 1.7976931348623157e+308 const m___DBL_MIN__ = 2.2250738585072014e-308 const m___DBL_NORM_MAX__ = 1.7976931348623157e+308 const m___DECIMAL_DIG__ = "__LDBL_DECIMAL_DIG__" const m___DRIVERKIT_19_0 = 190000 const m___DRIVERKIT_20_0 = 200000 const m___DRIVERKIT_21_0 = 210000 const m___DRIVERKIT_22_0 = 220000 const m___DRIVERKIT_22_4 = 220400 const m___DRIVERKIT_22_5 = 220500 const m___DRIVERKIT_22_6 = 220600 const m___DRIVERKIT_23_0 = 230000 const m___DRIVERKIT_23_1 = 230100 const m___DRIVERKIT_23_2 = 230200 const m___DRIVERKIT_23_3 = 230300 const m___DRIVERKIT_23_4 = 230400 const m___DRIVERKIT_23_5 = 230500 const m___DRIVERKIT_23_6 = 230600 const m___DRIVERKIT_24_0 = 240000 const m___DRIVERKIT_24_1 = 240100 const m___DRIVERKIT_24_2 = 240200 const m___DRIVERKIT_24_3 = 240300 const m___DRIVERKIT_24_4 = 240400 const m___DYNAMIC__ = 1 const m___ENABLE_LEGACY_MAC_AVAILABILITY = 1 const m___ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ = 150000 const m___ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ = 150000 const m___FINITE_MATH_ONLY__ = 0 const m___FLT16_DECIMAL_DIG__ = 5 const m___FLT16_DENORM_MIN__ = 5.9604644775390625e-8 const m___FLT16_DIG__ = 3 const m___FLT16_EPSILON__ = 9.765625e-4 const m___FLT16_HAS_DENORM__ = 1 const m___FLT16_HAS_INFINITY__ = 1 const m___FLT16_HAS_QUIET_NAN__ = 1 const m___FLT16_MANT_DIG__ = 11 const m___FLT16_MAX_10_EXP__ = 4 const m___FLT16_MAX_EXP__ = 16 const m___FLT16_MAX__ = 6.5504e+4 const m___FLT16_MIN__ = 6.103515625e-5 const m___FLT16_NORM_MAX__ = 6.5504e+4 const m___FLT_DECIMAL_DIG__ = 9 const m___FLT_DENORM_MIN__ = 1.40129846e-45 const m___FLT_DIG__ = 6 const m___FLT_EPSILON__ = 1.19209290e-7 const m___FLT_HAS_DENORM__ = 1 const m___FLT_HAS_INFINITY__ = 1 const m___FLT_HAS_QUIET_NAN__ = 1 const m___FLT_MANT_DIG__ = 24 const m___FLT_MAX_10_EXP__ = 38 const m___FLT_MAX_EXP__ = 128 const m___FLT_MAX__ = 3.40282347e+38 const m___FLT_MIN__ = 1.17549435e-38 const m___FLT_NORM_MAX__ = 3.40282347e+38 const m___FLT_RADIX__ = 2 const m___FPCLASS_NEGINF = 0x0004 const m___FPCLASS_NEGNORMAL = 0x0008 const m___FPCLASS_NEGSUBNORMAL = 0x0010 const m___FPCLASS_NEGZERO = 0x0020 const m___FPCLASS_POSINF = 0x0200 const m___FPCLASS_POSNORMAL = 0x0100 const m___FPCLASS_POSSUBNORMAL = 0x0080 const m___FPCLASS_POSZERO = 0x0040 const m___FPCLASS_QNAN = 0x0002 const m___FPCLASS_SNAN = 0x0001 const m___FUNCTION__ = "__func__" const m___FXSR__ = 1 const m___GCC_ASM_FLAG_OUTPUTS__ = 1 const m___GCC_ATOMIC_BOOL_LOCK_FREE = 2 const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2 const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2 const m___GCC_ATOMIC_CHAR_LOCK_FREE = 2 const m___GCC_ATOMIC_INT_LOCK_FREE = 2 const m___GCC_ATOMIC_LLONG_LOCK_FREE = 2 const m___GCC_ATOMIC_LONG_LOCK_FREE = 2 const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2 const m___GCC_ATOMIC_SHORT_LOCK_FREE = 2 const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1 const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2 const m___GCC_CONSTRUCTIVE_SIZE = 64 const m___GCC_DESTRUCTIVE_SIZE = 64 const m___GCC_HAVE_DWARF2_CFI_ASM = 1 const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1 const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 = 1 const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1 const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1 const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1 const m___GNUC_MINOR__ = 2 const m___GNUC_PATCHLEVEL__ = 1 const m___GNUC_STDC_INLINE__ = 1 const m___GNUC__ = 4 const m___GXX_ABI_VERSION = 1002 const m___INT16_FMTd__ = "hd" const m___INT16_FMTi__ = "hi" const m___INT16_MAX__ = 32767 const m___INT16_TYPE__ = "short" const m___INT32_FMTd__ = "d" const m___INT32_FMTi__ = "i" const m___INT32_MAX__ = 2147483647 const m___INT32_TYPE__ = "int" const m___INT64_C_SUFFIX__ = "LL" const m___INT64_FMTd__ = "lld" const m___INT64_FMTi__ = "lli" const m___INT64_MAX__ = 9223372036854775807 const m___INT8_FMTd__ = "hhd" const m___INT8_FMTi__ = "hhi" const m___INT8_MAX__ = 127 const m___INTMAX_C_SUFFIX__ = "L" const m___INTMAX_FMTd__ = "ld" const m___INTMAX_FMTi__ = "li" const m___INTMAX_MAX__ = 9223372036854775807 const m___INTMAX_WIDTH__ = 64 const m___INTPTR_FMTd__ = "ld" const m___INTPTR_FMTi__ = "li" const m___INTPTR_MAX__ = 9223372036854775807 const m___INTPTR_WIDTH__ = 64 const m___INT_FAST16_FMTd__ = "hd" const m___INT_FAST16_FMTi__ = "hi" const m___INT_FAST16_MAX__ = 32767 const m___INT_FAST16_TYPE__ = "short" const m___INT_FAST16_WIDTH__ = 16 const m___INT_FAST32_FMTd__ = "d" const m___INT_FAST32_FMTi__ = "i" const m___INT_FAST32_MAX__ = 2147483647 const m___INT_FAST32_TYPE__ = "int" const m___INT_FAST32_WIDTH__ = 32 const m___INT_FAST64_FMTd__ = "lld" const m___INT_FAST64_FMTi__ = "lli" const m___INT_FAST64_MAX__ = 9223372036854775807 const m___INT_FAST64_WIDTH__ = 64 const m___INT_FAST8_FMTd__ = "hhd" const m___INT_FAST8_FMTi__ = "hhi" const m___INT_FAST8_MAX__ = 127 const m___INT_FAST8_WIDTH__ = 8 const m___INT_LEAST16_FMTd__ = "hd" const m___INT_LEAST16_FMTi__ = "hi" const m___INT_LEAST16_MAX__ = 32767 const m___INT_LEAST16_TYPE__ = "short" const m___INT_LEAST16_WIDTH__ = 16 const m___INT_LEAST32_FMTd__ = "d" const m___INT_LEAST32_FMTi__ = "i" const m___INT_LEAST32_MAX__ = 2147483647 const m___INT_LEAST32_TYPE__ = "int" const m___INT_LEAST32_WIDTH__ = 32 const m___INT_LEAST64_FMTd__ = "lld" const m___INT_LEAST64_FMTi__ = "lli" const m___INT_LEAST64_MAX = "INT64_MAX" const m___INT_LEAST64_MAX__ = 9223372036854775807 const m___INT_LEAST64_MIN = "INT64_MIN" const m___INT_LEAST64_WIDTH__ = 64 const m___INT_LEAST8_FMTd__ = "hhd" const m___INT_LEAST8_FMTi__ = "hhi" const m___INT_LEAST8_MAX__ = 127 const m___INT_LEAST8_WIDTH__ = 8 const m___INT_MAX__ = 2147483647 const m___INT_WIDTH__ = 32 const m___IPHONE_10_0 = 100000 const m___IPHONE_10_1 = 100100 const m___IPHONE_10_2 = 100200 const m___IPHONE_10_3 = 100300 const m___IPHONE_11_0 = 110000 const m___IPHONE_11_1 = 110100 const m___IPHONE_11_2 = 110200 const m___IPHONE_11_3 = 110300 const m___IPHONE_11_4 = 110400 const m___IPHONE_12_0 = 120000 const m___IPHONE_12_1 = 120100 const m___IPHONE_12_2 = 120200 const m___IPHONE_12_3 = 120300 const m___IPHONE_12_4 = 120400 const m___IPHONE_13_0 = 130000 const m___IPHONE_13_1 = 130100 const m___IPHONE_13_2 = 130200 const m___IPHONE_13_3 = 130300 const m___IPHONE_13_4 = 130400 const m___IPHONE_13_5 = 130500 const m___IPHONE_13_6 = 130600 const m___IPHONE_13_7 = 130700 const m___IPHONE_14_0 = 140000 const m___IPHONE_14_1 = 140100 const m___IPHONE_14_2 = 140200 const m___IPHONE_14_3 = 140300 const m___IPHONE_14_4 = 140400 const m___IPHONE_14_5 = 140500 const m___IPHONE_14_6 = 140600 const m___IPHONE_14_7 = 140700 const m___IPHONE_14_8 = 140800 const m___IPHONE_15_0 = 150000 const m___IPHONE_15_1 = 150100 const m___IPHONE_15_2 = 150200 const m___IPHONE_15_3 = 150300 const m___IPHONE_15_4 = 150400 const m___IPHONE_15_5 = 150500 const m___IPHONE_15_6 = 150600 const m___IPHONE_15_7 = 150700 const m___IPHONE_15_8 = 150800 const m___IPHONE_16_0 = 160000 const m___IPHONE_16_1 = 160100 const m___IPHONE_16_2 = 160200 const m___IPHONE_16_3 = 160300 const m___IPHONE_16_4 = 160400 const m___IPHONE_16_5 = 160500 const m___IPHONE_16_6 = 160600 const m___IPHONE_16_7 = 160700 const m___IPHONE_17_0 = 170000 const m___IPHONE_17_1 = 170100 const m___IPHONE_17_2 = 170200 const m___IPHONE_17_3 = 170300 const m___IPHONE_17_4 = 170400 const m___IPHONE_17_5 = 170500 const m___IPHONE_17_6 = 170600 const m___IPHONE_17_7 = 170700 const m___IPHONE_18_0 = 180000 const m___IPHONE_18_1 = 180100 const m___IPHONE_18_2 = 180200 const m___IPHONE_18_3 = 180300 const m___IPHONE_18_4 = 180400 const m___IPHONE_2_0 = 20000 const m___IPHONE_2_1 = 20100 const m___IPHONE_2_2 = 20200 const m___IPHONE_3_0 = 30000 const m___IPHONE_3_1 = 30100 const m___IPHONE_3_2 = 30200 const m___IPHONE_4_0 = 40000 const m___IPHONE_4_1 = 40100 const m___IPHONE_4_2 = 40200 const m___IPHONE_4_3 = 40300 const m___IPHONE_5_0 = 50000 const m___IPHONE_5_1 = 50100 const m___IPHONE_6_0 = 60000 const m___IPHONE_6_1 = 60100 const m___IPHONE_7_0 = 70000 const m___IPHONE_7_1 = 70100 const m___IPHONE_8_0 = 80000 const m___IPHONE_8_1 = 80100 const m___IPHONE_8_2 = 80200 const m___IPHONE_8_3 = 80300 const m___IPHONE_8_4 = 80400 const m___IPHONE_9_0 = 90000 const m___IPHONE_9_1 = 90100 const m___IPHONE_9_2 = 90200 const m___IPHONE_9_3 = 90300 const m___LAHF_SAHF__ = 1 const m___LASTBRANCH_MAX = 32 const m___LDBL_DECIMAL_DIG__ = 17 const m___LDBL_DENORM_MIN__ = 4.9406564584124654e-324 const m___LDBL_DIG__ = 15 const m___LDBL_EPSILON__ = 2.2204460492503131e-16 const m___LDBL_HAS_DENORM__ = 1 const m___LDBL_HAS_INFINITY__ = 1 const m___LDBL_HAS_QUIET_NAN__ = 1 const m___LDBL_MANT_DIG__ = 53 const m___LDBL_MAX_10_EXP__ = 308 const m___LDBL_MAX_EXP__ = 1024 const m___LDBL_MAX__ = 1.7976931348623157e+308 const m___LDBL_MIN__ = 2.2250738585072014e-308 const m___LDBL_NORM_MAX__ = 1.7976931348623157e+308 const m___LITTLE_ENDIAN__ = 1 const m___LLONG_WIDTH__ = 64 const m___LONG_LONG_MAX__ = 9223372036854775807 const m___LONG_MAX__ = 9223372036854775807 const m___LONG_WIDTH__ = 64 const m___LP64_OFF64 = 1 const m___LP64__ = 1 const m___LPBIG_OFFBIG = 1 const m___MACH__ = 1 const m___MAC_10_0 = 1000 const m___MAC_10_1 = 1010 const m___MAC_10_10 = 101000 const m___MAC_10_10_2 = 101002 const m___MAC_10_10_3 = 101003 const m___MAC_10_11 = 101100 const m___MAC_10_11_2 = 101102 const m___MAC_10_11_3 = 101103 const m___MAC_10_11_4 = 101104 const m___MAC_10_12 = 101200 const m___MAC_10_12_1 = 101201 const m___MAC_10_12_2 = 101202 const m___MAC_10_12_4 = 101204 const m___MAC_10_13 = 101300 const m___MAC_10_13_1 = 101301 const m___MAC_10_13_2 = 101302 const m___MAC_10_13_4 = 101304 const m___MAC_10_14 = 101400 const m___MAC_10_14_1 = 101401 const m___MAC_10_14_4 = 101404 const m___MAC_10_14_5 = 101405 const m___MAC_10_14_6 = 101406 const m___MAC_10_15 = 101500 const m___MAC_10_15_1 = 101501 const m___MAC_10_15_4 = 101504 const m___MAC_10_16 = 101600 const m___MAC_10_2 = 1020 const m___MAC_10_3 = 1030 const m___MAC_10_4 = 1040 const m___MAC_10_5 = 1050 const m___MAC_10_6 = 1060 const m___MAC_10_7 = 1070 const m___MAC_10_8 = 1080 const m___MAC_10_9 = 1090 const m___MAC_11_0 = 110000 const m___MAC_11_1 = 110100 const m___MAC_11_3 = 110300 const m___MAC_11_4 = 110400 const m___MAC_11_5 = 110500 const m___MAC_11_6 = 110600 const m___MAC_12_0 = 120000 const m___MAC_12_1 = 120100 const m___MAC_12_2 = 120200 const m___MAC_12_3 = 120300 const m___MAC_12_4 = 120400 const m___MAC_12_5 = 120500 const m___MAC_12_6 = 120600 const m___MAC_12_7 = 120700 const m___MAC_13_0 = 130000 const m___MAC_13_1 = 130100 const m___MAC_13_2 = 130200 const m___MAC_13_3 = 130300 const m___MAC_13_4 = 130400 const m___MAC_13_5 = 130500 const m___MAC_13_6 = 130600 const m___MAC_13_7 = 130700 const m___MAC_14_0 = 140000 const m___MAC_14_1 = 140100 const m___MAC_14_2 = 140200 const m___MAC_14_3 = 140300 const m___MAC_14_4 = 140400 const m___MAC_14_5 = 140500 const m___MAC_14_6 = 140600 const m___MAC_14_7 = 140700 const m___MAC_15_0 = 150000 const m___MAC_15_1 = 150100 const m___MAC_15_2 = 150200 const m___MAC_15_3 = 150300 const m___MAC_15_4 = 150400 const m___MAC_OS_X_VERSION_MAX_ALLOWED = "__MAC_15_4" const m___MAC_OS_X_VERSION_MIN_REQUIRED = "__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__" const m___MEMORY_SCOPE_DEVICE = 1 const m___MEMORY_SCOPE_SINGLE = 4 const m___MEMORY_SCOPE_SYSTEM = 0 const m___MEMORY_SCOPE_WRKGRP = 2 const m___MEMORY_SCOPE_WVFRNT = 3 const m___MMX__ = 1 const m___NO_INLINE__ = 1 const m___NO_MATH_ERRNO__ = 1 const m___NO_MATH_INLINES = 1 const m___OBJC_BOOL_IS_BOOL = 0 const m___OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES = 3 const m___OPENCL_MEMORY_SCOPE_DEVICE = 2 const m___OPENCL_MEMORY_SCOPE_SUB_GROUP = 4 const m___OPENCL_MEMORY_SCOPE_WORK_GROUP = 1 const m___OPENCL_MEMORY_SCOPE_WORK_ITEM = 0 const m___ORDER_BIG_ENDIAN__ = 4321 const m___ORDER_LITTLE_ENDIAN__ = 1234 const m___ORDER_PDP_ENDIAN__ = 3412 const m___PIC__ = 2 const m___POINTER_WIDTH__ = 64 const m___PRAGMA_REDEFINE_EXTNAME = 1 const m___PRETTY_FUNCTION__ = "__func__" const m___PTHREAD_ATTR_SIZE__ = 56 const m___PTHREAD_CONDATTR_SIZE__ = 8 const m___PTHREAD_COND_SIZE__ = 40 const m___PTHREAD_MUTEXATTR_SIZE__ = 8 const m___PTHREAD_MUTEX_SIZE__ = 56 const m___PTHREAD_ONCE_SIZE__ = 8 const m___PTHREAD_RWLOCKATTR_SIZE__ = 16 const m___PTHREAD_RWLOCK_SIZE__ = 192 const m___PTHREAD_SIZE__ = 8176 const m___PTRDIFF_FMTd__ = "ld" const m___PTRDIFF_FMTi__ = "li" const m___PTRDIFF_MAX__ = 9223372036854775807 const m___PTRDIFF_WIDTH__ = 64 const m___SCHAR_MAX__ = 127 const m___SEG_FS = 1 const m___SEG_GS = 1 const m___SHRT_MAX__ = 32767 const m___SHRT_WIDTH__ = 16 const m___SIG_ATOMIC_MAX__ = 2147483647 const m___SIG_ATOMIC_WIDTH__ = 32 const m___SIZEOF_DOUBLE__ = 8 const m___SIZEOF_FLOAT__ = 4 const m___SIZEOF_INT128__ = 16 const m___SIZEOF_INT__ = 4 const m___SIZEOF_LONG_DOUBLE__ = 8 const m___SIZEOF_LONG_LONG__ = 8 const m___SIZEOF_LONG__ = 8 const m___SIZEOF_POINTER__ = 8 const m___SIZEOF_PTRDIFF_T__ = 8 const m___SIZEOF_SHORT__ = 2 const m___SIZEOF_SIZE_T__ = 8 const m___SIZEOF_WCHAR_T__ = 4 const m___SIZEOF_WINT_T__ = 4 const m___SIZE_FMTX__ = "lX" const m___SIZE_FMTo__ = "lo" const m___SIZE_FMTu__ = "lu" const m___SIZE_FMTx__ = "lx" const m___SIZE_MAX__ = 18446744073709551615 const m___SIZE_WIDTH__ = 64 const m___SSE2_MATH__ = 1 const m___SSE2__ = 1 const m___SSE3__ = 1 const m___SSE4_1__ = 1 const m___SSE_MATH__ = 1 const m___SSE__ = 1 const m___SSP__ = 1 const m___SSSE3__ = 1 const m___STDC_EMBED_EMPTY__ = 2 const m___STDC_EMBED_FOUND__ = 1 const m___STDC_EMBED_NOT_FOUND__ = 0 const m___STDC_HOSTED__ = 1 const m___STDC_NO_THREADS__ = 1 const m___STDC_UTF_16__ = 1 const m___STDC_UTF_32__ = 1 const m___STDC_VERSION__ = 201710 const m___STDC_WANT_LIB_EXT1__ = 1 const m___STDC__ = 1 const m___TVOS_10_0 = 100000 const m___TVOS_10_0_1 = 100001 const m___TVOS_10_1 = 100100 const m___TVOS_10_2 = 100200 const m___TVOS_11_0 = 110000 const m___TVOS_11_1 = 110100 const m___TVOS_11_2 = 110200 const m___TVOS_11_3 = 110300 const m___TVOS_11_4 = 110400 const m___TVOS_12_0 = 120000 const m___TVOS_12_1 = 120100 const m___TVOS_12_2 = 120200 const m___TVOS_12_3 = 120300 const m___TVOS_12_4 = 120400 const m___TVOS_13_0 = 130000 const m___TVOS_13_2 = 130200 const m___TVOS_13_3 = 130300 const m___TVOS_13_4 = 130400 const m___TVOS_14_0 = 140000 const m___TVOS_14_1 = 140100 const m___TVOS_14_2 = 140200 const m___TVOS_14_3 = 140300 const m___TVOS_14_5 = 140500 const m___TVOS_14_6 = 140600 const m___TVOS_14_7 = 140700 const m___TVOS_15_0 = 150000 const m___TVOS_15_1 = 150100 const m___TVOS_15_2 = 150200 const m___TVOS_15_3 = 150300 const m___TVOS_15_4 = 150400 const m___TVOS_15_5 = 150500 const m___TVOS_15_6 = 150600 const m___TVOS_16_0 = 160000 const m___TVOS_16_1 = 160100 const m___TVOS_16_2 = 160200 const m___TVOS_16_3 = 160300 const m___TVOS_16_4 = 160400 const m___TVOS_16_5 = 160500 const m___TVOS_16_6 = 160600 const m___TVOS_17_0 = 170000 const m___TVOS_17_1 = 170100 const m___TVOS_17_2 = 170200 const m___TVOS_17_3 = 170300 const m___TVOS_17_4 = 170400 const m___TVOS_17_5 = 170500 const m___TVOS_17_6 = 170600 const m___TVOS_18_0 = 180000 const m___TVOS_18_1 = 180100 const m___TVOS_18_2 = 180200 const m___TVOS_18_3 = 180300 const m___TVOS_18_4 = 180400 const m___TVOS_9_0 = 90000 const m___TVOS_9_1 = 90100 const m___TVOS_9_2 = 90200 const m___UINT16_FMTX__ = "hX" const m___UINT16_FMTo__ = "ho" const m___UINT16_FMTu__ = "hu" const m___UINT16_FMTx__ = "hx" const m___UINT16_MAX__ = 65535 const m___UINT32_C_SUFFIX__ = "U" const m___UINT32_FMTX__ = "X" const m___UINT32_FMTo__ = "o" const m___UINT32_FMTu__ = "u" const m___UINT32_FMTx__ = "x" const m___UINT32_MAX__ = 4294967295 const m___UINT64_C_SUFFIX__ = "ULL" const m___UINT64_FMTX__ = "llX" const m___UINT64_FMTo__ = "llo" const m___UINT64_FMTu__ = "llu" const m___UINT64_FMTx__ = "llx" const m___UINT64_MAX__ = "18446744073709551615U" const m___UINT8_FMTX__ = "hhX" const m___UINT8_FMTo__ = "hho" const m___UINT8_FMTu__ = "hhu" const m___UINT8_FMTx__ = "hhx" const m___UINT8_MAX__ = 255 const m___UINTMAX_C_SUFFIX__ = "UL" const m___UINTMAX_FMTX__ = "lX" const m___UINTMAX_FMTo__ = "lo" const m___UINTMAX_FMTu__ = "lu" const m___UINTMAX_FMTx__ = "lx" const m___UINTMAX_MAX__ = 18446744073709551615 const m___UINTMAX_WIDTH__ = 64 const m___UINTPTR_FMTX__ = "lX" const m___UINTPTR_FMTo__ = "lo" const m___UINTPTR_FMTu__ = "lu" const m___UINTPTR_FMTx__ = "lx" const m___UINTPTR_MAX__ = 18446744073709551615 const m___UINTPTR_WIDTH__ = 64 const m___UINT_FAST16_FMTX__ = "hX" const m___UINT_FAST16_FMTo__ = "ho" const m___UINT_FAST16_FMTu__ = "hu" const m___UINT_FAST16_FMTx__ = "hx" const m___UINT_FAST16_MAX__ = 65535 const m___UINT_FAST32_FMTX__ = "X" const m___UINT_FAST32_FMTo__ = "o" const m___UINT_FAST32_FMTu__ = "u" const m___UINT_FAST32_FMTx__ = "x" const m___UINT_FAST32_MAX__ = 4294967295 const m___UINT_FAST64_FMTX__ = "llX" const m___UINT_FAST64_FMTo__ = "llo" const m___UINT_FAST64_FMTu__ = "llu" const m___UINT_FAST64_FMTx__ = "llx" const m___UINT_FAST64_MAX__ = "18446744073709551615U" const m___UINT_FAST8_FMTX__ = "hhX" const m___UINT_FAST8_FMTo__ = "hho" const m___UINT_FAST8_FMTu__ = "hhu" const m___UINT_FAST8_FMTx__ = "hhx" const m___UINT_FAST8_MAX__ = 255 const m___UINT_LEAST16_FMTX__ = "hX" const m___UINT_LEAST16_FMTo__ = "ho" const m___UINT_LEAST16_FMTu__ = "hu" const m___UINT_LEAST16_FMTx__ = "hx" const m___UINT_LEAST16_MAX__ = 65535 const m___UINT_LEAST32_FMTX__ = "X" const m___UINT_LEAST32_FMTo__ = "o" const m___UINT_LEAST32_FMTu__ = "u" const m___UINT_LEAST32_FMTx__ = "x" const m___UINT_LEAST32_MAX__ = 4294967295 const m___UINT_LEAST64_FMTX__ = "llX" const m___UINT_LEAST64_FMTo__ = "llo" const m___UINT_LEAST64_FMTu__ = "llu" const m___UINT_LEAST64_FMTx__ = "llx" const m___UINT_LEAST64_MAX = "UINT64_MAX" const m___UINT_LEAST64_MAX__ = "18446744073709551615U" const m___UINT_LEAST8_FMTX__ = "hhX" const m___UINT_LEAST8_FMTo__ = "hho" const m___UINT_LEAST8_FMTu__ = "hhu" const m___UINT_LEAST8_FMTx__ = "hhx" const m___UINT_LEAST8_MAX__ = 255 const m___USER_LABEL_PREFIX__ = "_" const m___VERSION__ = "Apple LLVM 17.0.0 (clang-1700.0.13.3)" const m___VISIONOS_1_0 = 10000 const m___VISIONOS_1_1 = 10100 const m___VISIONOS_1_2 = 10200 const m___VISIONOS_1_3 = 10300 const m___VISIONOS_2_0 = 20000 const m___VISIONOS_2_1 = 20100 const m___VISIONOS_2_2 = 20200 const m___VISIONOS_2_3 = 20300 const m___VISIONOS_2_4 = 20400 const m___WATCHOS_10_0 = 100000 const m___WATCHOS_10_1 = 100100 const m___WATCHOS_10_2 = 100200 const m___WATCHOS_10_3 = 100300 const m___WATCHOS_10_4 = 100400 const m___WATCHOS_10_5 = 100500 const m___WATCHOS_10_6 = 100600 const m___WATCHOS_10_7 = 100700 const m___WATCHOS_11_0 = 110000 const m___WATCHOS_11_1 = 110100 const m___WATCHOS_11_2 = 110200 const m___WATCHOS_11_3 = 110300 const m___WATCHOS_11_4 = 110400 const m___WATCHOS_1_0 = 10000 const m___WATCHOS_2_0 = 20000 const m___WATCHOS_2_1 = 20100 const m___WATCHOS_2_2 = 20200 const m___WATCHOS_3_0 = 30000 const m___WATCHOS_3_1 = 30100 const m___WATCHOS_3_1_1 = 30101 const m___WATCHOS_3_2 = 30200 const m___WATCHOS_4_0 = 40000 const m___WATCHOS_4_1 = 40100 const m___WATCHOS_4_2 = 40200 const m___WATCHOS_4_3 = 40300 const m___WATCHOS_5_0 = 50000 const m___WATCHOS_5_1 = 50100 const m___WATCHOS_5_2 = 50200 const m___WATCHOS_5_3 = 50300 const m___WATCHOS_6_0 = 60000 const m___WATCHOS_6_1 = 60100 const m___WATCHOS_6_2 = 60200 const m___WATCHOS_7_0 = 70000 const m___WATCHOS_7_1 = 70100 const m___WATCHOS_7_2 = 70200 const m___WATCHOS_7_3 = 70300 const m___WATCHOS_7_4 = 70400 const m___WATCHOS_7_5 = 70500 const m___WATCHOS_7_6 = 70600 const m___WATCHOS_8_0 = 80000 const m___WATCHOS_8_1 = 80100 const m___WATCHOS_8_3 = 80300 const m___WATCHOS_8_4 = 80400 const m___WATCHOS_8_5 = 80500 const m___WATCHOS_8_6 = 80600 const m___WATCHOS_8_7 = 80700 const m___WATCHOS_8_8 = 80800 const m___WATCHOS_9_0 = 90000 const m___WATCHOS_9_1 = 90100 const m___WATCHOS_9_2 = 90200 const m___WATCHOS_9_3 = 90300 const m___WATCHOS_9_4 = 90400 const m___WATCHOS_9_5 = 90500 const m___WATCHOS_9_6 = 90600 const m___WCHAR_MAX__ = 2147483647 const m___WCHAR_TYPE__ = "int" const m___WCHAR_WIDTH__ = 32 const m___WINT_MAX__ = 2147483647 const m___WINT_TYPE__ = "int" const m___WINT_WIDTH__ = 32 const m___amd64 = 1 const m___amd64__ = 1 const m___apple_build_version__ = 17000013 const m___clang__ = 1 const m___clang_literal_encoding__ = "UTF-8" const m___clang_major__ = 17 const m___clang_minor__ = 0 const m___clang_patchlevel__ = 0 const m___clang_version__ = "17.0.0 (clang-1700.0.13.3)" const m___clang_wide_literal_encoding__ = "UTF-32" const m___code_model_small__ = 1 const m___const = "const" const m___core2 = 1 const m___core2__ = 1 const m___has_bounds_safety_attributes = 0 const m___has_ptrcheck = 0 const m___has_safe_buffers = 0 const m___header_inline = "inline" const m___llvm__ = 1 const m___nonnull = "_Nonnull" const m___null_unspecified = "_Null_unspecified" const m___nullable = "_Nullable" const m___pic__ = 2 const m___restrict = "restrict" const m___restrict_arr = "restrict" const m___signed = "signed" const m___tune_core2__ = 1 const m___volatile = "volatile" const m___x86_64 = 1 const m___x86_64__ = 1 const m_local = "static" const m_ru_first = "ru_ixrss" const m_ru_last = "ru_nivcsw" const m_sv_onstack = "sv_flags" const m_z_off64_t = "z_off_t" const m_z_off_t = "off_t" const m_zmemcmp = "memcmp" const m_zmemcpy = "memcpy" type t__builtin_va_list = uintptr type t__predefined_size_t = uint64 type t__predefined_wchar_t = int32 type t__predefined_ptrdiff_t = int64 type Tptrdiff_t = int64 type Tsize_t = uint64 type Twchar_t = int32 type Tmax_align_t = float64 type Tz_size_t = uint64 type TByte = uint8 type TuInt = uint32 type TuLong = uint64 type TBytef = uint8 type Tcharf = int8 type Tintf = int32 type TuIntf = uint32 type TuLongf = uint64 type Tvoidpc = uintptr type Tvoidpf = uintptr type Tvoidp = uintptr type Tz_crc_t = uint32 type t__int8_t = int8 type t__uint8_t = uint8 type t__int16_t = int16 type t__uint16_t = uint16 type t__int32_t = int32 type t__uint32_t = uint32 type t__int64_t = int64 type t__uint64_t = uint64 type t__darwin_intptr_t = int64 type t__darwin_natural_t = uint32 type t__darwin_ct_rune_t = int32 type t__mbstate_t = struct { F_mbstateL [0]int64 F__mbstate8 [128]int8 } type t__darwin_mbstate_t = struct { F_mbstateL [0]int64 F__mbstate8 [128]int8 } type t__darwin_ptrdiff_t = int64 type t__darwin_size_t = uint64 type t__darwin_va_list = uintptr type t__darwin_wchar_t = int32 type t__darwin_rune_t = int32 type t__darwin_wint_t = int32 type t__darwin_clock_t = uint64 type t__darwin_socklen_t = uint32 type t__darwin_ssize_t = int64 type t__darwin_time_t = int64 type Tint8_t = int8 type Tint16_t = int16 type Tint32_t = int32 type Tint64_t = int64 type Tu_int8_t = uint8 type Tu_int16_t = uint16 type Tu_int32_t = uint32 type Tu_int64_t = uint64 type Tregister_t = int64 type Tintptr_t = int64 type Tuintptr_t = uint64 type Tuser_addr_t = uint64 type Tuser_size_t = uint64 type Tuser_ssize_t = int64 type Tuser_long_t = int64 type Tuser_ulong_t = uint64 type Tuser_time_t = int64 type Tuser_off_t = int64 type Tsyscall_arg_t = uint64 type t__darwin_blkcnt_t = int64 type t__darwin_blksize_t = int32 type t__darwin_dev_t = int32 type t__darwin_fsblkcnt_t = uint32 type t__darwin_fsfilcnt_t = uint32 type t__darwin_gid_t = uint32 type t__darwin_id_t = uint32 type t__darwin_ino64_t = uint64 type t__darwin_ino_t = uint64 type t__darwin_mach_port_name_t = uint32 type t__darwin_mach_port_t = uint32 type t__darwin_mode_t = uint16 type t__darwin_off_t = int64 type t__darwin_pid_t = int32 type t__darwin_sigset_t = uint32 type t__darwin_suseconds_t = int32 type t__darwin_uid_t = uint32 type t__darwin_useconds_t = uint32 type t__darwin_uuid_t = [16]uint8 type t__darwin_uuid_string_t = [37]int8 type t__darwin_pthread_handler_rec = struct { F__routine uintptr F__arg uintptr F__next uintptr } type T_opaque_pthread_attr_t = struct { F__sig int64 F__opaque [56]int8 } type T_opaque_pthread_cond_t = struct { F__sig int64 F__opaque [40]int8 } type T_opaque_pthread_condattr_t = struct { F__sig int64 F__opaque [8]int8 } type T_opaque_pthread_mutex_t = struct { F__sig int64 F__opaque [56]int8 } type T_opaque_pthread_mutexattr_t = struct { F__sig int64 F__opaque [8]int8 } type T_opaque_pthread_once_t = struct { F__sig int64 F__opaque [8]int8 } type T_opaque_pthread_rwlock_t = struct { F__sig int64 F__opaque [192]int8 } type T_opaque_pthread_rwlockattr_t = struct { F__sig int64 F__opaque [16]int8 } type T_opaque_pthread_t = struct { F__sig int64 F__cleanup_stack uintptr F__opaque [8176]int8 } type t__darwin_pthread_attr_t = struct { F__sig int64 F__opaque [56]int8 } type t__darwin_pthread_cond_t = struct { F__sig int64 F__opaque [40]int8 } type t__darwin_pthread_condattr_t = struct { F__sig int64 F__opaque [8]int8 } type t__darwin_pthread_key_t = uint64 type t__darwin_pthread_mutex_t = struct { F__sig int64 F__opaque [56]int8 } type t__darwin_pthread_mutexattr_t = struct { F__sig int64 F__opaque [8]int8 } type t__darwin_pthread_once_t = struct { F__sig int64 F__opaque [8]int8 } type t__darwin_pthread_rwlock_t = struct { F__sig int64 F__opaque [192]int8 } type t__darwin_pthread_rwlockattr_t = struct { F__sig int64 F__opaque [16]int8 } type t__darwin_pthread_t = uintptr type Tu_char = uint8 type Tu_short = uint16 type Tu_int = uint32 type Tu_long = uint64 type Tushort = uint16 type Tuint = uint32 type Tu_quad_t = uint64 type Tquad_t = int64 type Tqaddr_t = uintptr type Tcaddr_t = uintptr type Tdaddr_t = int32 type Tdev_t = int32 type Tfixpt_t = uint32 type Tblkcnt_t = int64 type Tblksize_t = int32 type Tgid_t = uint32 type Tin_addr_t = uint32 type Tin_port_t = uint16 type Tino_t = uint64 type Tino64_t = uint64 type Tkey_t = int32 type Tmode_t = uint16 type Tnlink_t = uint16 type Tid_t = uint32 type Tpid_t = int32 type Toff_t = int64 type Tsegsz_t = int32 type Tswblk_t = int32 type Tuid_t = uint32 type Tclock_t = uint64 type Tssize_t = int64 type Ttime_t = int64 type Tuseconds_t = uint32 type Tsuseconds_t = int32 type Trsize_t = uint64 type Terrno_t = int32 type Tfd_set = struct { Ffds_bits [32]t__int32_t } type Tfd_mask = int32 type Tpthread_attr_t = struct { F__sig int64 F__opaque [56]int8 } type Tpthread_cond_t = struct { F__sig int64 F__opaque [40]int8 } type Tpthread_condattr_t = struct { F__sig int64 F__opaque [8]int8 } type Tpthread_mutex_t = struct { F__sig int64 F__opaque [56]int8 } type Tpthread_mutexattr_t = struct { F__sig int64 F__opaque [8]int8 } type Tpthread_once_t = struct { F__sig int64 F__opaque [8]int8 } type Tpthread_rwlock_t = struct { F__sig int64 F__opaque [192]int8 } type Tpthread_rwlockattr_t = struct { F__sig int64 F__opaque [16]int8 } type Tpthread_t = uintptr type Tpthread_key_t = uint64 type Tfsblkcnt_t = uint32 type Tfsfilcnt_t = uint32 type t__gnuc_va_list = uintptr type Tva_list = uintptr type t__darwin_nl_item = int32 type t__darwin_wctrans_t = int32 type t__darwin_wctype_t = uint32 type Taccessx_descriptor = struct { Fad_name_offset uint32 Fad_flags int32 Fad_pad [2]int32 } type Tuint64_t = uint64 type Tuint32_t = uint32 type Ttimespec = struct { Ftv_sec t__darwin_time_t Ftv_nsec int64 } type Ttimeval = struct { Ftv_sec t__darwin_time_t Ftv_usec t__darwin_suseconds_t } type Tsigset_t = uint32 type Tuuid_t = [16]uint8 type Talloc_func = uintptr type Tfree_func = uintptr type Tz_stream = struct { Fnext_in uintptr Favail_in TuInt Ftotal_in TuLong Fnext_out uintptr Favail_out TuInt Ftotal_out TuLong Fmsg uintptr Fstate uintptr Fzalloc Talloc_func Fzfree Tfree_func Fopaque Tvoidpf Fdata_type int32 Fadler TuLong Freserved TuLong } type Tz_stream_s = Tz_stream type Tz_streamp = uintptr type Tgz_header = struct { Ftext int32 Ftime TuLong Fxflags int32 Fos int32 Fextra uintptr Fextra_len TuInt Fextra_max TuInt Fname uintptr Fname_max TuInt Fcomment uintptr Fcomm_max TuInt Fhcrc int32 Fdone int32 } type Tgz_header_s = Tgz_header type Tgz_headerp = uintptr type Tin_func = uintptr type Tout_func = uintptr type TgzFile = uintptr type TgzFile_s = struct { Fhave uint32 Fnext uintptr Fpos Toff_t } type Tidtype_t = int32 const _P_ALL = 0 const _P_PID = 1 const _P_PGID = 2 type Tsig_atomic_t = int32 type t__darwin_i386_thread_state = struct { F__eax uint32 F__ebx uint32 F__ecx uint32 F__edx uint32 F__edi uint32 F__esi uint32 F__ebp uint32 F__esp uint32 F__ss uint32 F__eflags uint32 F__eip uint32 F__cs uint32 F__ds uint32 F__es uint32 F__fs uint32 F__gs uint32 } type t__darwin_fp_control = struct { F__ccgo0 uint16 } type t__darwin_fp_control_t = struct { F__ccgo0 uint16 } type t__darwin_fp_status = struct { F__ccgo0 uint16 } type t__darwin_fp_status_t = struct { F__ccgo0 uint16 } type t__darwin_mmst_reg = struct { F__mmst_reg [10]int8 F__mmst_rsrv [6]int8 } type t__darwin_xmm_reg = struct { F__xmm_reg [16]int8 } type t__darwin_ymm_reg = struct { F__ymm_reg [32]int8 } type t__darwin_zmm_reg = struct { F__zmm_reg [64]int8 } type t__darwin_opmask_reg = struct { F__opmask_reg [8]int8 } type t__darwin_i386_float_state = struct { F__fpu_reserved [2]int32 F__fpu_fcw t__darwin_fp_control F__fpu_fsw t__darwin_fp_status F__fpu_ftw t__uint8_t F__fpu_rsrv1 t__uint8_t F__fpu_fop t__uint16_t F__fpu_ip t__uint32_t F__fpu_cs t__uint16_t F__fpu_rsrv2 t__uint16_t F__fpu_dp t__uint32_t F__fpu_ds t__uint16_t F__fpu_rsrv3 t__uint16_t F__fpu_mxcsr t__uint32_t F__fpu_mxcsrmask t__uint32_t F__fpu_stmm0 t__darwin_mmst_reg F__fpu_stmm1 t__darwin_mmst_reg F__fpu_stmm2 t__darwin_mmst_reg F__fpu_stmm3 t__darwin_mmst_reg F__fpu_stmm4 t__darwin_mmst_reg F__fpu_stmm5 t__darwin_mmst_reg F__fpu_stmm6 t__darwin_mmst_reg F__fpu_stmm7 t__darwin_mmst_reg F__fpu_xmm0 t__darwin_xmm_reg F__fpu_xmm1 t__darwin_xmm_reg F__fpu_xmm2 t__darwin_xmm_reg F__fpu_xmm3 t__darwin_xmm_reg F__fpu_xmm4 t__darwin_xmm_reg F__fpu_xmm5 t__darwin_xmm_reg F__fpu_xmm6 t__darwin_xmm_reg F__fpu_xmm7 t__darwin_xmm_reg F__fpu_rsrv4 [224]int8 F__fpu_reserved1 int32 } type t__darwin_i386_avx_state = struct { F__fpu_reserved [2]int32 F__fpu_fcw t__darwin_fp_control F__fpu_fsw t__darwin_fp_status F__fpu_ftw t__uint8_t F__fpu_rsrv1 t__uint8_t F__fpu_fop t__uint16_t F__fpu_ip t__uint32_t F__fpu_cs t__uint16_t F__fpu_rsrv2 t__uint16_t F__fpu_dp t__uint32_t F__fpu_ds t__uint16_t F__fpu_rsrv3 t__uint16_t F__fpu_mxcsr t__uint32_t F__fpu_mxcsrmask t__uint32_t F__fpu_stmm0 t__darwin_mmst_reg F__fpu_stmm1 t__darwin_mmst_reg F__fpu_stmm2 t__darwin_mmst_reg F__fpu_stmm3 t__darwin_mmst_reg F__fpu_stmm4 t__darwin_mmst_reg F__fpu_stmm5 t__darwin_mmst_reg F__fpu_stmm6 t__darwin_mmst_reg F__fpu_stmm7 t__darwin_mmst_reg F__fpu_xmm0 t__darwin_xmm_reg F__fpu_xmm1 t__darwin_xmm_reg F__fpu_xmm2 t__darwin_xmm_reg F__fpu_xmm3 t__darwin_xmm_reg F__fpu_xmm4 t__darwin_xmm_reg F__fpu_xmm5 t__darwin_xmm_reg F__fpu_xmm6 t__darwin_xmm_reg F__fpu_xmm7 t__darwin_xmm_reg F__fpu_rsrv4 [224]int8 F__fpu_reserved1 int32 F__avx_reserved1 [64]int8 F__fpu_ymmh0 t__darwin_xmm_reg F__fpu_ymmh1 t__darwin_xmm_reg F__fpu_ymmh2 t__darwin_xmm_reg F__fpu_ymmh3 t__darwin_xmm_reg F__fpu_ymmh4 t__darwin_xmm_reg F__fpu_ymmh5 t__darwin_xmm_reg F__fpu_ymmh6 t__darwin_xmm_reg F__fpu_ymmh7 t__darwin_xmm_reg } type t__darwin_i386_avx512_state = struct { F__fpu_reserved [2]int32 F__fpu_fcw t__darwin_fp_control F__fpu_fsw t__darwin_fp_status F__fpu_ftw t__uint8_t F__fpu_rsrv1 t__uint8_t F__fpu_fop t__uint16_t F__fpu_ip t__uint32_t F__fpu_cs t__uint16_t F__fpu_rsrv2 t__uint16_t F__fpu_dp t__uint32_t F__fpu_ds t__uint16_t F__fpu_rsrv3 t__uint16_t F__fpu_mxcsr t__uint32_t F__fpu_mxcsrmask t__uint32_t F__fpu_stmm0 t__darwin_mmst_reg F__fpu_stmm1 t__darwin_mmst_reg F__fpu_stmm2 t__darwin_mmst_reg F__fpu_stmm3 t__darwin_mmst_reg F__fpu_stmm4 t__darwin_mmst_reg F__fpu_stmm5 t__darwin_mmst_reg F__fpu_stmm6 t__darwin_mmst_reg F__fpu_stmm7 t__darwin_mmst_reg F__fpu_xmm0 t__darwin_xmm_reg F__fpu_xmm1 t__darwin_xmm_reg F__fpu_xmm2 t__darwin_xmm_reg F__fpu_xmm3 t__darwin_xmm_reg F__fpu_xmm4 t__darwin_xmm_reg F__fpu_xmm5 t__darwin_xmm_reg F__fpu_xmm6 t__darwin_xmm_reg F__fpu_xmm7 t__darwin_xmm_reg F__fpu_rsrv4 [224]int8 F__fpu_reserved1 int32 F__avx_reserved1 [64]int8 F__fpu_ymmh0 t__darwin_xmm_reg F__fpu_ymmh1 t__darwin_xmm_reg F__fpu_ymmh2 t__darwin_xmm_reg F__fpu_ymmh3 t__darwin_xmm_reg F__fpu_ymmh4 t__darwin_xmm_reg F__fpu_ymmh5 t__darwin_xmm_reg F__fpu_ymmh6 t__darwin_xmm_reg F__fpu_ymmh7 t__darwin_xmm_reg F__fpu_k0 t__darwin_opmask_reg F__fpu_k1 t__darwin_opmask_reg F__fpu_k2 t__darwin_opmask_reg F__fpu_k3 t__darwin_opmask_reg F__fpu_k4 t__darwin_opmask_reg F__fpu_k5 t__darwin_opmask_reg F__fpu_k6 t__darwin_opmask_reg F__fpu_k7 t__darwin_opmask_reg F__fpu_zmmh0 t__darwin_ymm_reg F__fpu_zmmh1 t__darwin_ymm_reg F__fpu_zmmh2 t__darwin_ymm_reg F__fpu_zmmh3 t__darwin_ymm_reg F__fpu_zmmh4 t__darwin_ymm_reg F__fpu_zmmh5 t__darwin_ymm_reg F__fpu_zmmh6 t__darwin_ymm_reg F__fpu_zmmh7 t__darwin_ymm_reg } type t__darwin_i386_exception_state = struct { F__trapno t__uint16_t F__cpu t__uint16_t F__err t__uint32_t F__faultvaddr t__uint32_t } type t__darwin_x86_debug_state32 = struct { F__dr0 uint32 F__dr1 uint32 F__dr2 uint32 F__dr3 uint32 F__dr4 uint32 F__dr5 uint32 F__dr6 uint32 F__dr7 uint32 } type t__x86_instruction_state = struct { F__insn_stream_valid_bytes int32 F__insn_offset int32 F__out_of_synch int32 F__insn_bytes [2380]t__uint8_t F__insn_cacheline [64]t__uint8_t } type t__last_branch_record = struct { F__from_ip t__uint64_t F__to_ip t__uint64_t F__ccgo16 uint32 } type t__last_branch_state = struct { F__lbr_count int32 F__ccgo4 uint32 F__lbrs [32]t__last_branch_record } type t__x86_pagein_state = struct { F__pagein_error int32 } type t__darwin_x86_thread_state64 = struct { F__rax t__uint64_t F__rbx t__uint64_t F__rcx t__uint64_t F__rdx t__uint64_t F__rdi t__uint64_t F__rsi t__uint64_t F__rbp t__uint64_t F__rsp t__uint64_t F__r8 t__uint64_t F__r9 t__uint64_t F__r10 t__uint64_t F__r11 t__uint64_t F__r12 t__uint64_t F__r13 t__uint64_t F__r14 t__uint64_t F__r15 t__uint64_t F__rip t__uint64_t F__rflags t__uint64_t F__cs t__uint64_t F__fs t__uint64_t F__gs t__uint64_t } type t__darwin_x86_thread_full_state64 = struct { F__ss64 t__darwin_x86_thread_state64 F__ds t__uint64_t F__es t__uint64_t F__ss t__uint64_t F__gsbase t__uint64_t } type t__darwin_x86_float_state64 = struct { F__fpu_reserved [2]int32 F__fpu_fcw t__darwin_fp_control F__fpu_fsw t__darwin_fp_status F__fpu_ftw t__uint8_t F__fpu_rsrv1 t__uint8_t F__fpu_fop t__uint16_t F__fpu_ip t__uint32_t F__fpu_cs t__uint16_t F__fpu_rsrv2 t__uint16_t F__fpu_dp t__uint32_t F__fpu_ds t__uint16_t F__fpu_rsrv3 t__uint16_t F__fpu_mxcsr t__uint32_t F__fpu_mxcsrmask t__uint32_t F__fpu_stmm0 t__darwin_mmst_reg F__fpu_stmm1 t__darwin_mmst_reg F__fpu_stmm2 t__darwin_mmst_reg F__fpu_stmm3 t__darwin_mmst_reg F__fpu_stmm4 t__darwin_mmst_reg F__fpu_stmm5 t__darwin_mmst_reg F__fpu_stmm6 t__darwin_mmst_reg F__fpu_stmm7 t__darwin_mmst_reg F__fpu_xmm0 t__darwin_xmm_reg F__fpu_xmm1 t__darwin_xmm_reg F__fpu_xmm2 t__darwin_xmm_reg F__fpu_xmm3 t__darwin_xmm_reg F__fpu_xmm4 t__darwin_xmm_reg F__fpu_xmm5 t__darwin_xmm_reg F__fpu_xmm6 t__darwin_xmm_reg F__fpu_xmm7 t__darwin_xmm_reg F__fpu_xmm8 t__darwin_xmm_reg F__fpu_xmm9 t__darwin_xmm_reg F__fpu_xmm10 t__darwin_xmm_reg F__fpu_xmm11 t__darwin_xmm_reg F__fpu_xmm12 t__darwin_xmm_reg F__fpu_xmm13 t__darwin_xmm_reg F__fpu_xmm14 t__darwin_xmm_reg F__fpu_xmm15 t__darwin_xmm_reg F__fpu_rsrv4 [96]int8 F__fpu_reserved1 int32 } type t__darwin_x86_avx_state64 = struct { F__fpu_reserved [2]int32 F__fpu_fcw t__darwin_fp_control F__fpu_fsw t__darwin_fp_status F__fpu_ftw t__uint8_t F__fpu_rsrv1 t__uint8_t F__fpu_fop t__uint16_t F__fpu_ip t__uint32_t F__fpu_cs t__uint16_t F__fpu_rsrv2 t__uint16_t F__fpu_dp t__uint32_t F__fpu_ds t__uint16_t F__fpu_rsrv3 t__uint16_t F__fpu_mxcsr t__uint32_t F__fpu_mxcsrmask t__uint32_t F__fpu_stmm0 t__darwin_mmst_reg F__fpu_stmm1 t__darwin_mmst_reg F__fpu_stmm2 t__darwin_mmst_reg F__fpu_stmm3 t__darwin_mmst_reg F__fpu_stmm4 t__darwin_mmst_reg F__fpu_stmm5 t__darwin_mmst_reg F__fpu_stmm6 t__darwin_mmst_reg F__fpu_stmm7 t__darwin_mmst_reg F__fpu_xmm0 t__darwin_xmm_reg F__fpu_xmm1 t__darwin_xmm_reg F__fpu_xmm2 t__darwin_xmm_reg F__fpu_xmm3 t__darwin_xmm_reg F__fpu_xmm4 t__darwin_xmm_reg F__fpu_xmm5 t__darwin_xmm_reg F__fpu_xmm6 t__darwin_xmm_reg F__fpu_xmm7 t__darwin_xmm_reg F__fpu_xmm8 t__darwin_xmm_reg F__fpu_xmm9 t__darwin_xmm_reg F__fpu_xmm10 t__darwin_xmm_reg F__fpu_xmm11 t__darwin_xmm_reg F__fpu_xmm12 t__darwin_xmm_reg F__fpu_xmm13 t__darwin_xmm_reg F__fpu_xmm14 t__darwin_xmm_reg F__fpu_xmm15 t__darwin_xmm_reg F__fpu_rsrv4 [96]int8 F__fpu_reserved1 int32 F__avx_reserved1 [64]int8 F__fpu_ymmh0 t__darwin_xmm_reg F__fpu_ymmh1 t__darwin_xmm_reg F__fpu_ymmh2 t__darwin_xmm_reg F__fpu_ymmh3 t__darwin_xmm_reg F__fpu_ymmh4 t__darwin_xmm_reg F__fpu_ymmh5 t__darwin_xmm_reg F__fpu_ymmh6 t__darwin_xmm_reg F__fpu_ymmh7 t__darwin_xmm_reg F__fpu_ymmh8 t__darwin_xmm_reg F__fpu_ymmh9 t__darwin_xmm_reg F__fpu_ymmh10 t__darwin_xmm_reg F__fpu_ymmh11 t__darwin_xmm_reg F__fpu_ymmh12 t__darwin_xmm_reg F__fpu_ymmh13 t__darwin_xmm_reg F__fpu_ymmh14 t__darwin_xmm_reg F__fpu_ymmh15 t__darwin_xmm_reg } type t__darwin_x86_avx512_state64 = struct { F__fpu_reserved [2]int32 F__fpu_fcw t__darwin_fp_control F__fpu_fsw t__darwin_fp_status F__fpu_ftw t__uint8_t F__fpu_rsrv1 t__uint8_t F__fpu_fop t__uint16_t F__fpu_ip t__uint32_t F__fpu_cs t__uint16_t F__fpu_rsrv2 t__uint16_t F__fpu_dp t__uint32_t F__fpu_ds t__uint16_t F__fpu_rsrv3 t__uint16_t F__fpu_mxcsr t__uint32_t F__fpu_mxcsrmask t__uint32_t F__fpu_stmm0 t__darwin_mmst_reg F__fpu_stmm1 t__darwin_mmst_reg F__fpu_stmm2 t__darwin_mmst_reg F__fpu_stmm3 t__darwin_mmst_reg F__fpu_stmm4 t__darwin_mmst_reg F__fpu_stmm5 t__darwin_mmst_reg F__fpu_stmm6 t__darwin_mmst_reg F__fpu_stmm7 t__darwin_mmst_reg F__fpu_xmm0 t__darwin_xmm_reg F__fpu_xmm1 t__darwin_xmm_reg F__fpu_xmm2 t__darwin_xmm_reg F__fpu_xmm3 t__darwin_xmm_reg F__fpu_xmm4 t__darwin_xmm_reg F__fpu_xmm5 t__darwin_xmm_reg F__fpu_xmm6 t__darwin_xmm_reg F__fpu_xmm7 t__darwin_xmm_reg F__fpu_xmm8 t__darwin_xmm_reg F__fpu_xmm9 t__darwin_xmm_reg F__fpu_xmm10 t__darwin_xmm_reg F__fpu_xmm11 t__darwin_xmm_reg F__fpu_xmm12 t__darwin_xmm_reg F__fpu_xmm13 t__darwin_xmm_reg F__fpu_xmm14 t__darwin_xmm_reg F__fpu_xmm15 t__darwin_xmm_reg F__fpu_rsrv4 [96]int8 F__fpu_reserved1 int32 F__avx_reserved1 [64]int8 F__fpu_ymmh0 t__darwin_xmm_reg F__fpu_ymmh1 t__darwin_xmm_reg F__fpu_ymmh2 t__darwin_xmm_reg F__fpu_ymmh3 t__darwin_xmm_reg F__fpu_ymmh4 t__darwin_xmm_reg F__fpu_ymmh5 t__darwin_xmm_reg F__fpu_ymmh6 t__darwin_xmm_reg F__fpu_ymmh7 t__darwin_xmm_reg F__fpu_ymmh8 t__darwin_xmm_reg F__fpu_ymmh9 t__darwin_xmm_reg F__fpu_ymmh10 t__darwin_xmm_reg F__fpu_ymmh11 t__darwin_xmm_reg F__fpu_ymmh12 t__darwin_xmm_reg F__fpu_ymmh13 t__darwin_xmm_reg F__fpu_ymmh14 t__darwin_xmm_reg F__fpu_ymmh15 t__darwin_xmm_reg F__fpu_k0 t__darwin_opmask_reg F__fpu_k1 t__darwin_opmask_reg F__fpu_k2 t__darwin_opmask_reg F__fpu_k3 t__darwin_opmask_reg F__fpu_k4 t__darwin_opmask_reg F__fpu_k5 t__darwin_opmask_reg F__fpu_k6 t__darwin_opmask_reg F__fpu_k7 t__darwin_opmask_reg F__fpu_zmmh0 t__darwin_ymm_reg F__fpu_zmmh1 t__darwin_ymm_reg F__fpu_zmmh2 t__darwin_ymm_reg F__fpu_zmmh3 t__darwin_ymm_reg F__fpu_zmmh4 t__darwin_ymm_reg F__fpu_zmmh5 t__darwin_ymm_reg F__fpu_zmmh6 t__darwin_ymm_reg F__fpu_zmmh7 t__darwin_ymm_reg F__fpu_zmmh8 t__darwin_ymm_reg F__fpu_zmmh9 t__darwin_ymm_reg F__fpu_zmmh10 t__darwin_ymm_reg F__fpu_zmmh11 t__darwin_ymm_reg F__fpu_zmmh12 t__darwin_ymm_reg F__fpu_zmmh13 t__darwin_ymm_reg F__fpu_zmmh14 t__darwin_ymm_reg F__fpu_zmmh15 t__darwin_ymm_reg F__fpu_zmm16 t__darwin_zmm_reg F__fpu_zmm17 t__darwin_zmm_reg F__fpu_zmm18 t__darwin_zmm_reg F__fpu_zmm19 t__darwin_zmm_reg F__fpu_zmm20 t__darwin_zmm_reg F__fpu_zmm21 t__darwin_zmm_reg F__fpu_zmm22 t__darwin_zmm_reg F__fpu_zmm23 t__darwin_zmm_reg F__fpu_zmm24 t__darwin_zmm_reg F__fpu_zmm25 t__darwin_zmm_reg F__fpu_zmm26 t__darwin_zmm_reg F__fpu_zmm27 t__darwin_zmm_reg F__fpu_zmm28 t__darwin_zmm_reg F__fpu_zmm29 t__darwin_zmm_reg F__fpu_zmm30 t__darwin_zmm_reg F__fpu_zmm31 t__darwin_zmm_reg } type t__darwin_x86_exception_state64 = struct { F__trapno t__uint16_t F__cpu t__uint16_t F__err t__uint32_t F__faultvaddr t__uint64_t } type t__darwin_x86_debug_state64 = struct { F__dr0 t__uint64_t F__dr1 t__uint64_t F__dr2 t__uint64_t F__dr3 t__uint64_t F__dr4 t__uint64_t F__dr5 t__uint64_t F__dr6 t__uint64_t F__dr7 t__uint64_t } type t__darwin_x86_cpmu_state64 = struct { F__ctrs [16]t__uint64_t } type t__darwin_mcontext32 = struct { F__es t__darwin_i386_exception_state F__ss t__darwin_i386_thread_state F__fs t__darwin_i386_float_state } type t__darwin_mcontext_avx32 = struct { F__es t__darwin_i386_exception_state F__ss t__darwin_i386_thread_state F__fs t__darwin_i386_avx_state } type t__darwin_mcontext_avx512_32 = struct { F__es t__darwin_i386_exception_state F__ss t__darwin_i386_thread_state F__fs t__darwin_i386_avx512_state } type t__darwin_mcontext64 = struct { F__es t__darwin_x86_exception_state64 F__ss t__darwin_x86_thread_state64 F__fs t__darwin_x86_float_state64 } type t__darwin_mcontext64_full = struct { F__es t__darwin_x86_exception_state64 F__ss t__darwin_x86_thread_full_state64 F__fs t__darwin_x86_float_state64 } type t__darwin_mcontext_avx64 = struct { F__es t__darwin_x86_exception_state64 F__ss t__darwin_x86_thread_state64 F__fs t__darwin_x86_avx_state64 } type t__darwin_mcontext_avx64_full = struct { F__es t__darwin_x86_exception_state64 F__ss t__darwin_x86_thread_full_state64 F__fs t__darwin_x86_avx_state64 } type t__darwin_mcontext_avx512_64 = struct { F__es t__darwin_x86_exception_state64 F__ss t__darwin_x86_thread_state64 F__fs t__darwin_x86_avx512_state64 } type t__darwin_mcontext_avx512_64_full = struct { F__es t__darwin_x86_exception_state64 F__ss t__darwin_x86_thread_full_state64 F__fs t__darwin_x86_avx512_state64 } type Tmcontext_t = uintptr type t__darwin_sigaltstack = struct { Fss_sp uintptr Fss_size t__darwin_size_t Fss_flags int32 } type Tstack_t = struct { Fss_sp uintptr Fss_size t__darwin_size_t Fss_flags int32 } type t__darwin_ucontext = struct { Fuc_onstack int32 Fuc_sigmask t__darwin_sigset_t Fuc_stack t__darwin_sigaltstack Fuc_link uintptr Fuc_mcsize t__darwin_size_t Fuc_mcontext uintptr } type Tucontext_t = struct { Fuc_onstack int32 Fuc_sigmask t__darwin_sigset_t Fuc_stack t__darwin_sigaltstack Fuc_link uintptr Fuc_mcsize t__darwin_size_t Fuc_mcontext uintptr } type Tsigval = struct { Fsival_ptr [0]uintptr Fsival_int int32 F__ccgo_pad2 [4]byte } type Tsigevent = struct { Fsigev_notify int32 Fsigev_signo int32 Fsigev_value Tsigval Fsigev_notify_function uintptr Fsigev_notify_attributes uintptr } type Tsiginfo_t = struct { Fsi_signo int32 Fsi_errno int32 Fsi_code int32 Fsi_pid Tpid_t Fsi_uid Tuid_t Fsi_status int32 Fsi_addr uintptr Fsi_value Tsigval Fsi_band int64 F__pad [7]uint64 } type t__siginfo = Tsiginfo_t type t__sigaction_u = struct { F__sa_sigaction [0]uintptr F__sa_handler uintptr } type t__sigaction = struct { F__sigaction_u t__sigaction_u Fsa_tramp uintptr Fsa_mask Tsigset_t Fsa_flags int32 } type Tsigaction = struct { F__sigaction_u t__sigaction_u Fsa_mask Tsigset_t Fsa_flags int32 } type Tsig_t = uintptr type Tsigvec = struct { Fsv_handler uintptr Fsv_mask int32 Fsv_flags int32 } type Tsigstack = struct { Fss_sp uintptr Fss_onstack int32 } type Tint_least64_t = int64 type Tuint_least64_t = uint64 type Tint_fast64_t = int64 type Tuint_fast64_t = uint64 type Tint_least32_t = int32 type Tuint_least32_t = uint32 type Tint_fast32_t = int32 type Tuint_fast32_t = uint32 type Tuint16_t = uint16 type Tint_least16_t = int16 type Tuint_least16_t = uint16 type Tint_fast16_t = int16 type Tuint_fast16_t = uint16 type Tuint8_t = uint8 type Tint_least8_t = int8 type Tuint_least8_t = uint8 type Tint_fast8_t = int8 type Tuint_fast8_t = uint8 type Tintmax_t = int64 type Tuintmax_t = uint64 type Trlim_t = uint64 type Trusage = struct { Fru_utime Ttimeval Fru_stime Ttimeval Fru_maxrss int64 Fru_ixrss int64 Fru_idrss int64 Fru_isrss int64 Fru_minflt int64 Fru_majflt int64 Fru_nswap int64 Fru_inblock int64 Fru_oublock int64 Fru_msgsnd int64 Fru_msgrcv int64 Fru_nsignals int64 Fru_nvcsw int64 Fru_nivcsw int64 } type Trusage_info_t = uintptr type Trusage_info_v0 = struct { Fri_uuid [16]Tuint8_t Fri_user_time Tuint64_t Fri_system_time Tuint64_t Fri_pkg_idle_wkups Tuint64_t Fri_interrupt_wkups Tuint64_t Fri_pageins Tuint64_t Fri_wired_size Tuint64_t Fri_resident_size Tuint64_t Fri_phys_footprint Tuint64_t Fri_proc_start_abstime Tuint64_t Fri_proc_exit_abstime Tuint64_t } type Trusage_info_v1 = struct { Fri_uuid [16]Tuint8_t Fri_user_time Tuint64_t Fri_system_time Tuint64_t Fri_pkg_idle_wkups Tuint64_t Fri_interrupt_wkups Tuint64_t Fri_pageins Tuint64_t Fri_wired_size Tuint64_t Fri_resident_size Tuint64_t Fri_phys_footprint Tuint64_t Fri_proc_start_abstime Tuint64_t Fri_proc_exit_abstime Tuint64_t Fri_child_user_time Tuint64_t Fri_child_system_time Tuint64_t Fri_child_pkg_idle_wkups Tuint64_t Fri_child_interrupt_wkups Tuint64_t Fri_child_pageins Tuint64_t Fri_child_elapsed_abstime Tuint64_t } type Trusage_info_v2 = struct { Fri_uuid [16]Tuint8_t Fri_user_time Tuint64_t Fri_system_time Tuint64_t Fri_pkg_idle_wkups Tuint64_t Fri_interrupt_wkups Tuint64_t Fri_pageins Tuint64_t Fri_wired_size Tuint64_t Fri_resident_size Tuint64_t Fri_phys_footprint Tuint64_t Fri_proc_start_abstime Tuint64_t Fri_proc_exit_abstime Tuint64_t Fri_child_user_time Tuint64_t Fri_child_system_time Tuint64_t Fri_child_pkg_idle_wkups Tuint64_t Fri_child_interrupt_wkups Tuint64_t Fri_child_pageins Tuint64_t Fri_child_elapsed_abstime Tuint64_t Fri_diskio_bytesread Tuint64_t Fri_diskio_byteswritten Tuint64_t } type Trusage_info_v3 = struct { Fri_uuid [16]Tuint8_t Fri_user_time Tuint64_t Fri_system_time Tuint64_t Fri_pkg_idle_wkups Tuint64_t Fri_interrupt_wkups Tuint64_t Fri_pageins Tuint64_t Fri_wired_size Tuint64_t Fri_resident_size Tuint64_t Fri_phys_footprint Tuint64_t Fri_proc_start_abstime Tuint64_t Fri_proc_exit_abstime Tuint64_t Fri_child_user_time Tuint64_t Fri_child_system_time Tuint64_t Fri_child_pkg_idle_wkups Tuint64_t Fri_child_interrupt_wkups Tuint64_t Fri_child_pageins Tuint64_t Fri_child_elapsed_abstime Tuint64_t Fri_diskio_bytesread Tuint64_t Fri_diskio_byteswritten Tuint64_t Fri_cpu_time_qos_default Tuint64_t Fri_cpu_time_qos_maintenance Tuint64_t Fri_cpu_time_qos_background Tuint64_t Fri_cpu_time_qos_utility Tuint64_t Fri_cpu_time_qos_legacy Tuint64_t Fri_cpu_time_qos_user_initiated Tuint64_t Fri_cpu_time_qos_user_interactive Tuint64_t Fri_billed_system_time Tuint64_t Fri_serviced_system_time Tuint64_t } type Trusage_info_v4 = struct { Fri_uuid [16]Tuint8_t Fri_user_time Tuint64_t Fri_system_time Tuint64_t Fri_pkg_idle_wkups Tuint64_t Fri_interrupt_wkups Tuint64_t Fri_pageins Tuint64_t Fri_wired_size Tuint64_t Fri_resident_size Tuint64_t Fri_phys_footprint Tuint64_t Fri_proc_start_abstime Tuint64_t Fri_proc_exit_abstime Tuint64_t Fri_child_user_time Tuint64_t Fri_child_system_time Tuint64_t Fri_child_pkg_idle_wkups Tuint64_t Fri_child_interrupt_wkups Tuint64_t Fri_child_pageins Tuint64_t Fri_child_elapsed_abstime Tuint64_t Fri_diskio_bytesread Tuint64_t Fri_diskio_byteswritten Tuint64_t Fri_cpu_time_qos_default Tuint64_t Fri_cpu_time_qos_maintenance Tuint64_t Fri_cpu_time_qos_background Tuint64_t Fri_cpu_time_qos_utility Tuint64_t Fri_cpu_time_qos_legacy Tuint64_t Fri_cpu_time_qos_user_initiated Tuint64_t Fri_cpu_time_qos_user_interactive Tuint64_t Fri_billed_system_time Tuint64_t Fri_serviced_system_time Tuint64_t Fri_logical_writes Tuint64_t Fri_lifetime_max_phys_footprint Tuint64_t Fri_instructions Tuint64_t Fri_cycles Tuint64_t Fri_billed_energy Tuint64_t Fri_serviced_energy Tuint64_t Fri_interval_max_phys_footprint Tuint64_t Fri_runnable_time Tuint64_t } type Trusage_info_v5 = struct { Fri_uuid [16]Tuint8_t Fri_user_time Tuint64_t Fri_system_time Tuint64_t Fri_pkg_idle_wkups Tuint64_t Fri_interrupt_wkups Tuint64_t Fri_pageins Tuint64_t Fri_wired_size Tuint64_t Fri_resident_size Tuint64_t Fri_phys_footprint Tuint64_t Fri_proc_start_abstime Tuint64_t Fri_proc_exit_abstime Tuint64_t Fri_child_user_time Tuint64_t Fri_child_system_time Tuint64_t Fri_child_pkg_idle_wkups Tuint64_t Fri_child_interrupt_wkups Tuint64_t Fri_child_pageins Tuint64_t Fri_child_elapsed_abstime Tuint64_t Fri_diskio_bytesread Tuint64_t Fri_diskio_byteswritten Tuint64_t Fri_cpu_time_qos_default Tuint64_t Fri_cpu_time_qos_maintenance Tuint64_t Fri_cpu_time_qos_background Tuint64_t Fri_cpu_time_qos_utility Tuint64_t Fri_cpu_time_qos_legacy Tuint64_t Fri_cpu_time_qos_user_initiated Tuint64_t Fri_cpu_time_qos_user_interactive Tuint64_t Fri_billed_system_time Tuint64_t Fri_serviced_system_time Tuint64_t Fri_logical_writes Tuint64_t Fri_lifetime_max_phys_footprint Tuint64_t Fri_instructions Tuint64_t Fri_cycles Tuint64_t Fri_billed_energy Tuint64_t Fri_serviced_energy Tuint64_t Fri_interval_max_phys_footprint Tuint64_t Fri_runnable_time Tuint64_t Fri_flags Tuint64_t } type Trusage_info_v6 = struct { Fri_uuid [16]Tuint8_t Fri_user_time Tuint64_t Fri_system_time Tuint64_t Fri_pkg_idle_wkups Tuint64_t Fri_interrupt_wkups Tuint64_t Fri_pageins Tuint64_t Fri_wired_size Tuint64_t Fri_resident_size Tuint64_t Fri_phys_footprint Tuint64_t Fri_proc_start_abstime Tuint64_t Fri_proc_exit_abstime Tuint64_t Fri_child_user_time Tuint64_t Fri_child_system_time Tuint64_t Fri_child_pkg_idle_wkups Tuint64_t Fri_child_interrupt_wkups Tuint64_t Fri_child_pageins Tuint64_t Fri_child_elapsed_abstime Tuint64_t Fri_diskio_bytesread Tuint64_t Fri_diskio_byteswritten Tuint64_t Fri_cpu_time_qos_default Tuint64_t Fri_cpu_time_qos_maintenance Tuint64_t Fri_cpu_time_qos_background Tuint64_t Fri_cpu_time_qos_utility Tuint64_t Fri_cpu_time_qos_legacy Tuint64_t Fri_cpu_time_qos_user_initiated Tuint64_t Fri_cpu_time_qos_user_interactive Tuint64_t Fri_billed_system_time Tuint64_t Fri_serviced_system_time Tuint64_t Fri_logical_writes Tuint64_t Fri_lifetime_max_phys_footprint Tuint64_t Fri_instructions Tuint64_t Fri_cycles Tuint64_t Fri_billed_energy Tuint64_t Fri_serviced_energy Tuint64_t Fri_interval_max_phys_footprint Tuint64_t Fri_runnable_time Tuint64_t Fri_flags Tuint64_t Fri_user_ptime Tuint64_t Fri_system_ptime Tuint64_t Fri_pinstructions Tuint64_t Fri_pcycles Tuint64_t Fri_energy_nj Tuint64_t Fri_penergy_nj Tuint64_t Fri_secure_time_in_system Tuint64_t Fri_secure_ptime_in_system Tuint64_t Fri_neural_footprint Tuint64_t Fri_lifetime_max_neural_footprint Tuint64_t Fri_interval_max_neural_footprint Tuint64_t Fri_reserved [9]Tuint64_t } type Trusage_info_current = struct { Fri_uuid [16]Tuint8_t Fri_user_time Tuint64_t Fri_system_time Tuint64_t Fri_pkg_idle_wkups Tuint64_t Fri_interrupt_wkups Tuint64_t Fri_pageins Tuint64_t Fri_wired_size Tuint64_t Fri_resident_size Tuint64_t Fri_phys_footprint Tuint64_t Fri_proc_start_abstime Tuint64_t Fri_proc_exit_abstime Tuint64_t Fri_child_user_time Tuint64_t Fri_child_system_time Tuint64_t Fri_child_pkg_idle_wkups Tuint64_t Fri_child_interrupt_wkups Tuint64_t Fri_child_pageins Tuint64_t Fri_child_elapsed_abstime Tuint64_t Fri_diskio_bytesread Tuint64_t Fri_diskio_byteswritten Tuint64_t Fri_cpu_time_qos_default Tuint64_t Fri_cpu_time_qos_maintenance Tuint64_t Fri_cpu_time_qos_background Tuint64_t Fri_cpu_time_qos_utility Tuint64_t Fri_cpu_time_qos_legacy Tuint64_t Fri_cpu_time_qos_user_initiated Tuint64_t Fri_cpu_time_qos_user_interactive Tuint64_t Fri_billed_system_time Tuint64_t Fri_serviced_system_time Tuint64_t Fri_logical_writes Tuint64_t Fri_lifetime_max_phys_footprint Tuint64_t Fri_instructions Tuint64_t Fri_cycles Tuint64_t Fri_billed_energy Tuint64_t Fri_serviced_energy Tuint64_t Fri_interval_max_phys_footprint Tuint64_t Fri_runnable_time Tuint64_t Fri_flags Tuint64_t Fri_user_ptime Tuint64_t Fri_system_ptime Tuint64_t Fri_pinstructions Tuint64_t Fri_pcycles Tuint64_t Fri_energy_nj Tuint64_t Fri_penergy_nj Tuint64_t Fri_secure_time_in_system Tuint64_t Fri_secure_ptime_in_system Tuint64_t Fri_neural_footprint Tuint64_t Fri_lifetime_max_neural_footprint Tuint64_t Fri_interval_max_neural_footprint Tuint64_t Fri_reserved [9]Tuint64_t } type Trlimit = struct { Frlim_cur Trlim_t Frlim_max Trlim_t } type Tproc_rlimit_control_wakeupmon = struct { Fwm_flags Tuint32_t Fwm_rate Tint32_t } type Twait = struct { Fw_T [0]struct { F__ccgo0 uint32 } Fw_S [0]struct { F__ccgo0 uint32 } Fw_status int32 } type Tct_rune_t = int32 type Trune_t = int32 type Tdiv_t = struct { Fquot int32 Frem int32 } type Tldiv_t = struct { Fquot int64 Frem int64 } type Tlldiv_t = struct { Fquot int64 Frem int64 } type Tmalloc_type_id_t = uint64 type Tuch = uint8 type Tuchf = uint8 type Tush = uint16 type Tushf = uint16 type Tulg = uint64 /* Reverse the bytes in a 32-bit value */ /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ /* use NO_DIVIDE if your processor does not do division in hardware -- try it both ways to see which is faster */ // C documentation // // /* ========================================================================= */ func Xadler32_z(tls *libc.TLS, adler TuLong, buf uintptr, len1 Tz_size_t) (r TuLong) { var n, v3 uint32 var sum2 uint64 var v1, v5 Tz_size_t var v2, v6 uintptr _, _, _, _, _, _, _ = n, sum2, v1, v2, v3, v5, v6 /* split Adler-32 into component sums */ sum2 = adler >> libc.Int32FromInt32(16) & uint64(0xffff) adler &= uint64(0xffff) /* in case user likes doing a byte at a time, keep it fast */ if len1 == uint64(1) { adler += uint64(*(*TBytef)(unsafe.Pointer(buf))) if adler >= uint64(65521) { adler -= uint64(65521) } sum2 += adler if sum2 >= uint64(65521) { sum2 -= uint64(65521) } return adler | sum2<= uint64(65521) { adler -= uint64(65521) } sum2 %= uint64(65521) /* only added so many BASE's */ return adler | sum2<= uint64(m_NMAX) { len1 -= uint64(m_NMAX) n = libc.Uint32FromInt32(libc.Int32FromInt32(m_NMAX) / libc.Int32FromInt32(16)) /* NMAX is divisible by 16 */ for { adler += uint64(*(*TBytef)(unsafe.Pointer(buf))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(2))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(2)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(4))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(4)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(4)+libc.Int32FromInt32(2))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(4)+libc.Int32FromInt32(2)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + 8))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(2))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(2)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(4))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(4)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(4)+libc.Int32FromInt32(2))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(4)+libc.Int32FromInt32(2)+libc.Int32FromInt32(1))))) sum2 += adler /* 16 sums unrolled */ buf += uintptr(16) goto _4 _4: ; n-- v3 = n if !(v3 != 0) { break } } adler %= uint64(65521) sum2 %= uint64(65521) } /* do remaining bytes (less than NMAX, still just one modulo) */ if len1 != 0 { /* avoid modulos if none remaining */ for len1 >= uint64(16) { len1 -= uint64(16) adler += uint64(*(*TBytef)(unsafe.Pointer(buf))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(2))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(2)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(4))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(4)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(4)+libc.Int32FromInt32(2))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(0)+libc.Int32FromInt32(4)+libc.Int32FromInt32(2)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + 8))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(2))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(2)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(4))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(4)+libc.Int32FromInt32(1))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(4)+libc.Int32FromInt32(2))))) sum2 += adler adler += uint64(*(*TBytef)(unsafe.Pointer(buf + uintptr(libc.Int32FromInt32(8)+libc.Int32FromInt32(4)+libc.Int32FromInt32(2)+libc.Int32FromInt32(1))))) sum2 += adler buf += uintptr(16) } for { v5 = len1 len1-- if !(v5 != 0) { break } v6 = buf buf++ adler += uint64(*(*TBytef)(unsafe.Pointer(v6))) sum2 += adler } adler %= uint64(65521) sum2 %= uint64(65521) } /* return recombined sums */ return adler | sum2<= 0 */ rem = libc.Uint32FromInt64(len2) sum1 = adler1 & uint64(0xffff) sum2 = uint64(rem) * sum1 sum2 %= uint64(65521) sum1 += adler2&uint64(0xffff) + uint64(65521) - uint64(1) sum2 += adler1>>libc.Int32FromInt32(16)&uint64(0xffff) + adler2>>libc.Int32FromInt32(16)&uint64(0xffff) + uint64(65521) - uint64(rem) if sum1 >= uint64(65521) { sum1 -= uint64(65521) } if sum1 >= uint64(65521) { sum1 -= uint64(65521) } if sum2 >= libc.Uint64FromUint32(65521)<= uint64(65521) { sum2 -= uint64(65521) } return sum1 | sum2<>int32(56) | word&uint64(0xff000000000000)>>int32(40) | word&uint64(0xff0000000000)>>int32(24) | word&uint64(0xff00000000)>>int32(8) | word&uint64(0xff000000)<>= uint32(1) if b&uint32(1) != 0 { v2 = b>>libc.Int32FromInt32(1) ^ uint32(m_POLY) } else { v2 = b >> int32(1) } b = v2 goto _1 _1: } return p } // C documentation // // /* // Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been // initialized. // */ func _x2nmodp(tls *libc.TLS, n Toff_t, k uint32) (r Tz_crc_t) { var p Tz_crc_t _ = p p = libc.Uint32FromInt32(1) << libc.Int32FromInt32(31) /* x^0 == 1 */ for n != 0 { if n&int64(1) != 0 { p = _multmodp(tls, _x2n_table[k&uint32(31)], p) } n >>= int64(1) k++ } return p } // C documentation // // /* ========================================================================= // * This function can be used by asm versions of crc32(), and to force the // * generation of the CRC tables in a threaded application. // */ func Xget_crc_table(tls *libc.TLS) (r uintptr) { return uintptr(unsafe.Pointer(&_crc_table)) } /* ========================================================================= * Use ARM machine instructions if available. This will compute the CRC about * ten times faster than the braided calculation. This code does not check for * the presence of the CRC instruction at run time. __ARM_FEATURE_CRC32 will * only be defined if the compilation specifies an ARM processor architecture * that has the instructions. For example, compiling with -march=armv8.1-a or * -march=armv8-a+crc, or -march=native if the compile machine has the crc32 * instructions. */ // C documentation // // /* // Return the CRC of the W bytes in the word_t data, taking the // least-significant byte of the word as the first byte of data, without any pre // or post conditioning. This is used to combine the CRCs of each braid. // */ func _crc_word(tls *libc.TLS, data Tz_word_t) (r Tz_crc_t) { var k int32 _ = k k = 0 for { if !(k < int32(m_W)) { break } data = data>>libc.Int32FromInt32(8) ^ uint64(_crc_table[data&uint64(0xff)]) goto _1 _1: ; k++ } return uint32(data) } func _crc_word_big(tls *libc.TLS, data Tz_word_t) (r Tz_word_t) { var k int32 _ = k k = 0 for { if !(k < int32(m_W)) { break } data = data<>((libc.Int32FromInt32(m_W)-libc.Int32FromInt32(1))<= libc.Uint64FromInt32(libc.Int32FromInt32(m_N)*libc.Int32FromInt32(m_W)+libc.Int32FromInt32(m_W)-libc.Int32FromInt32(1)) { /* Compute the CRC up to a z_word_t boundary. */ for len1 != 0 && uint64(buf)&libc.Uint64FromInt32(libc.Int32FromInt32(m_W)-libc.Int32FromInt32(1)) != uint64(0) { len1-- v1 = buf buf++ crc = crc>>int32(8) ^ uint64(_crc_table[(crc^uint64(*(*uint8)(unsafe.Pointer(v1))))&uint64(0xff)]) } /* Compute the CRC on as many N z_word_t blocks as are available. */ blks = len1 / libc.Uint64FromInt32(libc.Int32FromInt32(m_N)*libc.Int32FromInt32(m_W)) len1 -= blks * uint64(m_N) * uint64(m_W) words = buf /* Do endian check at execution time instead of compile time, since ARM processors can change the endianness at execution time. If the compiler knows what the endianness will be, it can optimize out the check and the unused branch. */ *(*uint32)(unsafe.Pointer(bp)) = uint32(1) if *(*uint8)(unsafe.Pointer(bp)) != 0 { /* Initialize the CRC for each braid. */ crc0 = uint32(crc) crc1 = uint32(0) crc2 = uint32(0) crc3 = uint32(0) crc4 = uint32(0) /* Process the first blks-1 blocks, computing the CRCs on each braid independently. */ for { blks-- v2 = blks if !(v2 != 0) { break } /* Load the word for each braid into registers. */ word0 = uint64(crc0) ^ *(*Tz_word_t)(unsafe.Pointer(words)) word1 = uint64(crc1) ^ *(*Tz_word_t)(unsafe.Pointer(words + 1*8)) word2 = uint64(crc2) ^ *(*Tz_word_t)(unsafe.Pointer(words + 2*8)) word3 = uint64(crc3) ^ *(*Tz_word_t)(unsafe.Pointer(words + 3*8)) word4 = uint64(crc4) ^ *(*Tz_word_t)(unsafe.Pointer(words + 4*8)) words += uintptr(m_N) * 8 /* Compute and update the CRC for each word. The loop should get unrolled. */ crc0 = *(*Tz_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&_crc_braid_table)) + uintptr(word0&uint64(0xff))*4)) crc1 = *(*Tz_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&_crc_braid_table)) + uintptr(word1&uint64(0xff))*4)) crc2 = *(*Tz_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&_crc_braid_table)) + uintptr(word2&uint64(0xff))*4)) crc3 = *(*Tz_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&_crc_braid_table)) + uintptr(word3&uint64(0xff))*4)) crc4 = *(*Tz_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&_crc_braid_table)) + uintptr(word4&uint64(0xff))*4)) k = int32(1) for { if !(k < int32(m_W)) { break } crc0 ^= *(*Tz_crc_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&_crc_braid_table)) + uintptr(k)*1024 + uintptr(word0>>(k<>(k<>(k<>(k<>(k<>(k<>(k<>(k<>(k<>(k<= uint64(8) { len1 -= uint64(8) v6 = buf buf++ crc = crc>>int32(8) ^ uint64(_crc_table[(crc^uint64(*(*uint8)(unsafe.Pointer(v6))))&uint64(0xff)]) v7 = buf buf++ crc = crc>>int32(8) ^ uint64(_crc_table[(crc^uint64(*(*uint8)(unsafe.Pointer(v7))))&uint64(0xff)]) v8 = buf buf++ crc = crc>>int32(8) ^ uint64(_crc_table[(crc^uint64(*(*uint8)(unsafe.Pointer(v8))))&uint64(0xff)]) v9 = buf buf++ crc = crc>>int32(8) ^ uint64(_crc_table[(crc^uint64(*(*uint8)(unsafe.Pointer(v9))))&uint64(0xff)]) v10 = buf buf++ crc = crc>>int32(8) ^ uint64(_crc_table[(crc^uint64(*(*uint8)(unsafe.Pointer(v10))))&uint64(0xff)]) v11 = buf buf++ crc = crc>>int32(8) ^ uint64(_crc_table[(crc^uint64(*(*uint8)(unsafe.Pointer(v11))))&uint64(0xff)]) v12 = buf buf++ crc = crc>>int32(8) ^ uint64(_crc_table[(crc^uint64(*(*uint8)(unsafe.Pointer(v12))))&uint64(0xff)]) v13 = buf buf++ crc = crc>>int32(8) ^ uint64(_crc_table[(crc^uint64(*(*uint8)(unsafe.Pointer(v13))))&uint64(0xff)]) } for len1 != 0 { len1-- v14 = buf buf++ crc = crc>>int32(8) ^ uint64(_crc_table[(crc^uint64(*(*uint8)(unsafe.Pointer(v14))))&uint64(0xff)]) } /* Return the CRC, post-conditioned. */ return crc ^ uint64(0xffffffff) } // C documentation // // /* ========================================================================= */ func Xcrc32(tls *libc.TLS, crc uint64, buf uintptr, len1 TuInt) (r uint64) { return Xcrc32_z(tls, crc, buf, uint64(len1)) } // C documentation // // /* ========================================================================= */ func Xcrc32_combine64(tls *libc.TLS, crc1 TuLong, crc2 TuLong, len2 Toff_t) (r TuLong) { return uint64(_multmodp(tls, _x2nmodp(tls, len2, uint32(3)), uint32(crc1))) ^ crc2&uint64(0xffffffff) } // C documentation // // /* ========================================================================= */ func Xcrc32_combine(tls *libc.TLS, crc1 TuLong, crc2 TuLong, len2 Toff_t) (r TuLong) { return Xcrc32_combine64(tls, crc1, crc2, len2) } // C documentation // // /* ========================================================================= */ func Xcrc32_combine_gen64(tls *libc.TLS, len2 Toff_t) (r TuLong) { return uint64(_x2nmodp(tls, len2, uint32(3))) } // C documentation // // /* ========================================================================= */ func Xcrc32_combine_gen(tls *libc.TLS, len2 Toff_t) (r TuLong) { return Xcrc32_combine_gen64(tls, len2) } // C documentation // // /* ========================================================================= */ func Xcrc32_combine_op(tls *libc.TLS, crc1 TuLong, crc2 TuLong, op TuLong) (r TuLong) { return uint64(_multmodp(tls, uint32(op), uint32(crc1))) ^ crc2&uint64(0xffffffff) } const m_BL_CODES = 19 const m_BUSY_STATE = 113 const m_Buf_size = 16 const m_COMMENT_STATE = 91 const m_D_CODES = 30 const m_EXTRA_STATE = 69 const m_FINISH_STATE = 666 const m_GZIP_STATE = 57 const m_HCRC_STATE = 103 const m_INIT_STATE = 42 const m_LENGTH_CODES = 29 const m_LITERALS = 256 const m_LIT_BUFS = 4 const m_MAX_BITS = 15 const m_MAX_STORED = 65535 const m_NAME_STATE = 73 const m_NIL = 0 const m_PRESET_DICT1 = 32 const m_TOO_FAR = 4096 const m_WIN_INIT = "MAX_MATCH" const m_max_insert_length = "max_lazy_match" type Tinternal_state = struct { Fstrm Tz_streamp Fstatus int32 Fpending_buf uintptr Fpending_buf_size Tulg Fpending_out uintptr Fpending Tulg Fwrap int32 Fgzhead Tgz_headerp Fgzindex Tulg Fmethod TByte Flast_flush int32 Fw_size TuInt Fw_bits TuInt Fw_mask TuInt Fwindow uintptr Fwindow_size Tulg Fprev uintptr Fhead uintptr Fins_h TuInt Fhash_size TuInt Fhash_bits TuInt Fhash_mask TuInt Fhash_shift TuInt Fblock_start int64 Fmatch_length TuInt Fprev_match TIPos Fmatch_available int32 Fstrstart TuInt Fmatch_start TuInt Flookahead TuInt Fprev_length TuInt Fmax_chain_length TuInt Fmax_lazy_match TuInt Flevel int32 Fstrategy int32 Fgood_match TuInt Fnice_match int32 Fdyn_ltree [573]Tct_data_s Fdyn_dtree [61]Tct_data_s Fbl_tree [39]Tct_data_s Fl_desc Ttree_desc_s Fd_desc Ttree_desc_s Fbl_desc Ttree_desc_s Fbl_count [16]Tush Fheap [573]int32 Fheap_len int32 Fheap_max int32 Fdepth [573]Tuch Fsym_buf uintptr Flit_bufsize TuInt Fsym_next TuInt Fsym_end TuInt Fopt_len Tulg Fstatic_len Tulg Fmatches TuInt Finsert TuInt Fbi_buf Tush Fbi_valid int32 Fhigh_water Tulg } type Tct_data = struct { Ffc struct { Fcode [0]Tush Ffreq Tush } Fdl struct { Flen1 [0]Tush Fdad Tush } } type Tct_data_s = Tct_data type Ttree_desc = struct { Fdyn_tree uintptr Fmax_code int32 Fstat_desc uintptr } type Ttree_desc_s = Ttree_desc type TPos = uint16 type TPosf = uint16 type TIPos = uint32 type Tdeflate_state = struct { Fstrm Tz_streamp Fstatus int32 Fpending_buf uintptr Fpending_buf_size Tulg Fpending_out uintptr Fpending Tulg Fwrap int32 Fgzhead Tgz_headerp Fgzindex Tulg Fmethod TByte Flast_flush int32 Fw_size TuInt Fw_bits TuInt Fw_mask TuInt Fwindow uintptr Fwindow_size Tulg Fprev uintptr Fhead uintptr Fins_h TuInt Fhash_size TuInt Fhash_bits TuInt Fhash_mask TuInt Fhash_shift TuInt Fblock_start int64 Fmatch_length TuInt Fprev_match TIPos Fmatch_available int32 Fstrstart TuInt Fmatch_start TuInt Flookahead TuInt Fprev_length TuInt Fmax_chain_length TuInt Fmax_lazy_match TuInt Flevel int32 Fstrategy int32 Fgood_match TuInt Fnice_match int32 Fdyn_ltree [573]Tct_data_s Fdyn_dtree [61]Tct_data_s Fbl_tree [39]Tct_data_s Fl_desc Ttree_desc_s Fd_desc Ttree_desc_s Fbl_desc Ttree_desc_s Fbl_count [16]Tush Fheap [573]int32 Fheap_len int32 Fheap_max int32 Fdepth [573]Tuch Fsym_buf uintptr Flit_bufsize TuInt Fsym_next TuInt Fsym_end TuInt Fopt_len Tulg Fstatic_len Tulg Fmatches TuInt Finsert TuInt Fbi_buf Tush Fbi_valid int32 Fhigh_water Tulg } /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot include such an acknowledgment, I would appreciate that you keep this copyright string in the executable of your product. */ type Tblock_state = int32 const _need_more = 0 const /* block not completed, need more input or more output */ _block_done = 1 const /* block flush performed */ _finish_started = 2 const /* finish started, need only more output at next deflate */ _finish_done = 3 type Tcompress_func = uintptr /* =========================================================================== * Local data */ /* Tail of hash chains */ /* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ // C documentation // // /* Values for max_lazy_match, good_match and max_chain_length, depending on // * the desired pack level (0..9). The values given below have been tuned to // * exclude worst case performance for pathological files. Better values may be // * found for specific files. // */ type Tconfig = struct { Fgood_length Tush Fmax_lazy Tush Fnice_length Tush Fmax_chain Tush Ffunc1 Tcompress_func } /* =========================================================================== * Local data */ /* Tail of hash chains */ /* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ // C documentation // // /* Values for max_lazy_match, good_match and max_chain_length, depending on // * the desired pack level (0..9). The values given below have been tuned to // * exclude worst case performance for pathological files. Better values may be // * found for specific files. // */ type Tconfig_s = Tconfig var _configuration_table = [10]Tconfig{ 0: {}, 1: { Fgood_length: uint16(4), Fmax_lazy: uint16(4), Fnice_length: uint16(8), Fmax_chain: uint16(4), }, 2: { Fgood_length: uint16(4), Fmax_lazy: uint16(5), Fnice_length: uint16(16), Fmax_chain: uint16(8), }, 3: { Fgood_length: uint16(4), Fmax_lazy: uint16(6), Fnice_length: uint16(32), Fmax_chain: uint16(32), }, 4: { Fgood_length: uint16(4), Fmax_lazy: uint16(4), Fnice_length: uint16(16), Fmax_chain: uint16(16), }, 5: { Fgood_length: uint16(8), Fmax_lazy: uint16(16), Fnice_length: uint16(32), Fmax_chain: uint16(32), }, 6: { Fgood_length: uint16(8), Fmax_lazy: uint16(16), Fnice_length: uint16(128), Fmax_chain: uint16(128), }, 7: { Fgood_length: uint16(8), Fmax_lazy: uint16(32), Fnice_length: uint16(128), Fmax_chain: uint16(256), }, 8: { Fgood_length: uint16(32), Fmax_lazy: uint16(128), Fnice_length: uint16(258), Fmax_chain: uint16(1024), }, 9: { Fgood_length: uint16(32), Fmax_lazy: uint16(258), Fnice_length: uint16(258), Fmax_chain: uint16(4096), }, } func init() { p := unsafe.Pointer(&_configuration_table) *(*uintptr)(unsafe.Add(p, 8)) = __ccgo_fp(_deflate_stored) *(*uintptr)(unsafe.Add(p, 24)) = __ccgo_fp(_deflate_fast) *(*uintptr)(unsafe.Add(p, 40)) = __ccgo_fp(_deflate_fast) *(*uintptr)(unsafe.Add(p, 56)) = __ccgo_fp(_deflate_fast) *(*uintptr)(unsafe.Add(p, 72)) = __ccgo_fp(_deflate_slow) *(*uintptr)(unsafe.Add(p, 88)) = __ccgo_fp(_deflate_slow) *(*uintptr)(unsafe.Add(p, 104)) = __ccgo_fp(_deflate_slow) *(*uintptr)(unsafe.Add(p, 120)) = __ccgo_fp(_deflate_slow) *(*uintptr)(unsafe.Add(p, 136)) = __ccgo_fp(_deflate_slow) *(*uintptr)(unsafe.Add(p, 152)) = __ccgo_fp(_deflate_slow) } /* max compression */ /* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 * For deflate_fast() (levels <= 3) good is ignored and lazy has a different * meaning. */ /* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ /* =========================================================================== * Update a hash value with the given input byte * IN assertion: all calls to UPDATE_HASH are made with consecutive input * characters, so that a running hash key can be computed from the previous * key instead of complete recalculation each time. */ /* =========================================================================== * Insert string str in the dictionary and set match_head to the previous head * of the hash chain (the most recent string with same hash key). Return * the previous length of the hash chain. * If this file is compiled with -DFASTEST, the compression level is forced * to 1, and no hash chains are maintained. * IN assertion: all calls to INSERT_STRING are made with consecutive input * characters and the first MIN_MATCH bytes of str are valid (except for * the last MIN_MATCH-1 bytes of the input file). */ /* =========================================================================== * Initialize the hash table (avoiding 64K overflow for 16 bit systems). * prev[] will be initialized on the fly. */ // C documentation // // /* =========================================================================== // * Slide the hash table when sliding the window down (could be avoided with 32 // * bit values at the expense of memory usage). We slide even when level == 0 to // * keep the hash table consistent if we switch back to level > 0 later. // */ func _slide_hash(tls *libc.TLS, s uintptr) { var m, n, v1, v4, v5, v8 uint32 var p, v3, v7 uintptr var wsize TuInt _, _, _, _, _, _, _, _, _, _ = m, n, p, wsize, v1, v3, v4, v5, v7, v8 wsize = (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size n = (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size p = (*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr(n)*2 for { p -= 2 v3 = p m = uint32(*(*TPosf)(unsafe.Pointer(v3))) if m >= wsize { v4 = m - wsize } else { v4 = uint32(m_NIL) } *(*TPosf)(unsafe.Pointer(p)) = uint16(v4) goto _2 _2: ; n-- v1 = n if !(v1 != 0) { break } } n = wsize p = (*Tdeflate_state)(unsafe.Pointer(s)).Fprev + uintptr(n)*2 for { p -= 2 v7 = p m = uint32(*(*TPosf)(unsafe.Pointer(v7))) if m >= wsize { v8 = m - wsize } else { v8 = uint32(m_NIL) } *(*TPosf)(unsafe.Pointer(p)) = uint16(v8) /* If n is not on any hash chain, prev[n] is garbage but * its value will never be used. */ goto _6 _6: ; n-- v5 = n if !(v5 != 0) { break } } } // C documentation // // /* =========================================================================== // * Read a new buffer from the current input stream, update the adler32 // * and total number of bytes read. All deflate() input goes through // * this function so some applications may wish to modify it to avoid // * allocating a large strm->next_in buffer and copying from it. // * (See also flush_pending()). // */ func _read_buf(tls *libc.TLS, strm Tz_streamp, buf uintptr, size uint32) (r uint32) { var len1 uint32 _ = len1 len1 = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in if len1 > size { len1 = size } if len1 == uint32(0) { return uint32(0) } *(*TuInt)(unsafe.Pointer(strm + 8)) -= len1 libc.X__builtin___memcpy_chk(tls, buf, (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(len1), ^t__predefined_size_t(0)) if (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == int32(1) { (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fadler, buf, len1) } else { if (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap == int32(2) { (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fadler, buf, len1) } } *(*uintptr)(unsafe.Pointer(strm)) += uintptr(len1) *(*TuLong)(unsafe.Pointer(strm + 16)) += uint64(len1) return len1 } // C documentation // // /* =========================================================================== // * Fill the window when the lookahead becomes insufficient. // * Updates strstart and lookahead. // * // * IN assertion: lookahead < MIN_LOOKAHEAD // * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD // * At least one byte has been read, or avail_in == 0; reads are // * performed for at least two bytes (required for the zip translate_eol // * option -- not supported here). // */ func _fill_window(tls *libc.TLS, s uintptr) { var curr, init1 Tulg var more, n uint32 var str, wsize TuInt _, _, _, _, _, _ = curr, init1, more, n, str, wsize /* Amount of free space at the end of the window. */ wsize = (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size for cond := true; cond; cond = (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead < libc.Uint32FromInt32(libc.Int32FromInt32(m_MAX_MATCH)+libc.Int32FromInt32(m_MIN_MATCH)+libc.Int32FromInt32(1)) && (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in != uint32(0) { more = uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow_size - uint64((*Tdeflate_state)(unsafe.Pointer(s)).Flookahead) - uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)) /* Deal with !@#$% 64K limit: */ if uint64(4) <= uint64(2) { if more == uint32(0) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart == uint32(0) && (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead == uint32(0) { more = wsize } else { if more == libc.Uint32FromInt32(-libc.Int32FromInt32(1)) { /* Very unlikely, but possible on 16 bit machine if * strstart == 0 && lookahead == 1 (input done a byte at time) */ more-- } } } /* If the window is almost full and there is insufficient lookahead, * move the upper half to the lower one to make room in the upper half. */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart >= wsize+((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size-libc.Uint32FromInt32(libc.Int32FromInt32(m_MAX_MATCH)+libc.Int32FromInt32(m_MIN_MATCH)+libc.Int32FromInt32(1))) { libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(wsize), uint64(wsize-more), ^t__predefined_size_t(0)) *(*TuInt)(unsafe.Pointer(s + 176)) -= wsize *(*TuInt)(unsafe.Pointer(s + 172)) -= wsize /* we now have strstart >= MAX_DIST */ *(*int64)(unsafe.Pointer(s + 152)) -= libc.Int64FromUint32(wsize) if (*Tdeflate_state)(unsafe.Pointer(s)).Finsert > (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart { (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart } _slide_hash(tls, s) more += wsize } if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == uint32(0) { break } /* If there was no sliding: * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && * more == window_size - lookahead - strstart * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) * => more >= window_size - 2*WSIZE + 2 * In the BIG_MEM or MMAP case (not yet supported), * window_size == input_size + MIN_LOOKAHEAD && * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. * Otherwise, window_size == 2*WSIZE so more >= 2. * If there was sliding, more >= WSIZE. So in all cases, more >= 2. */ n = _read_buf(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Flookahead), more) *(*TuInt)(unsafe.Pointer(s + 180)) += n /* Initialize the hash value now that we have some input: */ if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead+(*Tdeflate_state)(unsafe.Pointer(s)).Finsert >= uint32(m_MIN_MATCH) { str = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart - (*Tdeflate_state)(unsafe.Pointer(s)).Finsert (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = uint32(*(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str)))) (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = ((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h<<(*Tdeflate_state)(unsafe.Pointer(s)).Fhash_shift ^ uint32(*(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str+uint32(1)))))) & (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_mask for (*Tdeflate_state)(unsafe.Pointer(s)).Finsert != 0 { (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = ((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h<<(*Tdeflate_state)(unsafe.Pointer(s)).Fhash_shift ^ uint32(*(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str+uint32(m_MIN_MATCH)-uint32(1)))))) & (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_mask *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fprev + uintptr(str&(*Tdeflate_state)(unsafe.Pointer(s)).Fw_mask)*2)) = *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = uint16(str) str++ (*Tdeflate_state)(unsafe.Pointer(s)).Finsert-- if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead+(*Tdeflate_state)(unsafe.Pointer(s)).Finsert < uint32(m_MIN_MATCH) { break } } } /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, * but this is not important since only literal bytes will be emitted. */ } /* If the WIN_INIT bytes after the end of the current data have never been * written, then zero those bytes in order to avoid memory check reports of * the use of uninitialized (or uninitialised as Julian writes) bytes by * the longest match routines. Update the high water mark for the next * time through here. WIN_INIT is set to MAX_MATCH since the longest match * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water < (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow_size { curr = uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) + uint64((*Tdeflate_state)(unsafe.Pointer(s)).Flookahead) if (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water < curr { /* Previous high water mark below current data -- zero WIN_INIT * bytes or up to end of window, whichever is less. */ init1 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow_size - curr if init1 > uint64(m_MAX_MATCH) { init1 = uint64(m_MAX_MATCH) } libc.X__builtin___memset_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr(curr), 0, uint64(uint32(init1)), ^t__predefined_size_t(0)) (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water = curr + init1 } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water < curr+uint64(m_MAX_MATCH) { /* High water mark at or above current data, but below current data * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up * to end of window, whichever is less. */ init1 = curr + uint64(m_MAX_MATCH) - (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water if init1 > (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow_size-(*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water { init1 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow_size - (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water } libc.X__builtin___memset_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water), 0, uint64(uint32(init1)), ^t__predefined_size_t(0)) *(*Tulg)(unsafe.Pointer(s + 5944)) += init1 } } } } // C documentation // // /* ========================================================================= */ func XdeflateInit_(tls *libc.TLS, strm Tz_streamp, level int32, version uintptr, stream_size int32) (r int32) { return XdeflateInit2_(tls, strm, level, int32(m_Z_DEFLATED), int32(m_MAX_WBITS), int32(m_DEF_MEM_LEVEL), m_Z_DEFAULT_STRATEGY, version, stream_size) /* To do: ignore strm->next_in if we use it as window */ } // C documentation // // /* ========================================================================= */ func XdeflateInit2_(tls *libc.TLS, strm Tz_streamp, level int32, method int32, windowBits int32, memLevel int32, strategy int32, version uintptr, stream_size int32) (r int32) { var s uintptr var wrap int32 _, _ = s, wrap wrap = int32(1) if version == uintptr(m_Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(_my_version[0]) || libc.Uint64FromInt32(stream_size) != uint64(112) { return -int32(6) } if strm == uintptr(m_Z_NULL) { return -int32(2) } (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(m_Z_NULL) if (*Tz_stream)(unsafe.Pointer(strm)).Fzalloc == libc.UintptrFromInt32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fzalloc = __ccgo_fp(Xzcalloc) (*Tz_stream)(unsafe.Pointer(strm)).Fopaque = libc.UintptrFromInt32(0) } if (*Tz_stream)(unsafe.Pointer(strm)).Fzfree == libc.UintptrFromInt32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fzfree = __ccgo_fp(Xzcfree) } if level == -int32(1) { level = int32(6) } if windowBits < 0 { /* suppress zlib wrapper */ wrap = 0 if windowBits < -int32(15) { return -int32(2) } windowBits = -windowBits } else { if windowBits > int32(15) { wrap = int32(2) /* write gzip wrapper instead */ windowBits -= int32(16) } } if memLevel < int32(1) || memLevel > int32(m_MAX_MEM_LEVEL) || method != int32(m_Z_DEFLATED) || windowBits < int32(8) || windowBits > int32(15) || level < 0 || level > int32(9) || strategy < 0 || strategy > int32(m_Z_FIXED) || windowBits == int32(8) && wrap != int32(1) { return -int32(2) } if windowBits == int32(8) { windowBits = int32(9) } /* until 256-byte window bug fixed */ s = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, libc.Uint32FromInt32(libc.Int32FromInt32(1)), uint32(libc.Uint64FromInt64(5952))) if s == uintptr(m_Z_NULL) { return -int32(4) } (*Tz_stream)(unsafe.Pointer(strm)).Fstate = s (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm = strm (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_INIT_STATE) /* to pass state test in deflateReset() */ (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap = wrap (*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead = uintptr(m_Z_NULL) (*Tdeflate_state)(unsafe.Pointer(s)).Fw_bits = libc.Uint32FromInt32(windowBits) (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size = libc.Uint32FromInt32(int32(1) << (*Tdeflate_state)(unsafe.Pointer(s)).Fw_bits) (*Tdeflate_state)(unsafe.Pointer(s)).Fw_mask = (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size - uint32(1) (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_bits = libc.Uint32FromInt32(memLevel) + uint32(7) (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size = libc.Uint32FromInt32(int32(1) << (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_bits) (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_mask = (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size - uint32(1) (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_shift = ((*Tdeflate_state)(unsafe.Pointer(s)).Fhash_bits + libc.Uint32FromInt32(m_MIN_MATCH) - libc.Uint32FromInt32(1)) / libc.Uint32FromInt32(m_MIN_MATCH) (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size, uint32(libc.Uint64FromInt32(2)*libc.Uint64FromInt64(1))) (*Tdeflate_state)(unsafe.Pointer(s)).Fprev = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size, uint32(libc.Uint64FromInt64(2))) (*Tdeflate_state)(unsafe.Pointer(s)).Fhead = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size, uint32(libc.Uint64FromInt64(2))) (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water = uint64(0) /* nothing written to s->window yet */ (*Tdeflate_state)(unsafe.Pointer(s)).Flit_bufsize = libc.Uint32FromInt32(int32(1) << (memLevel + int32(6))) /* 16K elements by default */ /* We overlay pending_buf and sym_buf. This works since the average size * for length/distance pairs over any compressed block is assured to be 31 * bits or less. * * Analysis: The longest fixed codes are a length code of 8 bits plus 5 * extra bits, for lengths 131 to 257. The longest fixed distance codes are * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest * possible fixed-codes length/distance pair is then 31 bits total. * * sym_buf starts one-fourth of the way into pending_buf. So there are * three bytes in sym_buf for every four bytes in pending_buf. Each symbol * in sym_buf is three bytes -- two for the distance and one for the * literal/length. As each symbol is consumed, the pointer to the next * sym_buf value to read moves forward three bytes. From that symbol, up to * 31 bits are written to pending_buf. The closest the written pending_buf * bits gets to the next sym_buf symbol to read is just before the last * code is written. At that time, 31*(n - 2) bits have been written, just * after 24*(n - 2) bits have been consumed from sym_buf. sym_buf starts at * 8*n bits into pending_buf. (Note that the symbol buffer fills when n - 1 * symbols are written.) The closest the writing gets to what is unread is * then n + 14 bits. Here n is lit_bufsize, which is 16384 by default, and * can range from 128 to 32768. * * Therefore, at a minimum, there are 142 bits of space between what is * written and what is read in the overlain buffers, so the symbols cannot * be overwritten by the compressed data. That space is actually 139 bits, * due to the three-bit fixed-code block header. * * That covers the case where either Z_FIXED is specified, forcing fixed * codes, or when the use of fixed codes is chosen, because that choice * results in a smaller compressed block than dynamic codes. That latter * condition then assures that the above analysis also covers all dynamic * blocks. A dynamic-code block will only be chosen to be emitted if it has * fewer bits than a fixed-code block would for the same set of symbols. * Therefore its average symbol length is assured to be less than 31. So * the compressed data for a dynamic block also cannot overwrite the * symbols from which it is being constructed. */ (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tdeflate_state)(unsafe.Pointer(s)).Flit_bufsize, libc.Uint32FromInt32(libc.Int32FromInt32(m_LIT_BUFS))) (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size = uint64((*Tdeflate_state)(unsafe.Pointer(s)).Flit_bufsize) * uint64(4) if (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow == uintptr(m_Z_NULL) || (*Tdeflate_state)(unsafe.Pointer(s)).Fprev == uintptr(m_Z_NULL) || (*Tdeflate_state)(unsafe.Pointer(s)).Fhead == uintptr(m_Z_NULL) || (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf == uintptr(m_Z_NULL) { (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_FINISH_STATE) (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[libc.Int32FromInt32(2) - -libc.Int32FromInt32(4)] XdeflateEnd(tls, strm) return -int32(4) } (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf = (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Flit_bufsize) (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_end = ((*Tdeflate_state)(unsafe.Pointer(s)).Flit_bufsize - uint32(1)) * uint32(3) /* We avoid equality with lit_bufsize*3 because of wraparound at 64K * on 16 bit machines and because stored blocks are restricted to * 64K-1 bytes. */ (*Tdeflate_state)(unsafe.Pointer(s)).Flevel = level (*Tdeflate_state)(unsafe.Pointer(s)).Fstrategy = strategy (*Tdeflate_state)(unsafe.Pointer(s)).Fmethod = libc.Uint8FromInt32(method) return XdeflateReset(tls, strm) } var _my_version = [6]int8{'1', '.', '3', '.', '1'} // C documentation // // /* ========================================================================= // * Check for a valid deflate stream state. Return 0 if ok, 1 if not. // */ func _deflateStateCheck(tls *libc.TLS, strm Tz_streamp) (r int32) { var s uintptr _ = s if strm == uintptr(m_Z_NULL) || (*Tz_stream)(unsafe.Pointer(strm)).Fzalloc == libc.UintptrFromInt32(0) || (*Tz_stream)(unsafe.Pointer(strm)).Fzfree == libc.UintptrFromInt32(0) { return int32(1) } s = (*Tz_stream)(unsafe.Pointer(strm)).Fstate if s == uintptr(m_Z_NULL) || (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm != strm || (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus != int32(m_INIT_STATE) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus != int32(m_GZIP_STATE) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus != int32(m_EXTRA_STATE) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus != int32(m_NAME_STATE) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus != int32(m_COMMENT_STATE) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus != int32(m_HCRC_STATE) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus != int32(m_BUSY_STATE) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus != int32(m_FINISH_STATE) { return int32(1) } return 0 } // C documentation // // /* ========================================================================= */ func XdeflateSetDictionary(tls *libc.TLS, strm Tz_streamp, dictionary uintptr, dictLength TuInt) (r int32) { var avail uint32 var n, str, v1, v3 TuInt var next, s uintptr var wrap int32 _, _, _, _, _, _, _, _ = avail, n, next, s, str, wrap, v1, v3 if _deflateStateCheck(tls, strm) != 0 || dictionary == uintptr(m_Z_NULL) { return -int32(2) } s = (*Tz_stream)(unsafe.Pointer(strm)).Fstate wrap = (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap if wrap == int32(2) || wrap == int32(1) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus != int32(m_INIT_STATE) || (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead != 0 { return -int32(2) } /* when using zlib wrappers, compute Adler-32 for provided dictionary */ if wrap == int32(1) { (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fadler, dictionary, dictLength) } (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap = 0 /* avoid computing Adler-32 in read_buf */ /* if dictionary would fill window, just replace the history */ if dictLength >= (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size { if wrap == 0 { /* already empty otherwise */ *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size-uint32(1))*2)) = uint16(m_NIL) libc.X__builtin___memset_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size-libc.Uint32FromInt32(1))*uint64(2), ^t__predefined_size_t(0)) (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart = uint32(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = 0 (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = uint32(0) } dictionary += uintptr(dictLength - (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size) /* use the tail */ dictLength = (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size } /* insert dictionary into window and hash */ avail = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in next = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in (*Tz_stream)(unsafe.Pointer(strm)).Favail_in = dictLength (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in = dictionary _fill_window(tls, s) for (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead >= uint32(m_MIN_MATCH) { str = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart n = (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead - libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH)-libc.Int32FromInt32(1)) for { (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = ((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h<<(*Tdeflate_state)(unsafe.Pointer(s)).Fhash_shift ^ uint32(*(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(str+uint32(m_MIN_MATCH)-uint32(1)))))) & (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_mask *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fprev + uintptr(str&(*Tdeflate_state)(unsafe.Pointer(s)).Fw_mask)*2)) = *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = uint16(str) str++ goto _2 _2: ; n-- v1 = n if !(v1 != 0) { break } } (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart = str (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead = libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH) - libc.Int32FromInt32(1)) _fill_window(tls, s) } *(*TuInt)(unsafe.Pointer(s + 172)) += (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead = uint32(0) v3 = libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH) - libc.Int32FromInt32(1)) (*Tdeflate_state)(unsafe.Pointer(s)).Fprev_length = v3 (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = v3 (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in = next (*Tz_stream)(unsafe.Pointer(strm)).Favail_in = avail (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap = wrap return m_Z_OK } // C documentation // // /* ========================================================================= */ func XdeflateGetDictionary(tls *libc.TLS, strm Tz_streamp, dictionary uintptr, dictLength uintptr) (r int32) { var len1 TuInt var s uintptr _, _ = len1, s if _deflateStateCheck(tls, strm) != 0 { return -int32(2) } s = (*Tz_stream)(unsafe.Pointer(strm)).Fstate len1 = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart + (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead if len1 > (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size { len1 = (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size } if dictionary != uintptr(m_Z_NULL) && len1 != 0 { libc.X__builtin___memcpy_chk(tls, dictionary, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Flookahead)-uintptr(len1), uint64(len1), ^t__predefined_size_t(0)) } if dictLength != uintptr(m_Z_NULL) { *(*TuInt)(unsafe.Pointer(dictLength)) = len1 } return m_Z_OK } // C documentation // // /* ========================================================================= */ func XdeflateResetKeep(tls *libc.TLS, strm Tz_streamp) (r int32) { var s uintptr var v1 TuLong var v2 int32 var v3 uint64 _, _, _, _ = s, v1, v2, v3 if _deflateStateCheck(tls, strm) != 0 { return -int32(2) } v1 = libc.Uint64FromInt32(0) (*Tz_stream)(unsafe.Pointer(strm)).Ftotal_out = v1 (*Tz_stream)(unsafe.Pointer(strm)).Ftotal_in = v1 (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(m_Z_NULL) /* use zfree if we ever allocate msg dynamically */ (*Tz_stream)(unsafe.Pointer(strm)).Fdata_type = int32(m_Z_UNKNOWN) s = (*Tz_stream)(unsafe.Pointer(strm)).Fstate (*Tdeflate_state)(unsafe.Pointer(s)).Fpending = uint64(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_out = (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf if (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap < 0 { (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap = -(*Tdeflate_state)(unsafe.Pointer(s)).Fwrap /* was made negative by deflate(..., Z_FINISH); */ } if (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap == int32(2) { v2 = int32(m_GZIP_STATE) } else { v2 = int32(m_INIT_STATE) } (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = v2 if (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap == int32(2) { v3 = Xcrc32(tls, uint64(0), uintptr(m_Z_NULL), uint32(0)) } else { v3 = Xadler32(tls, uint64(0), uintptr(m_Z_NULL), uint32(0)) } (*Tz_stream)(unsafe.Pointer(strm)).Fadler = v3 (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(2) x__tr_init(tls, s) return m_Z_OK } // C documentation // // /* =========================================================================== // * Initialize the "longest match" routines for a new zlib stream // */ func _lm_init(tls *libc.TLS, s uintptr) { var v1 TuInt _ = v1 (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow_size = libc.Uint64FromInt64(2) * uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size-uint32(1))*2)) = uint16(m_NIL) libc.X__builtin___memset_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size-libc.Uint32FromInt32(1))*uint64(2), ^t__predefined_size_t(0)) /* Set the default configuration parameters: */ (*Tdeflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = uint32(_configuration_table[(*Tdeflate_state)(unsafe.Pointer(s)).Flevel].Fmax_lazy) (*Tdeflate_state)(unsafe.Pointer(s)).Fgood_match = uint32(_configuration_table[(*Tdeflate_state)(unsafe.Pointer(s)).Flevel].Fgood_length) (*Tdeflate_state)(unsafe.Pointer(s)).Fnice_match = libc.Int32FromUint16(_configuration_table[(*Tdeflate_state)(unsafe.Pointer(s)).Flevel].Fnice_length) (*Tdeflate_state)(unsafe.Pointer(s)).Fmax_chain_length = uint32(_configuration_table[(*Tdeflate_state)(unsafe.Pointer(s)).Flevel].Fmax_chain) (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart = uint32(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = 0 (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead = uint32(0) (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = uint32(0) v1 = libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH) - libc.Int32FromInt32(1)) (*Tdeflate_state)(unsafe.Pointer(s)).Fprev_length = v1 (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = v1 (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = uint32(0) } // C documentation // // /* ========================================================================= */ func XdeflateReset(tls *libc.TLS, strm Tz_streamp) (r int32) { var ret int32 _ = ret ret = XdeflateResetKeep(tls, strm) if ret == m_Z_OK { _lm_init(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fstate) } return ret } // C documentation // // /* ========================================================================= */ func XdeflateSetHeader(tls *libc.TLS, strm Tz_streamp, head Tgz_headerp) (r int32) { if _deflateStateCheck(tls, strm) != 0 || (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fwrap != int32(2) { return -int32(2) } (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fgzhead = head return m_Z_OK } // C documentation // // /* ========================================================================= */ func XdeflatePending(tls *libc.TLS, strm Tz_streamp, pending uintptr, bits uintptr) (r int32) { if _deflateStateCheck(tls, strm) != 0 { return -int32(2) } if pending != uintptr(m_Z_NULL) { *(*uint32)(unsafe.Pointer(pending)) = uint32((*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fpending) } if bits != uintptr(m_Z_NULL) { *(*int32)(unsafe.Pointer(bits)) = (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fbi_valid } return m_Z_OK } // C documentation // // /* ========================================================================= */ func XdeflatePrime(tls *libc.TLS, strm Tz_streamp, bits int32, value int32) (r int32) { var put int32 var s, p1 uintptr _, _, _ = put, s, p1 if _deflateStateCheck(tls, strm) != 0 { return -int32(2) } s = (*Tz_stream)(unsafe.Pointer(strm)).Fstate if bits < 0 || bits > int32(16) || (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf < (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_out+uintptr((libc.Int32FromInt32(m_Buf_size)+libc.Int32FromInt32(7))>>libc.Int32FromInt32(3)) { return -int32(5) } for cond := true; cond; cond = bits != 0 { put = int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid if put > bits { put = bits } p1 = s + 5936 *(*Tush)(unsafe.Pointer(p1)) = Tush(int32(*(*Tush)(unsafe.Pointer(p1))) | libc.Int32FromUint16(libc.Uint16FromInt32(value&(libc.Int32FromInt32(1)<>= put bits -= put } return m_Z_OK } // C documentation // // /* ========================================================================= */ func XdeflateParams(tls *libc.TLS, strm Tz_streamp, level int32, strategy int32) (r int32) { var err int32 var func1 Tcompress_func var s uintptr _, _, _ = err, func1, s if _deflateStateCheck(tls, strm) != 0 { return -int32(2) } s = (*Tz_stream)(unsafe.Pointer(strm)).Fstate if level == -int32(1) { level = int32(6) } if level < 0 || level > int32(9) || strategy < 0 || strategy > int32(m_Z_FIXED) { return -int32(2) } func1 = _configuration_table[(*Tdeflate_state)(unsafe.Pointer(s)).Flevel].Ffunc1 if (strategy != (*Tdeflate_state)(unsafe.Pointer(s)).Fstrategy || func1 != _configuration_table[level].Ffunc1) && (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush != -int32(2) { /* Flush the last buffer: */ err = Xdeflate(tls, strm, int32(m_Z_BLOCK)) if err == -int32(2) { return err } if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in != 0 || libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start+libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Flookahead) != 0 { return -int32(5) } } if (*Tdeflate_state)(unsafe.Pointer(s)).Flevel != level { if (*Tdeflate_state)(unsafe.Pointer(s)).Flevel == 0 && (*Tdeflate_state)(unsafe.Pointer(s)).Fmatches != uint32(0) { if (*Tdeflate_state)(unsafe.Pointer(s)).Fmatches == uint32(1) { _slide_hash(tls, s) } else { *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size-uint32(1))*2)) = uint16(m_NIL) libc.X__builtin___memset_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size-libc.Uint32FromInt32(1))*uint64(2), ^t__predefined_size_t(0)) } (*Tdeflate_state)(unsafe.Pointer(s)).Fmatches = uint32(0) } (*Tdeflate_state)(unsafe.Pointer(s)).Flevel = level (*Tdeflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = uint32(_configuration_table[level].Fmax_lazy) (*Tdeflate_state)(unsafe.Pointer(s)).Fgood_match = uint32(_configuration_table[level].Fgood_length) (*Tdeflate_state)(unsafe.Pointer(s)).Fnice_match = libc.Int32FromUint16(_configuration_table[level].Fnice_length) (*Tdeflate_state)(unsafe.Pointer(s)).Fmax_chain_length = uint32(_configuration_table[level].Fmax_chain) } (*Tdeflate_state)(unsafe.Pointer(s)).Fstrategy = strategy return m_Z_OK } // C documentation // // /* ========================================================================= */ func XdeflateTune(tls *libc.TLS, strm Tz_streamp, good_length int32, max_lazy int32, nice_length int32, max_chain int32) (r int32) { var s uintptr _ = s if _deflateStateCheck(tls, strm) != 0 { return -int32(2) } s = (*Tz_stream)(unsafe.Pointer(strm)).Fstate (*Tdeflate_state)(unsafe.Pointer(s)).Fgood_match = libc.Uint32FromInt32(good_length) (*Tdeflate_state)(unsafe.Pointer(s)).Fmax_lazy_match = libc.Uint32FromInt32(max_lazy) (*Tdeflate_state)(unsafe.Pointer(s)).Fnice_match = nice_length (*Tdeflate_state)(unsafe.Pointer(s)).Fmax_chain_length = libc.Uint32FromInt32(max_chain) return m_Z_OK } // C documentation // // /* ========================================================================= // * For the default windowBits of 15 and memLevel of 8, this function returns a // * close to exact, as well as small, upper bound on the compressed size. This // * is an expansion of ~0.03%, plus a small constant. // * // * For any setting other than those defaults for windowBits and memLevel, one // * of two worst case bounds is returned. This is at most an expansion of ~4% or // * ~13%, plus a small constant. // * // * Both the 0.03% and 4% derive from the overhead of stored blocks. The first // * one is for stored blocks of 16383 bytes (memLevel == 8), whereas the second // * is for stored blocks of 127 bytes (the worst case memLevel == 1). The // * expansion results from five bytes of header for each stored block. // * // * The larger expansion of 13% results from a window size less than or equal to // * the symbols buffer size (windowBits <= memLevel + 7). In that case some of // * the data being compressed may have slid out of the sliding window, impeding // * a stored block from being emitted. Then the only choice is a fixed or // * dynamic block, where a fixed block limits the maximum expansion to 9 bits // * per 8-bit byte, plus 10 bits for every block. The smallest block size for // * which this can occur is 255 (memLevel == 2). // * // * Shifts are used to approximate divisions, for speed. // */ func XdeflateBound(tls *libc.TLS, strm Tz_streamp, sourceLen TuLong) (r TuLong) { var fixedlen, storelen, wraplen TuLong var s, str, v3, v5 uintptr var v1, v7 uint64 var v2 int32 _, _, _, _, _, _, _, _, _, _ = fixedlen, s, storelen, str, wraplen, v1, v2, v3, v5, v7 /* upper bound for fixed blocks with 9-bit literals and length 255 (memLevel == 2, which is the lowest that may not use stored blocks) -- ~13% overhead plus a small constant */ fixedlen = sourceLen + sourceLen>>libc.Int32FromInt32(3) + sourceLen>>libc.Int32FromInt32(8) + sourceLen>>libc.Int32FromInt32(9) + uint64(4) /* upper bound for stored blocks with length 127 (memLevel == 1) -- ~4% overhead plus a small constant */ storelen = sourceLen + sourceLen>>libc.Int32FromInt32(5) + sourceLen>>libc.Int32FromInt32(7) + sourceLen>>libc.Int32FromInt32(11) + uint64(7) /* if can't get parameters, return larger bound plus a zlib wrapper */ if _deflateStateCheck(tls, strm) != 0 { if fixedlen > storelen { v1 = fixedlen } else { v1 = storelen } return v1 + uint64(6) } /* compute wrapper length */ s = (*Tz_stream)(unsafe.Pointer(strm)).Fstate switch (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap { case 0: /* raw deflate */ wraplen = uint64(0) case int32(1): /* zlib wrapper */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart != 0 { v2 = int32(4) } else { v2 = 0 } wraplen = libc.Uint64FromInt32(int32(6) + v2) case int32(2): /* gzip wrapper */ wraplen = uint64(18) if (*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead != uintptr(m_Z_NULL) { if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(m_Z_NULL) { wraplen += uint64(uint32(2) + (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len) } str = (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname if str != uintptr(m_Z_NULL) { for { wraplen++ goto _4 _4: ; v3 = str str++ if !(*(*TBytef)(unsafe.Pointer(v3)) != 0) { break } } } str = (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment if str != uintptr(m_Z_NULL) { for { wraplen++ goto _6 _6: ; v5 = str str++ if !(*(*TBytef)(unsafe.Pointer(v5)) != 0) { break } } } if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { wraplen += uint64(2) } } default: /* for compiler happiness */ wraplen = uint64(6) } /* if not default parameters, return one of the conservative bounds */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fw_bits != uint32(15) || (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_bits != libc.Uint32FromInt32(libc.Int32FromInt32(8)+libc.Int32FromInt32(7)) { if (*Tdeflate_state)(unsafe.Pointer(s)).Fw_bits <= (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_bits && (*Tdeflate_state)(unsafe.Pointer(s)).Flevel != 0 { v7 = fixedlen } else { v7 = storelen } return v7 + wraplen } /* default settings: return tight bound for that case -- ~0.03% overhead plus a small constant */ return sourceLen + sourceLen>>libc.Int32FromInt32(12) + sourceLen>>libc.Int32FromInt32(14) + sourceLen>>libc.Int32FromInt32(25) + uint64(13) - uint64(6) + wraplen } // C documentation // // /* ========================================================================= // * Put a short in the pending buffer. The 16-bit value is put in MSB order. // * IN assertion: the stream state is correct and there is enough room in // * pending_buf. // */ func _putShortMSB(tls *libc.TLS, s uintptr, b TuInt) { var v1, v3 Tulg var v2, v4 uintptr _, _, _, _ = v1, v2, v3, v4 v2 = s + 40 v1 = *(*Tulg)(unsafe.Pointer(v2)) *(*Tulg)(unsafe.Pointer(v2))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v1))) = uint8(b >> libc.Int32FromInt32(8)) v4 = s + 40 v3 = *(*Tulg)(unsafe.Pointer(v4)) *(*Tulg)(unsafe.Pointer(v4))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v3))) = uint8(b & libc.Uint32FromInt32(0xff)) } // C documentation // // /* ========================================================================= // * Flush as much pending output as possible. All deflate() output, except for // * some deflate_stored() output, goes through this function so some // * applications may wish to modify it to avoid allocating a large // * strm->next_out buffer and copying into it. (See also read_buf()). // */ func _flush_pending(tls *libc.TLS, strm Tz_streamp) { var len1 uint32 var s uintptr _, _ = len1, s s = (*Tz_stream)(unsafe.Pointer(strm)).Fstate x__tr_flush_bits(tls, s) len1 = uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fpending) if len1 > (*Tz_stream)(unsafe.Pointer(strm)).Favail_out { len1 = (*Tz_stream)(unsafe.Pointer(strm)).Favail_out } if len1 == uint32(0) { return } libc.X__builtin___memcpy_chk(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_out, uint64(len1), ^t__predefined_size_t(0)) *(*uintptr)(unsafe.Pointer(strm + 24)) += uintptr(len1) *(*uintptr)(unsafe.Pointer(s + 32)) += uintptr(len1) *(*TuLong)(unsafe.Pointer(strm + 40)) += uint64(len1) *(*TuInt)(unsafe.Pointer(strm + 32)) -= len1 *(*Tulg)(unsafe.Pointer(s + 40)) -= uint64(len1) if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending == uint64(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_out = (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf } } /* =========================================================================== * Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. */ // C documentation // // /* ========================================================================= */ func Xdeflate(tls *libc.TLS, strm Tz_streamp, flush int32) (r int32) { var beg, beg1, beg2, v10, v12, v14, v16, v18, v20, v24, v26, v33, v35, v37, v39, v4, v41, v45, v47, v49, v51, v53, v55, v57, v59, v6, v61, v66, v68, v70, v72, v74, v76, v78, v8, v80 Tulg var bstate Tblock_state var copy1, header, left, level_flags TuInt var old_flush, val, val1, v1, v2, v22, v23, v28, v29, v30, v31, v32, v43, v44, v63, v64, v65, v82 int32 var s, v11, v13, v15, v17, v19, v21, v25, v27, v34, v36, v38, v40, v42, v46, v48, v5, v50, v52, v54, v56, v58, v60, v62, v67, v69, v7, v71, v73, v75, v77, v79, v81, v9 uintptr var v3 bool _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = beg, beg1, beg2, bstate, copy1, header, left, level_flags, old_flush, s, val, val1, v1, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v4, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v5, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v6, v60, v61, v62, v63, v64, v65, v66, v67, v68, v69, v7, v70, v71, v72, v73, v74, v75, v76, v77, v78, v79, v8, v80, v81, v82, v9 if _deflateStateCheck(tls, strm) != 0 || flush > int32(m_Z_BLOCK) || flush < 0 { return -int32(2) } s = (*Tz_stream)(unsafe.Pointer(strm)).Fstate if (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out == uintptr(m_Z_NULL) || (*Tz_stream)(unsafe.Pointer(strm)).Favail_in != uint32(0) && (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in == uintptr(m_Z_NULL) || (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus == int32(m_FINISH_STATE) && flush != int32(m_Z_FINISH) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[libc.Int32FromInt32(2) - -libc.Int32FromInt32(2)] return -libc.Int32FromInt32(2) } if (*Tz_stream)(unsafe.Pointer(strm)).Favail_out == uint32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[libc.Int32FromInt32(2) - -libc.Int32FromInt32(5)] return -libc.Int32FromInt32(5) } old_flush = (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = flush /* Flush as much pending output as possible */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { _flush_pending(tls, strm) if (*Tz_stream)(unsafe.Pointer(strm)).Favail_out == uint32(0) { /* Since avail_out is 0, deflate will be called again with * more output space, but possibly with both pending and * avail_in equal to zero. There won't be anything to do, * but this is not an error situation so make sure we * return OK instead of BUF_ERROR at next call of deflate: */ (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(1) return m_Z_OK } /* Make sure there is something to do and avoid duplicate consecutive * flushes. For repeated and useless calls with Z_FINISH, we keep * returning Z_STREAM_END instead of Z_BUF_ERROR. */ } else { if v3 = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in == uint32(0); v3 { if flush > int32(4) { v1 = int32(9) } else { v1 = 0 } if old_flush > int32(4) { v2 = int32(9) } else { v2 = 0 } } if v3 && flush*int32(2)-v1 <= old_flush*int32(2)-v2 && flush != int32(m_Z_FINISH) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[libc.Int32FromInt32(2) - -libc.Int32FromInt32(5)] return -libc.Int32FromInt32(5) } } /* User must not provide more input after the first FINISH: */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus == int32(m_FINISH_STATE) && (*Tz_stream)(unsafe.Pointer(strm)).Favail_in != uint32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = Xz_errmsg[libc.Int32FromInt32(2) - -libc.Int32FromInt32(5)] return -libc.Int32FromInt32(5) } /* Write the header */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus == int32(m_INIT_STATE) && (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap == 0 { (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_BUSY_STATE) } if (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus == int32(m_INIT_STATE) { /* zlib header */ header = (uint32(m_Z_DEFLATED) + ((*Tdeflate_state)(unsafe.Pointer(s)).Fw_bits-uint32(8))<= int32(m_Z_HUFFMAN_ONLY) || (*Tdeflate_state)(unsafe.Pointer(s)).Flevel < int32(2) { level_flags = uint32(0) } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Flevel < int32(6) { level_flags = uint32(1) } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Flevel == int32(6) { level_flags = uint32(2) } else { level_flags = uint32(3) } } } header |= level_flags << libc.Int32FromInt32(6) if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart != uint32(0) { header |= uint32(m_PRESET_DICT1) } header += uint32(31) - header%uint32(31) _putShortMSB(tls, s, header) /* Save the adler32 of the preset dictionary: */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart != uint32(0) { _putShortMSB(tls, s, uint32((*Tz_stream)(unsafe.Pointer(strm)).Fadler>>libc.Int32FromInt32(16))) _putShortMSB(tls, s, uint32((*Tz_stream)(unsafe.Pointer(strm)).Fadler&libc.Uint64FromInt32(0xffff))) } (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xadler32(tls, uint64(0), uintptr(m_Z_NULL), uint32(0)) (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_BUSY_STATE) /* Compression must start with an empty pending buffer */ _flush_pending(tls, strm) if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(1) return m_Z_OK } } if (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus == int32(m_GZIP_STATE) { /* gzip header */ (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(m_Z_NULL), uint32(0)) v5 = s + 40 v4 = *(*Tulg)(unsafe.Pointer(v5)) *(*Tulg)(unsafe.Pointer(v5))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v4))) = libc.Uint8FromInt32(libc.Int32FromInt32(31)) v7 = s + 40 v6 = *(*Tulg)(unsafe.Pointer(v7)) *(*Tulg)(unsafe.Pointer(v7))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v6))) = libc.Uint8FromInt32(libc.Int32FromInt32(139)) v9 = s + 40 v8 = *(*Tulg)(unsafe.Pointer(v9)) *(*Tulg)(unsafe.Pointer(v9))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v8))) = libc.Uint8FromInt32(libc.Int32FromInt32(8)) if (*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead == uintptr(m_Z_NULL) { v11 = s + 40 v10 = *(*Tulg)(unsafe.Pointer(v11)) *(*Tulg)(unsafe.Pointer(v11))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v10))) = libc.Uint8FromInt32(libc.Int32FromInt32(0)) v13 = s + 40 v12 = *(*Tulg)(unsafe.Pointer(v13)) *(*Tulg)(unsafe.Pointer(v13))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v12))) = libc.Uint8FromInt32(libc.Int32FromInt32(0)) v15 = s + 40 v14 = *(*Tulg)(unsafe.Pointer(v15)) *(*Tulg)(unsafe.Pointer(v15))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v14))) = libc.Uint8FromInt32(libc.Int32FromInt32(0)) v17 = s + 40 v16 = *(*Tulg)(unsafe.Pointer(v17)) *(*Tulg)(unsafe.Pointer(v17))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v16))) = libc.Uint8FromInt32(libc.Int32FromInt32(0)) v19 = s + 40 v18 = *(*Tulg)(unsafe.Pointer(v19)) *(*Tulg)(unsafe.Pointer(v19))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v18))) = libc.Uint8FromInt32(libc.Int32FromInt32(0)) v21 = s + 40 v20 = *(*Tulg)(unsafe.Pointer(v21)) *(*Tulg)(unsafe.Pointer(v21))++ if (*Tdeflate_state)(unsafe.Pointer(s)).Flevel == int32(9) { v22 = int32(2) } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrategy >= int32(m_Z_HUFFMAN_ONLY) || (*Tdeflate_state)(unsafe.Pointer(s)).Flevel < int32(2) { v23 = int32(4) } else { v23 = 0 } v22 = v23 } *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v20))) = libc.Uint8FromInt32(v22) v25 = s + 40 v24 = *(*Tulg)(unsafe.Pointer(v25)) *(*Tulg)(unsafe.Pointer(v25))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v24))) = libc.Uint8FromInt32(libc.Int32FromInt32(m_OS_CODE)) (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_BUSY_STATE) /* Compression must start with an empty pending buffer */ _flush_pending(tls, strm) if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(1) return m_Z_OK } } else { v27 = s + 40 v26 = *(*Tulg)(unsafe.Pointer(v27)) *(*Tulg)(unsafe.Pointer(v27))++ if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftext != 0 { v28 = int32(1) } else { v28 = 0 } if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { v29 = int32(2) } else { v29 = 0 } if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra == uintptr(m_Z_NULL) { v30 = 0 } else { v30 = int32(4) } if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname == uintptr(m_Z_NULL) { v31 = 0 } else { v31 = int32(8) } if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment == uintptr(m_Z_NULL) { v32 = 0 } else { v32 = int32(16) } *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v26))) = libc.Uint8FromInt32(v28 + v29 + v30 + v31 + v32) v34 = s + 40 v33 = *(*Tulg)(unsafe.Pointer(v34)) *(*Tulg)(unsafe.Pointer(v34))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v33))) = uint8((*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime & libc.Uint64FromInt32(0xff)) v36 = s + 40 v35 = *(*Tulg)(unsafe.Pointer(v36)) *(*Tulg)(unsafe.Pointer(v36))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v35))) = uint8((*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> libc.Int32FromInt32(8) & libc.Uint64FromInt32(0xff)) v38 = s + 40 v37 = *(*Tulg)(unsafe.Pointer(v38)) *(*Tulg)(unsafe.Pointer(v38))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v37))) = uint8((*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> libc.Int32FromInt32(16) & libc.Uint64FromInt32(0xff)) v40 = s + 40 v39 = *(*Tulg)(unsafe.Pointer(v40)) *(*Tulg)(unsafe.Pointer(v40))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v39))) = uint8((*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Ftime >> libc.Int32FromInt32(24) & libc.Uint64FromInt32(0xff)) v42 = s + 40 v41 = *(*Tulg)(unsafe.Pointer(v42)) *(*Tulg)(unsafe.Pointer(v42))++ if (*Tdeflate_state)(unsafe.Pointer(s)).Flevel == int32(9) { v43 = int32(2) } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrategy >= int32(m_Z_HUFFMAN_ONLY) || (*Tdeflate_state)(unsafe.Pointer(s)).Flevel < int32(2) { v44 = int32(4) } else { v44 = 0 } v43 = v44 } *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v41))) = libc.Uint8FromInt32(v43) v46 = s + 40 v45 = *(*Tulg)(unsafe.Pointer(v46)) *(*Tulg)(unsafe.Pointer(v46))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v45))) = libc.Uint8FromInt32((*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fos & libc.Int32FromInt32(0xff)) if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(m_Z_NULL) { v48 = s + 40 v47 = *(*Tulg)(unsafe.Pointer(v48)) *(*Tulg)(unsafe.Pointer(v48))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v47))) = uint8((*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len & libc.Uint32FromInt32(0xff)) v50 = s + 40 v49 = *(*Tulg)(unsafe.Pointer(v50)) *(*Tulg)(unsafe.Pointer(v50))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v49))) = uint8((*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len >> libc.Int32FromInt32(8) & libc.Uint32FromInt32(0xff)) } if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fadler, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf, uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fpending)) } (*Tdeflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_EXTRA_STATE) } } if (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus == int32(m_EXTRA_STATE) { if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra != uintptr(m_Z_NULL) { beg = (*Tdeflate_state)(unsafe.Pointer(s)).Fpending /* start of bytes to update crc */ left = uint32(uint64((*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra_len&libc.Uint32FromInt32(0xffff)) - (*Tdeflate_state)(unsafe.Pointer(s)).Fgzindex) for (*Tdeflate_state)(unsafe.Pointer(s)).Fpending+uint64(left) > (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size { copy1 = uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size - (*Tdeflate_state)(unsafe.Pointer(s)).Fpending) libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fpending), (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fgzindex), uint64(copy1), ^t__predefined_size_t(0)) (*Tdeflate_state)(unsafe.Pointer(s)).Fpending = (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Tdeflate_state)(unsafe.Pointer(s)).Fpending > beg { (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fadler, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fpending-beg)) } *(*Tulg)(unsafe.Pointer(s + 64)) += uint64(copy1) _flush_pending(tls, strm) if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(1) return m_Z_OK } beg = uint64(0) left -= copy1 } libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fpending), (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fextra+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fgzindex), uint64(left), ^t__predefined_size_t(0)) *(*Tulg)(unsafe.Pointer(s + 40)) += uint64(left) if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Tdeflate_state)(unsafe.Pointer(s)).Fpending > beg { (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fadler, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg), uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fpending-beg)) } (*Tdeflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) } (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_NAME_STATE) } if (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus == int32(m_NAME_STATE) { if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname != uintptr(m_Z_NULL) { beg1 = (*Tdeflate_state)(unsafe.Pointer(s)).Fpending for cond := true; cond; cond = val != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending == (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size { if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Tdeflate_state)(unsafe.Pointer(s)).Fpending > beg1 { (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fadler, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg1), uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fpending-beg1)) } _flush_pending(tls, strm) if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(1) return m_Z_OK } beg1 = uint64(0) } v52 = s + 64 v51 = *(*Tulg)(unsafe.Pointer(v52)) *(*Tulg)(unsafe.Pointer(v52))++ val = libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer((*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fname + uintptr(v51)))) v54 = s + 40 v53 = *(*Tulg)(unsafe.Pointer(v54)) *(*Tulg)(unsafe.Pointer(v54))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v53))) = libc.Uint8FromInt32(val) } if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Tdeflate_state)(unsafe.Pointer(s)).Fpending > beg1 { (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fadler, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg1), uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fpending-beg1)) } (*Tdeflate_state)(unsafe.Pointer(s)).Fgzindex = uint64(0) } (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_COMMENT_STATE) } if (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus == int32(m_COMMENT_STATE) { if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment != uintptr(m_Z_NULL) { beg2 = (*Tdeflate_state)(unsafe.Pointer(s)).Fpending for cond := true; cond; cond = val1 != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending == (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size { if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Tdeflate_state)(unsafe.Pointer(s)).Fpending > beg2 { (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fadler, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg2), uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fpending-beg2)) } _flush_pending(tls, strm) if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(1) return m_Z_OK } beg2 = uint64(0) } v56 = s + 64 v55 = *(*Tulg)(unsafe.Pointer(v56)) *(*Tulg)(unsafe.Pointer(v56))++ val1 = libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer((*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fcomment + uintptr(v55)))) v58 = s + 40 v57 = *(*Tulg)(unsafe.Pointer(v58)) *(*Tulg)(unsafe.Pointer(v58))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v57))) = libc.Uint8FromInt32(val1) } if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 && (*Tdeflate_state)(unsafe.Pointer(s)).Fpending > beg2 { (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fadler, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr(beg2), uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fpending-beg2)) } } (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_HCRC_STATE) } if (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus == int32(m_HCRC_STATE) { if (*Tgz_header)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fgzhead)).Fhcrc != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending+uint64(2) > (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size { _flush_pending(tls, strm) if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(1) return m_Z_OK } } v60 = s + 40 v59 = *(*Tulg)(unsafe.Pointer(v60)) *(*Tulg)(unsafe.Pointer(v60))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v59))) = uint8((*Tz_stream)(unsafe.Pointer(strm)).Fadler & libc.Uint64FromInt32(0xff)) v62 = s + 40 v61 = *(*Tulg)(unsafe.Pointer(v62)) *(*Tulg)(unsafe.Pointer(v62))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v61))) = uint8((*Tz_stream)(unsafe.Pointer(strm)).Fadler >> libc.Int32FromInt32(8) & libc.Uint64FromInt32(0xff)) (*Tz_stream)(unsafe.Pointer(strm)).Fadler = Xcrc32(tls, uint64(0), uintptr(m_Z_NULL), uint32(0)) } (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_BUSY_STATE) /* Compression must start with an empty pending buffer */ _flush_pending(tls, strm) if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(1) return m_Z_OK } } /* Start a new block or continue the current one. */ if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in != uint32(0) || (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead != uint32(0) || flush != m_Z_NO_FLUSH && (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus != int32(m_FINISH_STATE) { if (*Tdeflate_state)(unsafe.Pointer(s)).Flevel == 0 { v63 = _deflate_stored(tls, s, flush) } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrategy == int32(m_Z_HUFFMAN_ONLY) { v64 = _deflate_huff(tls, s, flush) } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrategy == int32(m_Z_RLE) { v65 = _deflate_rle(tls, s, flush) } else { v65 = (*(*func(*libc.TLS, uintptr, int32) Tblock_state)(unsafe.Pointer(&struct{ uintptr }{_configuration_table[(*Tdeflate_state)(unsafe.Pointer(s)).Flevel].Ffunc1})))(tls, s, flush) } v64 = v65 } v63 = v64 } bstate = v63 if bstate == int32(_finish_started) || bstate == int32(_finish_done) { (*Tdeflate_state)(unsafe.Pointer(s)).Fstatus = int32(m_FINISH_STATE) } if bstate == int32(_need_more) || bstate == int32(_finish_started) { if (*Tz_stream)(unsafe.Pointer(strm)).Favail_out == uint32(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(1) /* avoid BUF_ERROR next call, see above */ } return m_Z_OK /* If flush != Z_NO_FLUSH && avail_out == 0, the next call * of deflate should use the same flush parameter to make sure * that the flush is complete. So we don't have to output an * empty block here, this will be done at next call. This also * ensures that for a very small output buffer, we emit at most * one empty block. */ } if bstate == int32(_block_done) { if flush == int32(m_Z_PARTIAL_FLUSH) { x__tr_align(tls, s) } else { if flush != int32(m_Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ x__tr_stored_block(tls, s, libc.UintptrFromInt32(0), uint64(0), 0) /* For a full flush, this empty block will be recognized * as a special marker by inflate_sync(). */ if flush == int32(m_Z_FULL_FLUSH) { *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size-uint32(1))*2)) = uint16(m_NIL) libc.X__builtin___memset_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fhead, 0, uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fhash_size-libc.Uint32FromInt32(1))*uint64(2), ^t__predefined_size_t(0)) /* forget history */ if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead == uint32(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart = uint32(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = 0 (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = uint32(0) } } } } _flush_pending(tls, strm) if (*Tz_stream)(unsafe.Pointer(strm)).Favail_out == uint32(0) { (*Tdeflate_state)(unsafe.Pointer(s)).Flast_flush = -int32(1) /* avoid BUF_ERROR at next call, see above */ return m_Z_OK } } } if flush != int32(m_Z_FINISH) { return m_Z_OK } if (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap <= 0 { return int32(m_Z_STREAM_END) } /* Write the trailer */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap == int32(2) { v67 = s + 40 v66 = *(*Tulg)(unsafe.Pointer(v67)) *(*Tulg)(unsafe.Pointer(v67))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v66))) = uint8((*Tz_stream)(unsafe.Pointer(strm)).Fadler & libc.Uint64FromInt32(0xff)) v69 = s + 40 v68 = *(*Tulg)(unsafe.Pointer(v69)) *(*Tulg)(unsafe.Pointer(v69))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v68))) = uint8((*Tz_stream)(unsafe.Pointer(strm)).Fadler >> libc.Int32FromInt32(8) & libc.Uint64FromInt32(0xff)) v71 = s + 40 v70 = *(*Tulg)(unsafe.Pointer(v71)) *(*Tulg)(unsafe.Pointer(v71))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v70))) = uint8((*Tz_stream)(unsafe.Pointer(strm)).Fadler >> libc.Int32FromInt32(16) & libc.Uint64FromInt32(0xff)) v73 = s + 40 v72 = *(*Tulg)(unsafe.Pointer(v73)) *(*Tulg)(unsafe.Pointer(v73))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v72))) = uint8((*Tz_stream)(unsafe.Pointer(strm)).Fadler >> libc.Int32FromInt32(24) & libc.Uint64FromInt32(0xff)) v75 = s + 40 v74 = *(*Tulg)(unsafe.Pointer(v75)) *(*Tulg)(unsafe.Pointer(v75))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v74))) = uint8((*Tz_stream)(unsafe.Pointer(strm)).Ftotal_in & libc.Uint64FromInt32(0xff)) v77 = s + 40 v76 = *(*Tulg)(unsafe.Pointer(v77)) *(*Tulg)(unsafe.Pointer(v77))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v76))) = uint8((*Tz_stream)(unsafe.Pointer(strm)).Ftotal_in >> libc.Int32FromInt32(8) & libc.Uint64FromInt32(0xff)) v79 = s + 40 v78 = *(*Tulg)(unsafe.Pointer(v79)) *(*Tulg)(unsafe.Pointer(v79))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v78))) = uint8((*Tz_stream)(unsafe.Pointer(strm)).Ftotal_in >> libc.Int32FromInt32(16) & libc.Uint64FromInt32(0xff)) v81 = s + 40 v80 = *(*Tulg)(unsafe.Pointer(v81)) *(*Tulg)(unsafe.Pointer(v81))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v80))) = uint8((*Tz_stream)(unsafe.Pointer(strm)).Ftotal_in >> libc.Int32FromInt32(24) & libc.Uint64FromInt32(0xff)) } else { _putShortMSB(tls, s, uint32((*Tz_stream)(unsafe.Pointer(strm)).Fadler>>libc.Int32FromInt32(16))) _putShortMSB(tls, s, uint32((*Tz_stream)(unsafe.Pointer(strm)).Fadler&libc.Uint64FromInt32(0xffff))) } _flush_pending(tls, strm) /* If avail_out is zero, the application will call deflate again * to flush the rest. */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap > 0 { (*Tdeflate_state)(unsafe.Pointer(s)).Fwrap = -(*Tdeflate_state)(unsafe.Pointer(s)).Fwrap } /* write the trailer only once! */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending != uint64(0) { v82 = m_Z_OK } else { v82 = int32(m_Z_STREAM_END) } return v82 } // C documentation // // /* ========================================================================= */ func XdeflateEnd(tls *libc.TLS, strm Tz_streamp) (r int32) { var status, v1 int32 _, _ = status, v1 if _deflateStateCheck(tls, strm) != 0 { return -int32(2) } status = (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fstatus /* Deallocate in reverse order of allocations: */ if (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf != 0 { (*(*func(*libc.TLS, Tvoidpf, Tvoidpf))(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzfree})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fpending_buf) } if (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fhead != 0 { (*(*func(*libc.TLS, Tvoidpf, Tvoidpf))(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzfree})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fhead) } if (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fprev != 0 { (*(*func(*libc.TLS, Tvoidpf, Tvoidpf))(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzfree})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fprev) } if (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow != 0 { (*(*func(*libc.TLS, Tvoidpf, Tvoidpf))(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzfree})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tinternal_state)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fstate)).Fwindow) } (*(*func(*libc.TLS, Tvoidpf, Tvoidpf))(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzfree})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tz_stream)(unsafe.Pointer(strm)).Fstate) (*Tz_stream)(unsafe.Pointer(strm)).Fstate = uintptr(m_Z_NULL) if status == int32(m_BUSY_STATE) { v1 = -int32(3) } else { v1 = m_Z_OK } return v1 } // C documentation // // /* ========================================================================= // * Copy the source state to the destination state. // * To simplify the source, this is not supported for 16-bit MSDOS (which // * doesn't have enough memory anyway to duplicate compression states). // */ func XdeflateCopy(tls *libc.TLS, dest Tz_streamp, source Tz_streamp) (r int32) { var ds, ss uintptr _, _ = ds, ss if _deflateStateCheck(tls, source) != 0 || dest == uintptr(m_Z_NULL) { return -int32(2) } ss = (*Tz_stream)(unsafe.Pointer(source)).Fstate libc.X__builtin___memcpy_chk(tls, dest, source, uint64(112), ^t__predefined_size_t(0)) ds = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(dest)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(dest)).Fopaque, libc.Uint32FromInt32(libc.Int32FromInt32(1)), uint32(libc.Uint64FromInt64(5952))) if ds == uintptr(m_Z_NULL) { return -int32(4) } (*Tz_stream)(unsafe.Pointer(dest)).Fstate = ds libc.X__builtin___memcpy_chk(tls, ds, ss, uint64(5952), ^t__predefined_size_t(0)) (*Tdeflate_state)(unsafe.Pointer(ds)).Fstrm = dest (*Tdeflate_state)(unsafe.Pointer(ds)).Fwindow = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(dest)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(dest)).Fopaque, (*Tdeflate_state)(unsafe.Pointer(ds)).Fw_size, uint32(libc.Uint64FromInt32(2)*libc.Uint64FromInt64(1))) (*Tdeflate_state)(unsafe.Pointer(ds)).Fprev = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(dest)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(dest)).Fopaque, (*Tdeflate_state)(unsafe.Pointer(ds)).Fw_size, uint32(libc.Uint64FromInt64(2))) (*Tdeflate_state)(unsafe.Pointer(ds)).Fhead = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(dest)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(dest)).Fopaque, (*Tdeflate_state)(unsafe.Pointer(ds)).Fhash_size, uint32(libc.Uint64FromInt64(2))) (*Tdeflate_state)(unsafe.Pointer(ds)).Fpending_buf = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(dest)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(dest)).Fopaque, (*Tdeflate_state)(unsafe.Pointer(ds)).Flit_bufsize, libc.Uint32FromInt32(libc.Int32FromInt32(m_LIT_BUFS))) if (*Tdeflate_state)(unsafe.Pointer(ds)).Fwindow == uintptr(m_Z_NULL) || (*Tdeflate_state)(unsafe.Pointer(ds)).Fprev == uintptr(m_Z_NULL) || (*Tdeflate_state)(unsafe.Pointer(ds)).Fhead == uintptr(m_Z_NULL) || (*Tdeflate_state)(unsafe.Pointer(ds)).Fpending_buf == uintptr(m_Z_NULL) { XdeflateEnd(tls, dest) return -int32(4) } /* following zmemcpy do not work for 16-bit MSDOS */ libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(ds)).Fwindow, (*Tdeflate_state)(unsafe.Pointer(ss)).Fwindow, uint64((*Tdeflate_state)(unsafe.Pointer(ds)).Fw_size*uint32(2))*uint64(1), ^t__predefined_size_t(0)) libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(ds)).Fprev, (*Tdeflate_state)(unsafe.Pointer(ss)).Fprev, uint64((*Tdeflate_state)(unsafe.Pointer(ds)).Fw_size)*uint64(2), ^t__predefined_size_t(0)) libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(ds)).Fhead, (*Tdeflate_state)(unsafe.Pointer(ss)).Fhead, uint64((*Tdeflate_state)(unsafe.Pointer(ds)).Fhash_size)*uint64(2), ^t__predefined_size_t(0)) libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(ds)).Fpending_buf, (*Tdeflate_state)(unsafe.Pointer(ss)).Fpending_buf, uint64((*Tdeflate_state)(unsafe.Pointer(ds)).Flit_bufsize*uint32(m_LIT_BUFS)), ^t__predefined_size_t(0)) (*Tdeflate_state)(unsafe.Pointer(ds)).Fpending_out = (*Tdeflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr(int64((*Tdeflate_state)(unsafe.Pointer(ss)).Fpending_out)-int64((*Tdeflate_state)(unsafe.Pointer(ss)).Fpending_buf)) (*Tdeflate_state)(unsafe.Pointer(ds)).Fsym_buf = (*Tdeflate_state)(unsafe.Pointer(ds)).Fpending_buf + uintptr((*Tdeflate_state)(unsafe.Pointer(ds)).Flit_bufsize) (*Tdeflate_state)(unsafe.Pointer(ds)).Fl_desc.Fdyn_tree = ds + 212 (*Tdeflate_state)(unsafe.Pointer(ds)).Fd_desc.Fdyn_tree = ds + 2504 (*Tdeflate_state)(unsafe.Pointer(ds)).Fbl_desc.Fdyn_tree = ds + 2748 return m_Z_OK } // C documentation // // /* =========================================================================== // * Set match_start to the longest match starting at the given string and // * return its length. Matches shorter or equal to prev_length are discarded, // * in which case the result is equal to prev_length and match_start is // * garbage. // * IN assertions: cur_match is the head of the hash chain for the current // * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 // * OUT assertion: the match length is not greater than s->lookahead. // */ func _longest_match(tls *libc.TLS, s uintptr, cur_match TIPos) (r TuInt) { var best_len, len1, nice_match int32 var chain_length, v1, v3 uint32 var limit, v2 TIPos var match, prev, scan, strend, v10, v11, v13, v14, v16, v17, v19, v20, v22, v23, v25, v26, v28, v29, v6, v8, v9 uintptr var scan_end, scan_end1 TByte var wmask TuInt var v12, v15, v18, v21, v24, v27, v30, v4, v7 bool _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = best_len, chain_length, len1, limit, match, nice_match, prev, scan, scan_end, scan_end1, strend, wmask, v1, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v3, v30, v4, v6, v7, v8, v9 chain_length = (*Tdeflate_state)(unsafe.Pointer(s)).Fmax_chain_length /* max hash chain length */ scan = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) /* length of current match */ best_len = libc.Int32FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fprev_length) /* best match length so far */ nice_match = (*Tdeflate_state)(unsafe.Pointer(s)).Fnice_match if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart > (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size-libc.Uint32FromInt32(libc.Int32FromInt32(m_MAX_MATCH)+libc.Int32FromInt32(m_MIN_MATCH)+libc.Int32FromInt32(1)) { v1 = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart - ((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size - libc.Uint32FromInt32(libc.Int32FromInt32(m_MAX_MATCH)+libc.Int32FromInt32(m_MIN_MATCH)+libc.Int32FromInt32(1))) } else { v1 = uint32(m_NIL) } /* stop if match long enough */ limit = v1 /* Stop when cur_match becomes <= limit. To simplify the code, * we prevent matches with the string of window index 0. */ prev = (*Tdeflate_state)(unsafe.Pointer(s)).Fprev wmask = (*Tdeflate_state)(unsafe.Pointer(s)).Fw_mask strend = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(m_MAX_MATCH) scan_end1 = *(*TBytef)(unsafe.Pointer(scan + uintptr(best_len-int32(1)))) scan_end = *(*TBytef)(unsafe.Pointer(scan + uintptr(best_len))) /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. * It is easy to get rid of this optimization if necessary. */ /* Do not waste too much time if we already have a good match: */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fprev_length >= (*Tdeflate_state)(unsafe.Pointer(s)).Fgood_match { chain_length >>= uint32(2) } /* Do not look for matches beyond the end of the input. This is necessary * to make deflate deterministic. */ if libc.Uint32FromInt32(nice_match) > (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead { nice_match = libc.Int32FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Flookahead) } for { match = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(cur_match) /* Skip to next match if the match length cannot increase * or if the match length is less than 2. Note that the checks below * for insufficient lookahead only occur occasionally for performance * reasons. Therefore uninitialized memory will be accessed, and * conditional jumps will be made that depend on those values. * However the length of the match is limited to the lookahead, so * the output of deflate is not affected by the uninitialized values. */ if v7 = libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(match + uintptr(best_len)))) != libc.Int32FromUint8(scan_end) || libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(match + uintptr(best_len-int32(1))))) != libc.Int32FromUint8(scan_end1) || libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(match))) != libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(scan))); !v7 { match++ v6 = match } if v7 || libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v6))) != libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(scan + 1))) { goto _5 } /* The check at best_len - 1 can be removed because it will be made * again later. (This heuristic is not always a win.) * It is not necessary to compare scan[2] and match[2] since they * are always equal when the other bytes match, given that * the hash keys are equal and that HASH_BITS >= 8. */ scan += uintptr(2) /* The check at best_len - 1 can be removed because it will be made * again later. (This heuristic is not always a win.) * It is not necessary to compare scan[2] and match[2] since they * are always equal when the other bytes match, given that * the hash keys are equal and that HASH_BITS >= 8. */ match++ /* We check for insufficient lookahead only every 8th comparison; * the 256th check will be made at strstart + 258. */ for { goto _31 _31: ; scan++ v8 = scan match++ v9 = match if v12 = libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v8))) == libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v9))); v12 { scan++ v10 = scan match++ v11 = match } if v15 = v12 && libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v10))) == libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v11))); v15 { scan++ v13 = scan match++ v14 = match } if v18 = v15 && libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v13))) == libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v14))); v18 { scan++ v16 = scan match++ v17 = match } if v21 = v18 && libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v16))) == libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v17))); v21 { scan++ v19 = scan match++ v20 = match } if v24 = v21 && libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v19))) == libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v20))); v24 { scan++ v22 = scan match++ v23 = match } if v27 = v24 && libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v22))) == libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v23))); v27 { scan++ v25 = scan match++ v26 = match } if v30 = v27 && libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v25))) == libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v26))); v30 { scan++ v28 = scan match++ v29 = match } if !(v30 && libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v28))) == libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer(v29))) && scan < strend) { break } } len1 = int32(m_MAX_MATCH) - int32(int64(strend)-int64(scan)) scan = strend - uintptr(m_MAX_MATCH) if len1 > best_len { (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_start = cur_match best_len = len1 if len1 >= nice_match { break } scan_end1 = *(*TBytef)(unsafe.Pointer(scan + uintptr(best_len-int32(1)))) scan_end = *(*TBytef)(unsafe.Pointer(scan + uintptr(best_len))) } goto _5 _5: ; v2 = uint32(*(*TPosf)(unsafe.Pointer(prev + uintptr(cur_match&wmask)*2))) cur_match = v2 if v4 = v2 > limit; v4 { chain_length-- v3 = chain_length } if !(v4 && v3 != uint32(0)) { break } } if libc.Uint32FromInt32(best_len) <= (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead { return libc.Uint32FromInt32(best_len) } return (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead } /* =========================================================================== * Flush the current block, with given end-of-file flag. * IN assertion: strstart is set to the end of the current match. */ /* Same but force premature exit if necessary. */ /* Maximum stored block length in deflate format (not including header). */ /* Minimum of a and b. */ // C documentation // // /* =========================================================================== // * Copy without compression as much as possible from the input stream, return // * the current block state. // * // * In case deflateParams() is used to later switch to a non-zero compression // * level, s->matches (otherwise unused when storing) keeps track of the number // * of hash table slides to perform. If s->matches is 1, then one hash table // * slide will be done when switching. If s->matches is 2, the maximum value // * allowed here, then the hash table will be cleared, since two or more slides // * is the same as a clear. // * // * deflate_stored() is written to minimize the number of times an input byte is // * copied. It is most efficient with large input and output buffers, which // * maximizes the opportunities to have a single copy from next_in to next_out. // */ func _deflate_stored(tls *libc.TLS, s uintptr, flush int32) (r Tblock_state) { var have, last, left, len1, min_block, used, v3, v4, v6, v7 uint32 var v1, v5 uint64 var v2, v8, v9 int32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = have, last, left, len1, min_block, used, v1, v2, v3, v4, v5, v6, v7, v8, v9 if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size-uint64(5) > uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size) { v1 = uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size) } else { v1 = (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(5) } /* Smallest worthy block size when not flushing or finishing. By default * this is 32K. This can be as small as 507 bytes for memLevel == 1. For * large input and output buffers, the stored block size will be larger. */ min_block = uint32(v1) last = uint32(0) used = (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in for cond := true; cond; cond = last == uint32(0) { /* Set len to the maximum size block that we can copy directly with the * available input data and output space. Set left to how much of that * would be copied from what's left in the window. */ len1 = uint32(m_MAX_STORED) /* maximum deflate stored block length */ have = libc.Uint32FromInt32(((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid + int32(42)) >> int32(3)) /* number of header bytes */ if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out < have { /* need room for header */ break } /* maximum stored block length that will fit in avail_out: */ have = (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out - have left = libc.Uint32FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start) /* bytes left in window */ if uint64(len1) > uint64(left)+uint64((*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) { len1 = left + (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in } /* limit len to the input */ if len1 > have { len1 = have } /* limit len to the output */ /* If the stored block would be less than min_block in length, or if * unable to copy all of the available input when flushing, then try * copying to the window and the pending buffer instead. Also don't * write an empty block when flushing -- deflate() does that. */ if len1 < min_block && (len1 == uint32(0) && flush != int32(m_Z_FINISH) || flush == m_Z_NO_FLUSH || len1 != left+(*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in) { break } /* Make a dummy stored block in pending to get the header bytes, * including any pending bits. This also updates the debugging counts. */ if flush == int32(m_Z_FINISH) && len1 == left+(*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in { v2 = int32(1) } else { v2 = 0 } last = libc.Uint32FromInt32(v2) x__tr_stored_block(tls, s, libc.UintptrFromInt32(0), uint64(0), libc.Int32FromUint32(last)) /* Replace the lengths in the dummy stored block with len. */ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fpending-uint64(4)))) = uint8(len1) *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fpending-uint64(3)))) = uint8(len1 >> int32(8)) *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fpending-uint64(2)))) = uint8(^len1) *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fpending-uint64(1)))) = uint8(^len1 >> int32(8)) /* Write the stored block header bytes. */ _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) /* Copy uncompressed bytes from the window to next_out. */ if left != 0 { if left > len1 { left = len1 } libc.X__builtin___memcpy_chk(tls, (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), uint64(left), ^t__predefined_size_t(0)) *(*uintptr)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm + 24)) += uintptr(left) *(*TuInt)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm + 32)) -= left *(*TuLong)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm + 40)) += uint64(left) *(*int64)(unsafe.Pointer(s + 152)) += libc.Int64FromUint32(left) len1 -= left } /* Copy uncompressed bytes directly from next_in to next_out, updating * the check value. */ if len1 != 0 { _read_buf(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm, (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_out, len1) *(*uintptr)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm + 24)) += uintptr(len1) *(*TuInt)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm + 32)) -= len1 *(*TuLong)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm + 40)) += uint64(len1) } } /* Update the sliding window with the last s->w_size bytes of the copied * data, or append all of the copied data to the existing window if less * than s->w_size bytes were copied. Also update the number of bytes to * insert in the hash tables, in the event that deflateParams() switches to * a non-zero compression level. */ used -= (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in /* number of input bytes directly copied */ if used != 0 { /* If any input was used, then no unused input remains in the window, * therefore s->block_start == s->strstart. */ if used >= (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size { /* supplant the previous history */ (*Tdeflate_state)(unsafe.Pointer(s)).Fmatches = uint32(2) /* clear hash */ libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow, (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in-uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size), uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size), ^t__predefined_size_t(0)) (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart = (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow_size-uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) <= uint64(used) { /* Slide the window down. */ *(*TuInt)(unsafe.Pointer(s + 172)) -= (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size), uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart), ^t__predefined_size_t(0)) if (*Tdeflate_state)(unsafe.Pointer(s)).Fmatches < uint32(2) { (*Tdeflate_state)(unsafe.Pointer(s)).Fmatches++ } /* add a pending slide_hash() */ if (*Tdeflate_state)(unsafe.Pointer(s)).Finsert > (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart { (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart } } libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart), (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Fnext_in-uintptr(used), uint64(used), ^t__predefined_size_t(0)) *(*TuInt)(unsafe.Pointer(s + 172)) += used if used > (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size-(*Tdeflate_state)(unsafe.Pointer(s)).Finsert { v3 = (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size - (*Tdeflate_state)(unsafe.Pointer(s)).Finsert } else { v3 = used } *(*TuInt)(unsafe.Pointer(s + 5932)) += v3 } (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) } if (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water < uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) { (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water = uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) } /* If the last block was written to next_out, then done. */ if last != 0 { return int32(_finish_done) } /* If flushing and all input has been consumed, then done. */ if flush != m_Z_NO_FLUSH && flush != int32(m_Z_FINISH) && (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == uint32(0) && libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) == (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start { return int32(_block_done) } /* Fill the window with any remaining input. */ have = uint32((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow_size - uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in > have && (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size) { /* Slide the window down. */ *(*int64)(unsafe.Pointer(s + 152)) -= libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size) *(*TuInt)(unsafe.Pointer(s + 172)) -= (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fw_size), uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart), ^t__predefined_size_t(0)) if (*Tdeflate_state)(unsafe.Pointer(s)).Fmatches < uint32(2) { (*Tdeflate_state)(unsafe.Pointer(s)).Fmatches++ } /* add a pending slide_hash() */ have += (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size /* more space now */ if (*Tdeflate_state)(unsafe.Pointer(s)).Finsert > (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart { (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart } } if have > (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in { have = (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in } if have != 0 { _read_buf(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart), have) *(*TuInt)(unsafe.Pointer(s + 172)) += have if have > (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size-(*Tdeflate_state)(unsafe.Pointer(s)).Finsert { v4 = (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size - (*Tdeflate_state)(unsafe.Pointer(s)).Finsert } else { v4 = have } *(*TuInt)(unsafe.Pointer(s + 5932)) += v4 } if (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water < uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) { (*Tdeflate_state)(unsafe.Pointer(s)).Fhigh_water = uint64((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) } /* There was not enough avail_out to write a complete worthy or flushed * stored block to next_out. Write a stored block to pending instead, if we * have enough input for a worthy block, or if flushing and there is enough * room for the remaining input as a stored block in the pending buffer. */ have = libc.Uint32FromInt32(((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid + int32(42)) >> int32(3)) /* number of header bytes */ /* maximum stored block length that will fit in pending: */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size-uint64(have) > libc.Uint64FromInt32(libc.Int32FromInt32(m_MAX_STORED)) { v5 = libc.Uint64FromInt32(libc.Int32FromInt32(m_MAX_STORED)) } else { v5 = (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf_size - uint64(have) } have = uint32(v5) if have > (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size { v6 = (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size } else { v6 = have } min_block = v6 left = libc.Uint32FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) - (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start) if left >= min_block || (left != 0 || flush == int32(m_Z_FINISH)) && flush != m_Z_NO_FLUSH && (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == uint32(0) && left <= have { if left > have { v7 = have } else { v7 = left } len1 = v7 if flush == int32(m_Z_FINISH) && (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_in == uint32(0) && len1 == left { v8 = int32(1) } else { v8 = 0 } last = libc.Uint32FromInt32(v8) x__tr_stored_block(tls, s, (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), uint64(len1), libc.Int32FromUint32(last)) *(*int64)(unsafe.Pointer(s + 152)) += libc.Int64FromUint32(len1) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) } /* We've done all we can with the available input and output. */ if last != 0 { v9 = int32(_finish_started) } else { v9 = int32(_need_more) } return v9 } // C documentation // // /* =========================================================================== // * Compress as much as possible from the input stream, return the current // * block state. // * This function does not perform lazy evaluation of matches and inserts // * new strings in the dictionary only for unmatched strings or for short // * matches. It is used only for the fast compression options. // */ func _deflate_fast(tls *libc.TLS, s uintptr, flush int32) (r Tblock_state) { var bflush, v9 int32 var cc, len1 Tuch var dist Tush var hash_head TIPos var v10, v14, v16, v18, v3, v5, v7 TuInt var v11, v15, v17, v19, v20, v22, v23, v4, v6, v8 uintptr var v13, v2 TPosf var v21 uint32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bflush, cc, dist, hash_head, len1, v10, v11, v13, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v3, v4, v5, v6, v7, v8, v9 /* set if current block must be flushed */ for { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the next match, plus MIN_MATCH bytes to insert the * string following the next match. */ if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead < libc.Uint32FromInt32(libc.Int32FromInt32(m_MAX_MATCH)+libc.Int32FromInt32(m_MIN_MATCH)+libc.Int32FromInt32(1)) { _fill_window(tls, s) if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead < libc.Uint32FromInt32(libc.Int32FromInt32(m_MAX_MATCH)+libc.Int32FromInt32(m_MIN_MATCH)+libc.Int32FromInt32(1)) && flush == m_Z_NO_FLUSH { return int32(_need_more) } if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead == uint32(0) { break } /* flush the current block */ } /* Insert the string window[strstart .. strstart + 2] in the * dictionary, and set hash_head to the head of the hash chain: */ hash_head = uint32(m_NIL) if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead >= uint32(m_MIN_MATCH) { (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = ((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h<<(*Tdeflate_state)(unsafe.Pointer(s)).Fhash_shift ^ uint32(*(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart+libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH)-libc.Int32FromInt32(1))))))) & (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_mask v2 = *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fprev + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart&(*Tdeflate_state)(unsafe.Pointer(s)).Fw_mask)*2)) = v2 hash_head = uint32(v2) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = uint16((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) } /* Find the longest match, discarding those <= prev_length. * At this point we have always match_length < MIN_MATCH */ if hash_head != uint32(m_NIL) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart-hash_head <= (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size-libc.Uint32FromInt32(libc.Int32FromInt32(m_MAX_MATCH)+libc.Int32FromInt32(m_MIN_MATCH)+libc.Int32FromInt32(1)) { /* To simplify the code, we prevent matches with the string * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). */ (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = _longest_match(tls, s, hash_head) /* longest_match() sets match_start */ } if (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length >= uint32(m_MIN_MATCH) { len1 = uint8((*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length - libc.Uint32FromInt32(m_MIN_MATCH)) dist = uint16((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart - (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_start) v4 = s + 5900 v3 = *(*TuInt)(unsafe.Pointer(v4)) *(*TuInt)(unsafe.Pointer(v4))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v3))) = uint8(dist) v6 = s + 5900 v5 = *(*TuInt)(unsafe.Pointer(v6)) *(*TuInt)(unsafe.Pointer(v6))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v5))) = libc.Uint8FromInt32(libc.Int32FromUint16(dist) >> libc.Int32FromInt32(8)) v8 = s + 5900 v7 = *(*TuInt)(unsafe.Pointer(v8)) *(*TuInt)(unsafe.Pointer(v8))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v7))) = len1 dist-- *(*Tush)(unsafe.Pointer(s + 212 + uintptr(libc.Int32FromUint8(x__length_code[len1])+int32(m_LITERALS)+int32(1))*4))++ if libc.Int32FromUint16(dist) < int32(256) { v9 = libc.Int32FromUint8(x__dist_code[dist]) } else { v9 = libc.Int32FromUint8(x__dist_code[int32(256)+libc.Int32FromUint16(dist)>>int32(7)]) } *(*Tush)(unsafe.Pointer(s + 2504 + uintptr(v9)*4))++ bflush = libc.BoolInt32((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next == (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_end) *(*TuInt)(unsafe.Pointer(s + 180)) -= (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length /* Insert new strings in the hash table only if the match length * is not too large. This saves time but degrades compression. */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length <= (*Tdeflate_state)(unsafe.Pointer(s)).Fmax_lazy_match && (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead >= uint32(m_MIN_MATCH) { (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length-- /* string at strstart already in table */ for { (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart++ (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = ((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h<<(*Tdeflate_state)(unsafe.Pointer(s)).Fhash_shift ^ uint32(*(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart+libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH)-libc.Int32FromInt32(1))))))) & (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_mask v13 = *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fprev + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart&(*Tdeflate_state)(unsafe.Pointer(s)).Fw_mask)*2)) = v13 hash_head = uint32(v13) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = uint16((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) /* strstart never exceeds WSIZE-MAX_MATCH, so there are * always MIN_MATCH bytes ahead. */ goto _12 _12: ; v11 = s + 160 *(*TuInt)(unsafe.Pointer(v11))-- v10 = *(*TuInt)(unsafe.Pointer(v11)) if !(v10 != uint32(0)) { break } } (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart++ } else { *(*TuInt)(unsafe.Pointer(s + 172)) += (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = uint32(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = uint32(*(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)))) (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = ((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h<<(*Tdeflate_state)(unsafe.Pointer(s)).Fhash_shift ^ uint32(*(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart+uint32(1)))))) & (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_mask /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not * matter since it will be recomputed at next deflate call. */ } } else { /* No match, output a literal byte */ cc = *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart))) v15 = s + 5900 v14 = *(*TuInt)(unsafe.Pointer(v15)) *(*TuInt)(unsafe.Pointer(v15))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v14))) = uint8(0) v17 = s + 5900 v16 = *(*TuInt)(unsafe.Pointer(v17)) *(*TuInt)(unsafe.Pointer(v17))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v16))) = uint8(0) v19 = s + 5900 v18 = *(*TuInt)(unsafe.Pointer(v19)) *(*TuInt)(unsafe.Pointer(v19))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v18))) = cc *(*Tush)(unsafe.Pointer(s + 212 + uintptr(cc)*4))++ bflush = libc.BoolInt32((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next == (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_end) (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead-- (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart++ } if bflush != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v20 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v20 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v20, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), 0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_need_more) } } goto _1 _1: } if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart < libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH)-libc.Int32FromInt32(1)) { v21 = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart } else { v21 = libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH) - libc.Int32FromInt32(1)) } (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = v21 if flush == int32(m_Z_FINISH) { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v22 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v22 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v22, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), int32(1)) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_finish_started) } return int32(_finish_done) } if (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v23 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v23 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v23, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), 0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_need_more) } } return int32(_block_done) } // C documentation // // /* =========================================================================== // * Same as above, but achieves better compression. We use a lazy // * evaluation for matches: a match is finally adopted only if there is // * no better match at the next window position. // */ func _deflate_slow(tls *libc.TLS, s uintptr, flush int32) (r Tblock_state) { var bflush, v9 int32 var cc, cc1, len1 Tuch var dist Tush var hash_head TIPos var max_insert, v10, v13, v17, v19, v21, v24, v26, v28, v3, v5, v7 TuInt var v11, v14, v16, v18, v20, v22, v23, v25, v27, v29, v31, v32, v4, v6, v8 uintptr var v15, v2 TPosf var v30 uint32 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bflush, cc, cc1, dist, hash_head, len1, max_insert, v10, v11, v13, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v4, v5, v6, v7, v8, v9 /* set if current block must be flushed */ /* Process the input block. */ for { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the next match, plus MIN_MATCH bytes to insert the * string following the next match. */ if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead < libc.Uint32FromInt32(libc.Int32FromInt32(m_MAX_MATCH)+libc.Int32FromInt32(m_MIN_MATCH)+libc.Int32FromInt32(1)) { _fill_window(tls, s) if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead < libc.Uint32FromInt32(libc.Int32FromInt32(m_MAX_MATCH)+libc.Int32FromInt32(m_MIN_MATCH)+libc.Int32FromInt32(1)) && flush == m_Z_NO_FLUSH { return int32(_need_more) } if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead == uint32(0) { break } /* flush the current block */ } /* Insert the string window[strstart .. strstart + 2] in the * dictionary, and set hash_head to the head of the hash chain: */ hash_head = uint32(m_NIL) if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead >= uint32(m_MIN_MATCH) { (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = ((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h<<(*Tdeflate_state)(unsafe.Pointer(s)).Fhash_shift ^ uint32(*(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart+libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH)-libc.Int32FromInt32(1))))))) & (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_mask v2 = *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fprev + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart&(*Tdeflate_state)(unsafe.Pointer(s)).Fw_mask)*2)) = v2 hash_head = uint32(v2) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = uint16((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) } /* Find the longest match, discarding those <= prev_length. */ (*Tdeflate_state)(unsafe.Pointer(s)).Fprev_length = (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length /* Find the longest match, discarding those <= prev_length. */ (*Tdeflate_state)(unsafe.Pointer(s)).Fprev_match = (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_start (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH) - libc.Int32FromInt32(1)) if hash_head != uint32(m_NIL) && (*Tdeflate_state)(unsafe.Pointer(s)).Fprev_length < (*Tdeflate_state)(unsafe.Pointer(s)).Fmax_lazy_match && (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart-hash_head <= (*Tdeflate_state)(unsafe.Pointer(s)).Fw_size-libc.Uint32FromInt32(libc.Int32FromInt32(m_MAX_MATCH)+libc.Int32FromInt32(m_MIN_MATCH)+libc.Int32FromInt32(1)) { /* To simplify the code, we prevent matches with the string * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). */ (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = _longest_match(tls, s, hash_head) /* longest_match() sets match_start */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length <= uint32(5) && ((*Tdeflate_state)(unsafe.Pointer(s)).Fstrategy == int32(m_Z_FILTERED) || (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length == uint32(m_MIN_MATCH) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart-(*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_start > uint32(m_TOO_FAR)) { /* If prev_match is also MIN_MATCH, match_start is garbage * but we will ignore the current match anyway. */ (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH) - libc.Int32FromInt32(1)) } } /* If there was a match at the previous step and the current * match is not better, output the previous match: */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fprev_length >= uint32(m_MIN_MATCH) && (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length <= (*Tdeflate_state)(unsafe.Pointer(s)).Fprev_length { max_insert = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart + (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead - uint32(m_MIN_MATCH) /* Do not insert strings in hash table beyond this. */ len1 = uint8((*Tdeflate_state)(unsafe.Pointer(s)).Fprev_length - libc.Uint32FromInt32(m_MIN_MATCH)) dist = uint16((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart - libc.Uint32FromInt32(1) - (*Tdeflate_state)(unsafe.Pointer(s)).Fprev_match) v4 = s + 5900 v3 = *(*TuInt)(unsafe.Pointer(v4)) *(*TuInt)(unsafe.Pointer(v4))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v3))) = uint8(dist) v6 = s + 5900 v5 = *(*TuInt)(unsafe.Pointer(v6)) *(*TuInt)(unsafe.Pointer(v6))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v5))) = libc.Uint8FromInt32(libc.Int32FromUint16(dist) >> libc.Int32FromInt32(8)) v8 = s + 5900 v7 = *(*TuInt)(unsafe.Pointer(v8)) *(*TuInt)(unsafe.Pointer(v8))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v7))) = len1 dist-- *(*Tush)(unsafe.Pointer(s + 212 + uintptr(libc.Int32FromUint8(x__length_code[len1])+int32(m_LITERALS)+int32(1))*4))++ if libc.Int32FromUint16(dist) < int32(256) { v9 = libc.Int32FromUint8(x__dist_code[dist]) } else { v9 = libc.Int32FromUint8(x__dist_code[int32(256)+libc.Int32FromUint16(dist)>>int32(7)]) } *(*Tush)(unsafe.Pointer(s + 2504 + uintptr(v9)*4))++ bflush = libc.BoolInt32((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next == (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_end) /* Insert in hash table all strings up to the end of the match. * strstart - 1 and strstart are already inserted. If there is not * enough lookahead, the last two strings are not inserted in * the hash table. */ *(*TuInt)(unsafe.Pointer(s + 180)) -= (*Tdeflate_state)(unsafe.Pointer(s)).Fprev_length - uint32(1) *(*TuInt)(unsafe.Pointer(s + 184)) -= uint32(2) for { v14 = s + 172 *(*TuInt)(unsafe.Pointer(v14))++ v13 = *(*TuInt)(unsafe.Pointer(v14)) if v13 <= max_insert { (*Tdeflate_state)(unsafe.Pointer(s)).Fins_h = ((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h<<(*Tdeflate_state)(unsafe.Pointer(s)).Fhash_shift ^ uint32(*(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart+libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH)-libc.Int32FromInt32(1))))))) & (*Tdeflate_state)(unsafe.Pointer(s)).Fhash_mask v15 = *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fprev + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart&(*Tdeflate_state)(unsafe.Pointer(s)).Fw_mask)*2)) = v15 hash_head = uint32(v15) *(*TPosf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fhead + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fins_h)*2)) = uint16((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) } goto _12 _12: ; v11 = s + 184 *(*TuInt)(unsafe.Pointer(v11))-- v10 = *(*TuInt)(unsafe.Pointer(v11)) if !(v10 != uint32(0)) { break } } (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH) - libc.Int32FromInt32(1)) (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart++ if bflush != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v16 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v16 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v16, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), 0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_need_more) } } } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { /* If there was no match at the previous position, output a * single literal. If there was a match but the current match * is longer, truncate the previous match to a single literal. */ cc = *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart-uint32(1)))) v18 = s + 5900 v17 = *(*TuInt)(unsafe.Pointer(v18)) *(*TuInt)(unsafe.Pointer(v18))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v17))) = uint8(0) v20 = s + 5900 v19 = *(*TuInt)(unsafe.Pointer(v20)) *(*TuInt)(unsafe.Pointer(v20))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v19))) = uint8(0) v22 = s + 5900 v21 = *(*TuInt)(unsafe.Pointer(v22)) *(*TuInt)(unsafe.Pointer(v22))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v21))) = cc *(*Tush)(unsafe.Pointer(s + 212 + uintptr(cc)*4))++ bflush = libc.BoolInt32((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next == (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_end) if bflush != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v23 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v23 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v23, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), 0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) } (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart++ (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead-- if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_need_more) } } else { /* There is no previous match to compare with, wait for * the next step to decide. */ (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_available = int32(1) (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart++ (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead-- } } goto _1 _1: } if (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_available != 0 { cc1 = *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart-uint32(1)))) v25 = s + 5900 v24 = *(*TuInt)(unsafe.Pointer(v25)) *(*TuInt)(unsafe.Pointer(v25))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v24))) = uint8(0) v27 = s + 5900 v26 = *(*TuInt)(unsafe.Pointer(v27)) *(*TuInt)(unsafe.Pointer(v27))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v26))) = uint8(0) v29 = s + 5900 v28 = *(*TuInt)(unsafe.Pointer(v29)) *(*TuInt)(unsafe.Pointer(v29))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v28))) = cc1 *(*Tush)(unsafe.Pointer(s + 212 + uintptr(cc1)*4))++ bflush = libc.BoolInt32((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next == (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_end) (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_available = 0 } if (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart < libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH)-libc.Int32FromInt32(1)) { v30 = (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart } else { v30 = libc.Uint32FromInt32(libc.Int32FromInt32(m_MIN_MATCH) - libc.Int32FromInt32(1)) } (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = v30 if flush == int32(m_Z_FINISH) { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v31 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v31 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v31, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), int32(1)) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_finish_started) } return int32(_finish_done) } if (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v32 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v32 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v32, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), 0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_need_more) } } return int32(_block_done) } // C documentation // // /* =========================================================================== // * For Z_RLE, simply look for runs of bytes, generate matches only of distance // * one. Do not maintain a hash table. (It will be regenerated if this run of // * deflate switches away from Z_RLE.) // */ func _deflate_rle(tls *libc.TLS, s uintptr, flush int32) (r Tblock_state) { var bflush, v29 int32 var cc, len1 Tuch var dist Tush var prev, v23, v25, v27, v30, v32, v34 TuInt var scan, strend, v10, v12, v14, v16, v18, v2, v20, v24, v26, v28, v3, v31, v33, v35, v36, v37, v38, v5, v7, v8 uintptr var v11, v13, v15, v17, v19, v21, v4, v6, v9 bool _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bflush, cc, dist, len1, prev, scan, strend, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v2, v20, v21, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v33, v34, v35, v36, v37, v38, v4, v5, v6, v7, v8, v9 /* scan goes up to strend for length of run */ for { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the longest run, plus one for the unrolled loop. */ if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead <= uint32(m_MAX_MATCH) { _fill_window(tls, s) if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead <= uint32(m_MAX_MATCH) && flush == m_Z_NO_FLUSH { return int32(_need_more) } if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead == uint32(0) { break } /* flush the current block */ } /* See how many times the previous byte repeats */ (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = uint32(0) if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead >= uint32(m_MIN_MATCH) && (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart > uint32(0) { scan = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) - uintptr(1) prev = uint32(*(*TBytef)(unsafe.Pointer(scan))) scan++ v2 = scan if v4 = prev == uint32(*(*TBytef)(unsafe.Pointer(v2))); v4 { scan++ v3 = scan } if v6 = v4 && prev == uint32(*(*TBytef)(unsafe.Pointer(v3))); v6 { scan++ v5 = scan } if v6 && prev == uint32(*(*TBytef)(unsafe.Pointer(v5))) { strend = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) + uintptr(m_MAX_MATCH) for { goto _22 _22: ; scan++ v7 = scan if v9 = prev == uint32(*(*TBytef)(unsafe.Pointer(v7))); v9 { scan++ v8 = scan } if v11 = v9 && prev == uint32(*(*TBytef)(unsafe.Pointer(v8))); v11 { scan++ v10 = scan } if v13 = v11 && prev == uint32(*(*TBytef)(unsafe.Pointer(v10))); v13 { scan++ v12 = scan } if v15 = v13 && prev == uint32(*(*TBytef)(unsafe.Pointer(v12))); v15 { scan++ v14 = scan } if v17 = v15 && prev == uint32(*(*TBytef)(unsafe.Pointer(v14))); v17 { scan++ v16 = scan } if v19 = v17 && prev == uint32(*(*TBytef)(unsafe.Pointer(v16))); v19 { scan++ v18 = scan } if v21 = v19 && prev == uint32(*(*TBytef)(unsafe.Pointer(v18))); v21 { scan++ v20 = scan } if !(v21 && prev == uint32(*(*TBytef)(unsafe.Pointer(v20))) && scan < strend) { break } } (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = uint32(m_MAX_MATCH) - libc.Uint32FromInt64(int64(strend)-int64(scan)) if (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length > (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead { (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead } } } /* Emit match if have run of MIN_MATCH or longer, else emit literal */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length >= uint32(m_MIN_MATCH) { len1 = uint8((*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length - libc.Uint32FromInt32(m_MIN_MATCH)) dist = libc.Uint16FromInt32(libc.Int32FromInt32(1)) v24 = s + 5900 v23 = *(*TuInt)(unsafe.Pointer(v24)) *(*TuInt)(unsafe.Pointer(v24))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v23))) = uint8(dist) v26 = s + 5900 v25 = *(*TuInt)(unsafe.Pointer(v26)) *(*TuInt)(unsafe.Pointer(v26))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v25))) = libc.Uint8FromInt32(libc.Int32FromUint16(dist) >> libc.Int32FromInt32(8)) v28 = s + 5900 v27 = *(*TuInt)(unsafe.Pointer(v28)) *(*TuInt)(unsafe.Pointer(v28))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v27))) = len1 dist-- *(*Tush)(unsafe.Pointer(s + 212 + uintptr(libc.Int32FromUint8(x__length_code[len1])+int32(m_LITERALS)+int32(1))*4))++ if libc.Int32FromUint16(dist) < int32(256) { v29 = libc.Int32FromUint8(x__dist_code[dist]) } else { v29 = libc.Int32FromUint8(x__dist_code[int32(256)+libc.Int32FromUint16(dist)>>int32(7)]) } *(*Tush)(unsafe.Pointer(s + 2504 + uintptr(v29)*4))++ bflush = libc.BoolInt32((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next == (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_end) *(*TuInt)(unsafe.Pointer(s + 180)) -= (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length *(*TuInt)(unsafe.Pointer(s + 172)) += (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = uint32(0) } else { /* No match, output a literal byte */ cc = *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart))) v31 = s + 5900 v30 = *(*TuInt)(unsafe.Pointer(v31)) *(*TuInt)(unsafe.Pointer(v31))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v30))) = uint8(0) v33 = s + 5900 v32 = *(*TuInt)(unsafe.Pointer(v33)) *(*TuInt)(unsafe.Pointer(v33))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v32))) = uint8(0) v35 = s + 5900 v34 = *(*TuInt)(unsafe.Pointer(v35)) *(*TuInt)(unsafe.Pointer(v35))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v34))) = cc *(*Tush)(unsafe.Pointer(s + 212 + uintptr(cc)*4))++ bflush = libc.BoolInt32((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next == (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_end) (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead-- (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart++ } if bflush != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v36 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v36 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v36, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), 0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_need_more) } } goto _1 _1: } (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = uint32(0) if flush == int32(m_Z_FINISH) { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v37 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v37 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v37, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), int32(1)) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_finish_started) } return int32(_finish_done) } if (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v38 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v38 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v38, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), 0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_need_more) } } return int32(_block_done) } // C documentation // // /* =========================================================================== // * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. // * (It will be regenerated if this run of deflate switches away from Huffman.) // */ func _deflate_huff(tls *libc.TLS, s uintptr, flush int32) (r Tblock_state) { var bflush int32 var cc Tuch var v10, v3, v5, v7, v8, v9 uintptr var v2, v4, v6 TuInt _, _, _, _, _, _, _, _, _, _, _ = bflush, cc, v10, v2, v3, v4, v5, v6, v7, v8, v9 /* set if current block must be flushed */ for { /* Make sure that we have a literal to write. */ if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead == uint32(0) { _fill_window(tls, s) if (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead == uint32(0) { if flush == m_Z_NO_FLUSH { return int32(_need_more) } break /* flush the current block */ } } /* Output a literal byte */ (*Tdeflate_state)(unsafe.Pointer(s)).Fmatch_length = uint32(0) cc = *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart))) v3 = s + 5900 v2 = *(*TuInt)(unsafe.Pointer(v3)) *(*TuInt)(unsafe.Pointer(v3))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v2))) = uint8(0) v5 = s + 5900 v4 = *(*TuInt)(unsafe.Pointer(v5)) *(*TuInt)(unsafe.Pointer(v5))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v4))) = uint8(0) v7 = s + 5900 v6 = *(*TuInt)(unsafe.Pointer(v7)) *(*TuInt)(unsafe.Pointer(v7))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v6))) = cc *(*Tush)(unsafe.Pointer(s + 212 + uintptr(cc)*4))++ bflush = libc.BoolInt32((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next == (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_end) (*Tdeflate_state)(unsafe.Pointer(s)).Flookahead-- (*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart++ if bflush != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v8 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v8 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v8, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), 0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_need_more) } } goto _1 _1: } (*Tdeflate_state)(unsafe.Pointer(s)).Finsert = uint32(0) if flush == int32(m_Z_FINISH) { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v9 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v9 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v9, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), int32(1)) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_finish_started) } return int32(_finish_done) } if (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next != 0 { if (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start >= 0 { v10 = (*Tdeflate_state)(unsafe.Pointer(s)).Fwindow + uintptr(libc.Uint32FromInt64((*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start)) } else { v10 = libc.UintptrFromInt32(m_Z_NULL) } x__tr_flush_block(tls, s, v10, libc.Uint64FromInt64(libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart)-(*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start), 0) (*Tdeflate_state)(unsafe.Pointer(s)).Fblock_start = libc.Int64FromUint32((*Tdeflate_state)(unsafe.Pointer(s)).Fstrstart) _flush_pending(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fstrm) if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Favail_out == uint32(0) { return int32(_need_more) } } return int32(_block_done) } const m_ENOUGH_DISTS = 592 const m_ENOUGH_LENS = 852 const m_PRESET_DICT2 = 0x20 type Tcode = struct { Fop uint8 Fbits uint8 Fval uint16 } type Tcodetype = int32 const _CODES = 0 const _LENS = 1 const _DISTS = 2 type Tinflate_mode = int32 const _HEAD = 16180 const _FLAGS = 16181 const _TIME = 16182 const _OS = 16183 const _EXLEN = 16184 const _EXTRA = 16185 const _NAME = 16186 const _COMMENT = 16187 const _HCRC = 16188 const _DICTID = 16189 const _DICT = 16190 const _TYPE = 16191 const _TYPEDO = 16192 const _STORED = 16193 const _COPY_ = 16194 const _COPY = 16195 const _TABLE = 16196 const _LENLENS = 16197 const _CODELENS = 16198 const _LEN_ = 16199 const _LEN = 16200 const _LENEXT = 16201 const _DIST = 16202 const _DISTEXT = 16203 const _MATCH = 16204 const _LIT = 16205 const _CHECK = 16206 const _LENGTH = 16207 const _DONE = 16208 const _BAD = 16209 const _MEM = 16210 const _SYNC = 16211 type Tinflate_state = struct { Fstrm Tz_streamp Fmode Tinflate_mode Flast int32 Fwrap int32 Fhavedict int32 Fflags int32 Fdmax uint32 Fcheck uint64 Ftotal uint64 Fhead Tgz_headerp Fwbits uint32 Fwsize uint32 Fwhave uint32 Fwnext uint32 Fwindow uintptr Fhold uint64 Fbits uint32 Flength uint32 Foffset uint32 Fextra uint32 Flencode uintptr Fdistcode uintptr Flenbits uint32 Fdistbits uint32 Fncode uint32 Fnlen uint32 Fndist uint32 Fhave uint32 Fnext uintptr Flens [320]uint16 Fwork [288]uint16 Fcodes [1444]Tcode Fsane int32 Fback int32 Fwas uint32 } // C documentation // // /* // strm provides memory allocation functions in zalloc and zfree, or // Z_NULL to use the library memory allocation functions. // // windowBits is in the range 8..15, and window is a user-supplied // window and output buffer that is 2**windowBits bytes. // */ func XinflateBackInit_(tls *libc.TLS, strm Tz_streamp, windowBits int32, window uintptr, version uintptr, stream_size int32) (r int32) { var state uintptr _ = state if version == uintptr(m_Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(__ccgo_ts))) || stream_size != libc.Int32FromUint64(libc.Uint64FromInt64(112)) { return -int32(6) } if strm == uintptr(m_Z_NULL) || window == uintptr(m_Z_NULL) || windowBits < int32(8) || windowBits > int32(15) { return -int32(2) } (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(m_Z_NULL) /* in case we return an error */ if (*Tz_stream)(unsafe.Pointer(strm)).Fzalloc == libc.UintptrFromInt32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fzalloc = __ccgo_fp(Xzcalloc) (*Tz_stream)(unsafe.Pointer(strm)).Fopaque = libc.UintptrFromInt32(0) } if (*Tz_stream)(unsafe.Pointer(strm)).Fzfree == libc.UintptrFromInt32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fzfree = __ccgo_fp(Xzcfree) } state = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, libc.Uint32FromInt32(libc.Int32FromInt32(1)), uint32(libc.Uint64FromInt64(7160))) if state == uintptr(m_Z_NULL) { return -int32(4) } (*Tz_stream)(unsafe.Pointer(strm)).Fstate = state (*Tinflate_state)(unsafe.Pointer(state)).Fdmax = uint32(32768) (*Tinflate_state)(unsafe.Pointer(state)).Fwbits = libc.Uint32FromInt32(windowBits) (*Tinflate_state)(unsafe.Pointer(state)).Fwsize = uint32(1) << windowBits (*Tinflate_state)(unsafe.Pointer(state)).Fwindow = window (*Tinflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fsane = int32(1) return m_Z_OK } // C documentation // // /* // Return state with length and distance decoding tables and index sizes set to // fixed code decoding. Normally this returns fixed tables from inffixed.h. // If BUILDFIXED is defined, then instead this routine builds the tables the // first time it's called, and returns those tables the first time and // thereafter. This reduces the size of the code by about 2K bytes, in // exchange for a little execution time. However, BUILDFIXED should not be // used for threaded applications, since the rewriting of the tables and virgin // may not be thread-safe. // */ func _fixedtables(tls *libc.TLS, state uintptr) { (*Tinflate_state)(unsafe.Pointer(state)).Flencode = uintptr(unsafe.Pointer(&_lenfix)) (*Tinflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) (*Tinflate_state)(unsafe.Pointer(state)).Fdistcode = uintptr(unsafe.Pointer(&_distfix)) (*Tinflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(5) } var _lenfix = [512]Tcode{ 0: { Fop: uint8(96), Fbits: uint8(7), }, 1: { Fbits: uint8(8), Fval: uint16(80), }, 2: { Fbits: uint8(8), Fval: uint16(16), }, 3: { Fop: uint8(20), Fbits: uint8(8), Fval: uint16(115), }, 4: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31), }, 5: { Fbits: uint8(8), Fval: uint16(112), }, 6: { Fbits: uint8(8), Fval: uint16(48), }, 7: { Fbits: uint8(9), Fval: uint16(192), }, 8: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10), }, 9: { Fbits: uint8(8), Fval: uint16(96), }, 10: { Fbits: uint8(8), Fval: uint16(32), }, 11: { Fbits: uint8(9), Fval: uint16(160), }, 12: { Fbits: uint8(8), }, 13: { Fbits: uint8(8), Fval: uint16(128), }, 14: { Fbits: uint8(8), Fval: uint16(64), }, 15: { Fbits: uint8(9), Fval: uint16(224), }, 16: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6), }, 17: { Fbits: uint8(8), Fval: uint16(88), }, 18: { Fbits: uint8(8), Fval: uint16(24), }, 19: { Fbits: uint8(9), Fval: uint16(144), }, 20: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59), }, 21: { Fbits: uint8(8), Fval: uint16(120), }, 22: { Fbits: uint8(8), Fval: uint16(56), }, 23: { Fbits: uint8(9), Fval: uint16(208), }, 24: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17), }, 25: { Fbits: uint8(8), Fval: uint16(104), }, 26: { Fbits: uint8(8), Fval: uint16(40), }, 27: { Fbits: uint8(9), Fval: uint16(176), }, 28: { Fbits: uint8(8), Fval: uint16(8), }, 29: { Fbits: uint8(8), Fval: uint16(136), }, 30: { Fbits: uint8(8), Fval: uint16(72), }, 31: { Fbits: uint8(9), Fval: uint16(240), }, 32: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4), }, 33: { Fbits: uint8(8), Fval: uint16(84), }, 34: { Fbits: uint8(8), Fval: uint16(20), }, 35: { Fop: uint8(21), Fbits: uint8(8), Fval: uint16(227), }, 36: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43), }, 37: { Fbits: uint8(8), Fval: uint16(116), }, 38: { Fbits: uint8(8), Fval: uint16(52), }, 39: { Fbits: uint8(9), Fval: uint16(200), }, 40: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13), }, 41: { Fbits: uint8(8), Fval: uint16(100), }, 42: { Fbits: uint8(8), Fval: uint16(36), }, 43: { Fbits: uint8(9), Fval: uint16(168), }, 44: { Fbits: uint8(8), Fval: uint16(4), }, 45: { Fbits: uint8(8), Fval: uint16(132), }, 46: { Fbits: uint8(8), Fval: uint16(68), }, 47: { Fbits: uint8(9), Fval: uint16(232), }, 48: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8), }, 49: { Fbits: uint8(8), Fval: uint16(92), }, 50: { Fbits: uint8(8), Fval: uint16(28), }, 51: { Fbits: uint8(9), Fval: uint16(152), }, 52: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83), }, 53: { Fbits: uint8(8), Fval: uint16(124), }, 54: { Fbits: uint8(8), Fval: uint16(60), }, 55: { Fbits: uint8(9), Fval: uint16(216), }, 56: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23), }, 57: { Fbits: uint8(8), Fval: uint16(108), }, 58: { Fbits: uint8(8), Fval: uint16(44), }, 59: { Fbits: uint8(9), Fval: uint16(184), }, 60: { Fbits: uint8(8), Fval: uint16(12), }, 61: { Fbits: uint8(8), Fval: uint16(140), }, 62: { Fbits: uint8(8), Fval: uint16(76), }, 63: { Fbits: uint8(9), Fval: uint16(248), }, 64: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3), }, 65: { Fbits: uint8(8), Fval: uint16(82), }, 66: { Fbits: uint8(8), Fval: uint16(18), }, 67: { Fop: uint8(21), Fbits: uint8(8), Fval: uint16(163), }, 68: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35), }, 69: { Fbits: uint8(8), Fval: uint16(114), }, 70: { Fbits: uint8(8), Fval: uint16(50), }, 71: { Fbits: uint8(9), Fval: uint16(196), }, 72: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11), }, 73: { Fbits: uint8(8), Fval: uint16(98), }, 74: { Fbits: uint8(8), Fval: uint16(34), }, 75: { Fbits: uint8(9), Fval: uint16(164), }, 76: { Fbits: uint8(8), Fval: uint16(2), }, 77: { Fbits: uint8(8), Fval: uint16(130), }, 78: { Fbits: uint8(8), Fval: uint16(66), }, 79: { Fbits: uint8(9), Fval: uint16(228), }, 80: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7), }, 81: { Fbits: uint8(8), Fval: uint16(90), }, 82: { Fbits: uint8(8), Fval: uint16(26), }, 83: { Fbits: uint8(9), Fval: uint16(148), }, 84: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67), }, 85: { Fbits: uint8(8), Fval: uint16(122), }, 86: { Fbits: uint8(8), Fval: uint16(58), }, 87: { Fbits: uint8(9), Fval: uint16(212), }, 88: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19), }, 89: { Fbits: uint8(8), Fval: uint16(106), }, 90: { Fbits: uint8(8), Fval: uint16(42), }, 91: { Fbits: uint8(9), Fval: uint16(180), }, 92: { Fbits: uint8(8), Fval: uint16(10), }, 93: { Fbits: uint8(8), Fval: uint16(138), }, 94: { Fbits: uint8(8), Fval: uint16(74), }, 95: { Fbits: uint8(9), Fval: uint16(244), }, 96: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5), }, 97: { Fbits: uint8(8), Fval: uint16(86), }, 98: { Fbits: uint8(8), Fval: uint16(22), }, 99: { Fop: uint8(64), Fbits: uint8(8), }, 100: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51), }, 101: { Fbits: uint8(8), Fval: uint16(118), }, 102: { Fbits: uint8(8), Fval: uint16(54), }, 103: { Fbits: uint8(9), Fval: uint16(204), }, 104: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15), }, 105: { Fbits: uint8(8), Fval: uint16(102), }, 106: { Fbits: uint8(8), Fval: uint16(38), }, 107: { Fbits: uint8(9), Fval: uint16(172), }, 108: { Fbits: uint8(8), Fval: uint16(6), }, 109: { Fbits: uint8(8), Fval: uint16(134), }, 110: { Fbits: uint8(8), Fval: uint16(70), }, 111: { Fbits: uint8(9), Fval: uint16(236), }, 112: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9), }, 113: { Fbits: uint8(8), Fval: uint16(94), }, 114: { Fbits: uint8(8), Fval: uint16(30), }, 115: { Fbits: uint8(9), Fval: uint16(156), }, 116: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99), }, 117: { Fbits: uint8(8), Fval: uint16(126), }, 118: { Fbits: uint8(8), Fval: uint16(62), }, 119: { Fbits: uint8(9), Fval: uint16(220), }, 120: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27), }, 121: { Fbits: uint8(8), Fval: uint16(110), }, 122: { Fbits: uint8(8), Fval: uint16(46), }, 123: { Fbits: uint8(9), Fval: uint16(188), }, 124: { Fbits: uint8(8), Fval: uint16(14), }, 125: { Fbits: uint8(8), Fval: uint16(142), }, 126: { Fbits: uint8(8), Fval: uint16(78), }, 127: { Fbits: uint8(9), Fval: uint16(252), }, 128: { Fop: uint8(96), Fbits: uint8(7), }, 129: { Fbits: uint8(8), Fval: uint16(81), }, 130: { Fbits: uint8(8), Fval: uint16(17), }, 131: { Fop: uint8(21), Fbits: uint8(8), Fval: uint16(131), }, 132: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31), }, 133: { Fbits: uint8(8), Fval: uint16(113), }, 134: { Fbits: uint8(8), Fval: uint16(49), }, 135: { Fbits: uint8(9), Fval: uint16(194), }, 136: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10), }, 137: { Fbits: uint8(8), Fval: uint16(97), }, 138: { Fbits: uint8(8), Fval: uint16(33), }, 139: { Fbits: uint8(9), Fval: uint16(162), }, 140: { Fbits: uint8(8), Fval: uint16(1), }, 141: { Fbits: uint8(8), Fval: uint16(129), }, 142: { Fbits: uint8(8), Fval: uint16(65), }, 143: { Fbits: uint8(9), Fval: uint16(226), }, 144: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6), }, 145: { Fbits: uint8(8), Fval: uint16(89), }, 146: { Fbits: uint8(8), Fval: uint16(25), }, 147: { Fbits: uint8(9), Fval: uint16(146), }, 148: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59), }, 149: { Fbits: uint8(8), Fval: uint16(121), }, 150: { Fbits: uint8(8), Fval: uint16(57), }, 151: { Fbits: uint8(9), Fval: uint16(210), }, 152: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17), }, 153: { Fbits: uint8(8), Fval: uint16(105), }, 154: { Fbits: uint8(8), Fval: uint16(41), }, 155: { Fbits: uint8(9), Fval: uint16(178), }, 156: { Fbits: uint8(8), Fval: uint16(9), }, 157: { Fbits: uint8(8), Fval: uint16(137), }, 158: { Fbits: uint8(8), Fval: uint16(73), }, 159: { Fbits: uint8(9), Fval: uint16(242), }, 160: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4), }, 161: { Fbits: uint8(8), Fval: uint16(85), }, 162: { Fbits: uint8(8), Fval: uint16(21), }, 163: { Fop: uint8(16), Fbits: uint8(8), Fval: uint16(258), }, 164: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43), }, 165: { Fbits: uint8(8), Fval: uint16(117), }, 166: { Fbits: uint8(8), Fval: uint16(53), }, 167: { Fbits: uint8(9), Fval: uint16(202), }, 168: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13), }, 169: { Fbits: uint8(8), Fval: uint16(101), }, 170: { Fbits: uint8(8), Fval: uint16(37), }, 171: { Fbits: uint8(9), Fval: uint16(170), }, 172: { Fbits: uint8(8), Fval: uint16(5), }, 173: { Fbits: uint8(8), Fval: uint16(133), }, 174: { Fbits: uint8(8), Fval: uint16(69), }, 175: { Fbits: uint8(9), Fval: uint16(234), }, 176: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8), }, 177: { Fbits: uint8(8), Fval: uint16(93), }, 178: { Fbits: uint8(8), Fval: uint16(29), }, 179: { Fbits: uint8(9), Fval: uint16(154), }, 180: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83), }, 181: { Fbits: uint8(8), Fval: uint16(125), }, 182: { Fbits: uint8(8), Fval: uint16(61), }, 183: { Fbits: uint8(9), Fval: uint16(218), }, 184: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23), }, 185: { Fbits: uint8(8), Fval: uint16(109), }, 186: { Fbits: uint8(8), Fval: uint16(45), }, 187: { Fbits: uint8(9), Fval: uint16(186), }, 188: { Fbits: uint8(8), Fval: uint16(13), }, 189: { Fbits: uint8(8), Fval: uint16(141), }, 190: { Fbits: uint8(8), Fval: uint16(77), }, 191: { Fbits: uint8(9), Fval: uint16(250), }, 192: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3), }, 193: { Fbits: uint8(8), Fval: uint16(83), }, 194: { Fbits: uint8(8), Fval: uint16(19), }, 195: { Fop: uint8(21), Fbits: uint8(8), Fval: uint16(195), }, 196: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35), }, 197: { Fbits: uint8(8), Fval: uint16(115), }, 198: { Fbits: uint8(8), Fval: uint16(51), }, 199: { Fbits: uint8(9), Fval: uint16(198), }, 200: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11), }, 201: { Fbits: uint8(8), Fval: uint16(99), }, 202: { Fbits: uint8(8), Fval: uint16(35), }, 203: { Fbits: uint8(9), Fval: uint16(166), }, 204: { Fbits: uint8(8), Fval: uint16(3), }, 205: { Fbits: uint8(8), Fval: uint16(131), }, 206: { Fbits: uint8(8), Fval: uint16(67), }, 207: { Fbits: uint8(9), Fval: uint16(230), }, 208: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7), }, 209: { Fbits: uint8(8), Fval: uint16(91), }, 210: { Fbits: uint8(8), Fval: uint16(27), }, 211: { Fbits: uint8(9), Fval: uint16(150), }, 212: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67), }, 213: { Fbits: uint8(8), Fval: uint16(123), }, 214: { Fbits: uint8(8), Fval: uint16(59), }, 215: { Fbits: uint8(9), Fval: uint16(214), }, 216: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19), }, 217: { Fbits: uint8(8), Fval: uint16(107), }, 218: { Fbits: uint8(8), Fval: uint16(43), }, 219: { Fbits: uint8(9), Fval: uint16(182), }, 220: { Fbits: uint8(8), Fval: uint16(11), }, 221: { Fbits: uint8(8), Fval: uint16(139), }, 222: { Fbits: uint8(8), Fval: uint16(75), }, 223: { Fbits: uint8(9), Fval: uint16(246), }, 224: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5), }, 225: { Fbits: uint8(8), Fval: uint16(87), }, 226: { Fbits: uint8(8), Fval: uint16(23), }, 227: { Fop: uint8(64), Fbits: uint8(8), }, 228: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51), }, 229: { Fbits: uint8(8), Fval: uint16(119), }, 230: { Fbits: uint8(8), Fval: uint16(55), }, 231: { Fbits: uint8(9), Fval: uint16(206), }, 232: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15), }, 233: { Fbits: uint8(8), Fval: uint16(103), }, 234: { Fbits: uint8(8), Fval: uint16(39), }, 235: { Fbits: uint8(9), Fval: uint16(174), }, 236: { Fbits: uint8(8), Fval: uint16(7), }, 237: { Fbits: uint8(8), Fval: uint16(135), }, 238: { Fbits: uint8(8), Fval: uint16(71), }, 239: { Fbits: uint8(9), Fval: uint16(238), }, 240: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9), }, 241: { Fbits: uint8(8), Fval: uint16(95), }, 242: { Fbits: uint8(8), Fval: uint16(31), }, 243: { Fbits: uint8(9), Fval: uint16(158), }, 244: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99), }, 245: { Fbits: uint8(8), Fval: uint16(127), }, 246: { Fbits: uint8(8), Fval: uint16(63), }, 247: { Fbits: uint8(9), Fval: uint16(222), }, 248: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27), }, 249: { Fbits: uint8(8), Fval: uint16(111), }, 250: { Fbits: uint8(8), Fval: uint16(47), }, 251: { Fbits: uint8(9), Fval: uint16(190), }, 252: { Fbits: uint8(8), Fval: uint16(15), }, 253: { Fbits: uint8(8), Fval: uint16(143), }, 254: { Fbits: uint8(8), Fval: uint16(79), }, 255: { Fbits: uint8(9), Fval: uint16(254), }, 256: { Fop: uint8(96), Fbits: uint8(7), }, 257: { Fbits: uint8(8), Fval: uint16(80), }, 258: { Fbits: uint8(8), Fval: uint16(16), }, 259: { Fop: uint8(20), Fbits: uint8(8), Fval: uint16(115), }, 260: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31), }, 261: { Fbits: uint8(8), Fval: uint16(112), }, 262: { Fbits: uint8(8), Fval: uint16(48), }, 263: { Fbits: uint8(9), Fval: uint16(193), }, 264: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10), }, 265: { Fbits: uint8(8), Fval: uint16(96), }, 266: { Fbits: uint8(8), Fval: uint16(32), }, 267: { Fbits: uint8(9), Fval: uint16(161), }, 268: { Fbits: uint8(8), }, 269: { Fbits: uint8(8), Fval: uint16(128), }, 270: { Fbits: uint8(8), Fval: uint16(64), }, 271: { Fbits: uint8(9), Fval: uint16(225), }, 272: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6), }, 273: { Fbits: uint8(8), Fval: uint16(88), }, 274: { Fbits: uint8(8), Fval: uint16(24), }, 275: { Fbits: uint8(9), Fval: uint16(145), }, 276: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59), }, 277: { Fbits: uint8(8), Fval: uint16(120), }, 278: { Fbits: uint8(8), Fval: uint16(56), }, 279: { Fbits: uint8(9), Fval: uint16(209), }, 280: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17), }, 281: { Fbits: uint8(8), Fval: uint16(104), }, 282: { Fbits: uint8(8), Fval: uint16(40), }, 283: { Fbits: uint8(9), Fval: uint16(177), }, 284: { Fbits: uint8(8), Fval: uint16(8), }, 285: { Fbits: uint8(8), Fval: uint16(136), }, 286: { Fbits: uint8(8), Fval: uint16(72), }, 287: { Fbits: uint8(9), Fval: uint16(241), }, 288: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4), }, 289: { Fbits: uint8(8), Fval: uint16(84), }, 290: { Fbits: uint8(8), Fval: uint16(20), }, 291: { Fop: uint8(21), Fbits: uint8(8), Fval: uint16(227), }, 292: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43), }, 293: { Fbits: uint8(8), Fval: uint16(116), }, 294: { Fbits: uint8(8), Fval: uint16(52), }, 295: { Fbits: uint8(9), Fval: uint16(201), }, 296: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13), }, 297: { Fbits: uint8(8), Fval: uint16(100), }, 298: { Fbits: uint8(8), Fval: uint16(36), }, 299: { Fbits: uint8(9), Fval: uint16(169), }, 300: { Fbits: uint8(8), Fval: uint16(4), }, 301: { Fbits: uint8(8), Fval: uint16(132), }, 302: { Fbits: uint8(8), Fval: uint16(68), }, 303: { Fbits: uint8(9), Fval: uint16(233), }, 304: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8), }, 305: { Fbits: uint8(8), Fval: uint16(92), }, 306: { Fbits: uint8(8), Fval: uint16(28), }, 307: { Fbits: uint8(9), Fval: uint16(153), }, 308: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83), }, 309: { Fbits: uint8(8), Fval: uint16(124), }, 310: { Fbits: uint8(8), Fval: uint16(60), }, 311: { Fbits: uint8(9), Fval: uint16(217), }, 312: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23), }, 313: { Fbits: uint8(8), Fval: uint16(108), }, 314: { Fbits: uint8(8), Fval: uint16(44), }, 315: { Fbits: uint8(9), Fval: uint16(185), }, 316: { Fbits: uint8(8), Fval: uint16(12), }, 317: { Fbits: uint8(8), Fval: uint16(140), }, 318: { Fbits: uint8(8), Fval: uint16(76), }, 319: { Fbits: uint8(9), Fval: uint16(249), }, 320: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3), }, 321: { Fbits: uint8(8), Fval: uint16(82), }, 322: { Fbits: uint8(8), Fval: uint16(18), }, 323: { Fop: uint8(21), Fbits: uint8(8), Fval: uint16(163), }, 324: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35), }, 325: { Fbits: uint8(8), Fval: uint16(114), }, 326: { Fbits: uint8(8), Fval: uint16(50), }, 327: { Fbits: uint8(9), Fval: uint16(197), }, 328: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11), }, 329: { Fbits: uint8(8), Fval: uint16(98), }, 330: { Fbits: uint8(8), Fval: uint16(34), }, 331: { Fbits: uint8(9), Fval: uint16(165), }, 332: { Fbits: uint8(8), Fval: uint16(2), }, 333: { Fbits: uint8(8), Fval: uint16(130), }, 334: { Fbits: uint8(8), Fval: uint16(66), }, 335: { Fbits: uint8(9), Fval: uint16(229), }, 336: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7), }, 337: { Fbits: uint8(8), Fval: uint16(90), }, 338: { Fbits: uint8(8), Fval: uint16(26), }, 339: { Fbits: uint8(9), Fval: uint16(149), }, 340: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67), }, 341: { Fbits: uint8(8), Fval: uint16(122), }, 342: { Fbits: uint8(8), Fval: uint16(58), }, 343: { Fbits: uint8(9), Fval: uint16(213), }, 344: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19), }, 345: { Fbits: uint8(8), Fval: uint16(106), }, 346: { Fbits: uint8(8), Fval: uint16(42), }, 347: { Fbits: uint8(9), Fval: uint16(181), }, 348: { Fbits: uint8(8), Fval: uint16(10), }, 349: { Fbits: uint8(8), Fval: uint16(138), }, 350: { Fbits: uint8(8), Fval: uint16(74), }, 351: { Fbits: uint8(9), Fval: uint16(245), }, 352: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5), }, 353: { Fbits: uint8(8), Fval: uint16(86), }, 354: { Fbits: uint8(8), Fval: uint16(22), }, 355: { Fop: uint8(64), Fbits: uint8(8), }, 356: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51), }, 357: { Fbits: uint8(8), Fval: uint16(118), }, 358: { Fbits: uint8(8), Fval: uint16(54), }, 359: { Fbits: uint8(9), Fval: uint16(205), }, 360: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15), }, 361: { Fbits: uint8(8), Fval: uint16(102), }, 362: { Fbits: uint8(8), Fval: uint16(38), }, 363: { Fbits: uint8(9), Fval: uint16(173), }, 364: { Fbits: uint8(8), Fval: uint16(6), }, 365: { Fbits: uint8(8), Fval: uint16(134), }, 366: { Fbits: uint8(8), Fval: uint16(70), }, 367: { Fbits: uint8(9), Fval: uint16(237), }, 368: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9), }, 369: { Fbits: uint8(8), Fval: uint16(94), }, 370: { Fbits: uint8(8), Fval: uint16(30), }, 371: { Fbits: uint8(9), Fval: uint16(157), }, 372: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99), }, 373: { Fbits: uint8(8), Fval: uint16(126), }, 374: { Fbits: uint8(8), Fval: uint16(62), }, 375: { Fbits: uint8(9), Fval: uint16(221), }, 376: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27), }, 377: { Fbits: uint8(8), Fval: uint16(110), }, 378: { Fbits: uint8(8), Fval: uint16(46), }, 379: { Fbits: uint8(9), Fval: uint16(189), }, 380: { Fbits: uint8(8), Fval: uint16(14), }, 381: { Fbits: uint8(8), Fval: uint16(142), }, 382: { Fbits: uint8(8), Fval: uint16(78), }, 383: { Fbits: uint8(9), Fval: uint16(253), }, 384: { Fop: uint8(96), Fbits: uint8(7), }, 385: { Fbits: uint8(8), Fval: uint16(81), }, 386: { Fbits: uint8(8), Fval: uint16(17), }, 387: { Fop: uint8(21), Fbits: uint8(8), Fval: uint16(131), }, 388: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(31), }, 389: { Fbits: uint8(8), Fval: uint16(113), }, 390: { Fbits: uint8(8), Fval: uint16(49), }, 391: { Fbits: uint8(9), Fval: uint16(195), }, 392: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(10), }, 393: { Fbits: uint8(8), Fval: uint16(97), }, 394: { Fbits: uint8(8), Fval: uint16(33), }, 395: { Fbits: uint8(9), Fval: uint16(163), }, 396: { Fbits: uint8(8), Fval: uint16(1), }, 397: { Fbits: uint8(8), Fval: uint16(129), }, 398: { Fbits: uint8(8), Fval: uint16(65), }, 399: { Fbits: uint8(9), Fval: uint16(227), }, 400: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(6), }, 401: { Fbits: uint8(8), Fval: uint16(89), }, 402: { Fbits: uint8(8), Fval: uint16(25), }, 403: { Fbits: uint8(9), Fval: uint16(147), }, 404: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(59), }, 405: { Fbits: uint8(8), Fval: uint16(121), }, 406: { Fbits: uint8(8), Fval: uint16(57), }, 407: { Fbits: uint8(9), Fval: uint16(211), }, 408: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(17), }, 409: { Fbits: uint8(8), Fval: uint16(105), }, 410: { Fbits: uint8(8), Fval: uint16(41), }, 411: { Fbits: uint8(9), Fval: uint16(179), }, 412: { Fbits: uint8(8), Fval: uint16(9), }, 413: { Fbits: uint8(8), Fval: uint16(137), }, 414: { Fbits: uint8(8), Fval: uint16(73), }, 415: { Fbits: uint8(9), Fval: uint16(243), }, 416: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(4), }, 417: { Fbits: uint8(8), Fval: uint16(85), }, 418: { Fbits: uint8(8), Fval: uint16(21), }, 419: { Fop: uint8(16), Fbits: uint8(8), Fval: uint16(258), }, 420: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(43), }, 421: { Fbits: uint8(8), Fval: uint16(117), }, 422: { Fbits: uint8(8), Fval: uint16(53), }, 423: { Fbits: uint8(9), Fval: uint16(203), }, 424: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(13), }, 425: { Fbits: uint8(8), Fval: uint16(101), }, 426: { Fbits: uint8(8), Fval: uint16(37), }, 427: { Fbits: uint8(9), Fval: uint16(171), }, 428: { Fbits: uint8(8), Fval: uint16(5), }, 429: { Fbits: uint8(8), Fval: uint16(133), }, 430: { Fbits: uint8(8), Fval: uint16(69), }, 431: { Fbits: uint8(9), Fval: uint16(235), }, 432: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(8), }, 433: { Fbits: uint8(8), Fval: uint16(93), }, 434: { Fbits: uint8(8), Fval: uint16(29), }, 435: { Fbits: uint8(9), Fval: uint16(155), }, 436: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(83), }, 437: { Fbits: uint8(8), Fval: uint16(125), }, 438: { Fbits: uint8(8), Fval: uint16(61), }, 439: { Fbits: uint8(9), Fval: uint16(219), }, 440: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(23), }, 441: { Fbits: uint8(8), Fval: uint16(109), }, 442: { Fbits: uint8(8), Fval: uint16(45), }, 443: { Fbits: uint8(9), Fval: uint16(187), }, 444: { Fbits: uint8(8), Fval: uint16(13), }, 445: { Fbits: uint8(8), Fval: uint16(141), }, 446: { Fbits: uint8(8), Fval: uint16(77), }, 447: { Fbits: uint8(9), Fval: uint16(251), }, 448: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(3), }, 449: { Fbits: uint8(8), Fval: uint16(83), }, 450: { Fbits: uint8(8), Fval: uint16(19), }, 451: { Fop: uint8(21), Fbits: uint8(8), Fval: uint16(195), }, 452: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(35), }, 453: { Fbits: uint8(8), Fval: uint16(115), }, 454: { Fbits: uint8(8), Fval: uint16(51), }, 455: { Fbits: uint8(9), Fval: uint16(199), }, 456: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(11), }, 457: { Fbits: uint8(8), Fval: uint16(99), }, 458: { Fbits: uint8(8), Fval: uint16(35), }, 459: { Fbits: uint8(9), Fval: uint16(167), }, 460: { Fbits: uint8(8), Fval: uint16(3), }, 461: { Fbits: uint8(8), Fval: uint16(131), }, 462: { Fbits: uint8(8), Fval: uint16(67), }, 463: { Fbits: uint8(9), Fval: uint16(231), }, 464: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(7), }, 465: { Fbits: uint8(8), Fval: uint16(91), }, 466: { Fbits: uint8(8), Fval: uint16(27), }, 467: { Fbits: uint8(9), Fval: uint16(151), }, 468: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(67), }, 469: { Fbits: uint8(8), Fval: uint16(123), }, 470: { Fbits: uint8(8), Fval: uint16(59), }, 471: { Fbits: uint8(9), Fval: uint16(215), }, 472: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(19), }, 473: { Fbits: uint8(8), Fval: uint16(107), }, 474: { Fbits: uint8(8), Fval: uint16(43), }, 475: { Fbits: uint8(9), Fval: uint16(183), }, 476: { Fbits: uint8(8), Fval: uint16(11), }, 477: { Fbits: uint8(8), Fval: uint16(139), }, 478: { Fbits: uint8(8), Fval: uint16(75), }, 479: { Fbits: uint8(9), Fval: uint16(247), }, 480: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(5), }, 481: { Fbits: uint8(8), Fval: uint16(87), }, 482: { Fbits: uint8(8), Fval: uint16(23), }, 483: { Fop: uint8(64), Fbits: uint8(8), }, 484: { Fop: uint8(19), Fbits: uint8(7), Fval: uint16(51), }, 485: { Fbits: uint8(8), Fval: uint16(119), }, 486: { Fbits: uint8(8), Fval: uint16(55), }, 487: { Fbits: uint8(9), Fval: uint16(207), }, 488: { Fop: uint8(17), Fbits: uint8(7), Fval: uint16(15), }, 489: { Fbits: uint8(8), Fval: uint16(103), }, 490: { Fbits: uint8(8), Fval: uint16(39), }, 491: { Fbits: uint8(9), Fval: uint16(175), }, 492: { Fbits: uint8(8), Fval: uint16(7), }, 493: { Fbits: uint8(8), Fval: uint16(135), }, 494: { Fbits: uint8(8), Fval: uint16(71), }, 495: { Fbits: uint8(9), Fval: uint16(239), }, 496: { Fop: uint8(16), Fbits: uint8(7), Fval: uint16(9), }, 497: { Fbits: uint8(8), Fval: uint16(95), }, 498: { Fbits: uint8(8), Fval: uint16(31), }, 499: { Fbits: uint8(9), Fval: uint16(159), }, 500: { Fop: uint8(20), Fbits: uint8(7), Fval: uint16(99), }, 501: { Fbits: uint8(8), Fval: uint16(127), }, 502: { Fbits: uint8(8), Fval: uint16(63), }, 503: { Fbits: uint8(9), Fval: uint16(223), }, 504: { Fop: uint8(18), Fbits: uint8(7), Fval: uint16(27), }, 505: { Fbits: uint8(8), Fval: uint16(111), }, 506: { Fbits: uint8(8), Fval: uint16(47), }, 507: { Fbits: uint8(9), Fval: uint16(191), }, 508: { Fbits: uint8(8), Fval: uint16(15), }, 509: { Fbits: uint8(8), Fval: uint16(143), }, 510: { Fbits: uint8(8), Fval: uint16(79), }, 511: { Fbits: uint8(9), Fval: uint16(255), }, } var _distfix = [32]Tcode{ 0: { Fop: uint8(16), Fbits: uint8(5), Fval: uint16(1), }, 1: { Fop: uint8(23), Fbits: uint8(5), Fval: uint16(257), }, 2: { Fop: uint8(19), Fbits: uint8(5), Fval: uint16(17), }, 3: { Fop: uint8(27), Fbits: uint8(5), Fval: uint16(4097), }, 4: { Fop: uint8(17), Fbits: uint8(5), Fval: uint16(5), }, 5: { Fop: uint8(25), Fbits: uint8(5), Fval: uint16(1025), }, 6: { Fop: uint8(21), Fbits: uint8(5), Fval: uint16(65), }, 7: { Fop: uint8(29), Fbits: uint8(5), Fval: uint16(16385), }, 8: { Fop: uint8(16), Fbits: uint8(5), Fval: uint16(3), }, 9: { Fop: uint8(24), Fbits: uint8(5), Fval: uint16(513), }, 10: { Fop: uint8(20), Fbits: uint8(5), Fval: uint16(33), }, 11: { Fop: uint8(28), Fbits: uint8(5), Fval: uint16(8193), }, 12: { Fop: uint8(18), Fbits: uint8(5), Fval: uint16(9), }, 13: { Fop: uint8(26), Fbits: uint8(5), Fval: uint16(2049), }, 14: { Fop: uint8(22), Fbits: uint8(5), Fval: uint16(129), }, 15: { Fop: uint8(64), Fbits: uint8(5), }, 16: { Fop: uint8(16), Fbits: uint8(5), Fval: uint16(2), }, 17: { Fop: uint8(23), Fbits: uint8(5), Fval: uint16(385), }, 18: { Fop: uint8(19), Fbits: uint8(5), Fval: uint16(25), }, 19: { Fop: uint8(27), Fbits: uint8(5), Fval: uint16(6145), }, 20: { Fop: uint8(17), Fbits: uint8(5), Fval: uint16(7), }, 21: { Fop: uint8(25), Fbits: uint8(5), Fval: uint16(1537), }, 22: { Fop: uint8(21), Fbits: uint8(5), Fval: uint16(97), }, 23: { Fop: uint8(29), Fbits: uint8(5), Fval: uint16(24577), }, 24: { Fop: uint8(16), Fbits: uint8(5), Fval: uint16(4), }, 25: { Fop: uint8(24), Fbits: uint8(5), Fval: uint16(769), }, 26: { Fop: uint8(20), Fbits: uint8(5), Fval: uint16(49), }, 27: { Fop: uint8(28), Fbits: uint8(5), Fval: uint16(12289), }, 28: { Fop: uint8(18), Fbits: uint8(5), Fval: uint16(13), }, 29: { Fop: uint8(26), Fbits: uint8(5), Fval: uint16(3073), }, 30: { Fop: uint8(22), Fbits: uint8(5), Fval: uint16(193), }, 31: { Fop: uint8(64), Fbits: uint8(5), }, } /* Macros for inflateBack(): */ /* Load returned state from inflate_fast() */ /* Set state from registers for inflate_fast() */ /* Clear the input bit accumulator */ /* Assure that some input is available. If input is requested, but denied, then return a Z_BUF_ERROR from inflateBack(). */ /* Get a byte of input into the bit accumulator, or return from inflateBack() with an error if there is no input available. */ /* Assure that there are at least n bits in the bit accumulator. If there is not enough available input to do that, then return from inflateBack() with an error. */ /* Return the low n bits of the bit accumulator (n < 16) */ /* Remove n bits from the bit accumulator */ /* Remove zero to seven bits as needed to go to a byte boundary */ /* Assure that some output space is available, by writing out the window if it's full. If the write fails, return from inflateBack() with a Z_BUF_ERROR. */ // C documentation // // /* // strm provides the memory allocation functions and window buffer on input, // and provides information on the unused input on return. For Z_DATA_ERROR // returns, strm will also provide an error message. // // in() and out() are the call-back input and output functions. When // inflateBack() needs more input, it calls in(). When inflateBack() has // filled the window with output, or when it completes with data in the // window, it calls out() to write out the data. The application must not // change the provided input until in() is called again or inflateBack() // returns. The application must not change the window/output buffer until // inflateBack() returns. // // in() and out() are called with a descriptor parameter provided in the // inflateBack() call. This parameter can be a structure that provides the // information required to do the read or write, as well as accumulated // information on the input and output such as totals and check values. // // in() should return zero on failure. out() should return non-zero on // failure. If either in() or out() fails, than inflateBack() returns a // Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it // was in() or out() that caused in the error. Otherwise, inflateBack() // returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format // error, or Z_MEM_ERROR if it could not allocate memory for the state. // inflateBack() can also return Z_STREAM_ERROR if the input parameters // are not correct, i.e. strm is Z_NULL or the state was not initialized. // */ func XinflateBack(tls *libc.TLS, strm Tz_streamp, in Tin_func, in_desc uintptr, out Tout_func, out_desc uintptr) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) var bits, copy1, have, left, len1, v1, v18, v20, v24, v29, v30, v43, v44 uint32 var from, put, state, v11, v15, v16, v17, v19, v21, v23, v25, v26, v27, v28, v31, v33, v35, v36, v37, v39, v41, v42, v46, v47 uintptr var here, last Tcode var hold uint64 var ret int32 var _ /* next at bp+0 */ uintptr _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, copy1, from, have, here, hold, last, left, len1, put, ret, state, v1, v11, v15, v16, v17, v18, v19, v20, v21, v23, v24, v25, v26, v27, v28, v29, v30, v31, v33, v35, v36, v37, v39, v41, v42, v43, v44, v46, v47 /* return code */ /* Check that the strm exists and that the state was initialized */ if strm == uintptr(m_Z_NULL) || (*Tz_stream)(unsafe.Pointer(strm)).Fstate == uintptr(m_Z_NULL) { return -int32(2) } state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate /* Reset the state */ (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(m_Z_NULL) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TYPE) (*Tinflate_state)(unsafe.Pointer(state)).Flast = 0 (*Tinflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) *(*uintptr)(unsafe.Pointer(bp)) = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(m_Z_NULL) { v1 = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in } else { v1 = uint32(0) } have = v1 hold = uint64(0) bits = uint32(0) put = (*Tinflate_state)(unsafe.Pointer(state)).Fwindow left = (*Tinflate_state)(unsafe.Pointer(state)).Fwsize /* Inflate until end of block marked as last */ for { switch (*Tinflate_state)(unsafe.Pointer(state)).Fmode { case int32(_TYPE): goto _3 case int32(_STORED): goto _4 case int32(_TABLE): goto _5 case int32(_LEN): goto _6 case int32(_DONE): goto _7 case int32(_BAD): goto _8 default: goto _9 } goto _10 _3: ; /* determine and dispatch block type */ if (*Tinflate_state)(unsafe.Pointer(state)).Flast != 0 { hold >>= uint64(bits & uint32(7)) bits -= bits & uint32(7) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_DONE) goto _10 } for bits < libc.Uint32FromInt32(libc.Int32FromInt32(3)) { if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v11 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v11))) << bits bits += uint32(8) } (*Tinflate_state)(unsafe.Pointer(state)).Flast = libc.Int32FromUint32(uint32(hold) & (libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(1)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(1)) switch uint32(hold) & (libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(2)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(2)) goto _10 _4: ; /* get and verify stored block length */ _14: ; hold >>= uint64(bits & uint32(7)) bits -= bits & uint32(7) goto _13 _13: ; if 0 != 0 { goto _14 } goto _12 _12: ; /* go to byte boundary */ for bits < libc.Uint32FromInt32(libc.Int32FromInt32(32)) { if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v15 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v15))) << bits bits += uint32(8) } if hold&uint64(0xffff) != hold>>int32(16)^uint64(0xffff) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 25 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _10 } (*Tinflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff) hold = uint64(0) bits = uint32(0) /* copy stored block from input to output */ for (*Tinflate_state)(unsafe.Pointer(state)).Flength != uint32(0) { copy1 = (*Tinflate_state)(unsafe.Pointer(state)).Flength if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } if left == uint32(0) { put = (*Tinflate_state)(unsafe.Pointer(state)).Fwindow left = (*Tinflate_state)(unsafe.Pointer(state)).Fwsize (*Tinflate_state)(unsafe.Pointer(state)).Fwhave = left if (*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{out})))(tls, out_desc, put, left) != 0 { ret = -int32(5) goto inf_leave } } if copy1 > have { copy1 = have } if copy1 > left { copy1 = left } libc.X__builtin___memcpy_chk(tls, put, *(*uintptr)(unsafe.Pointer(bp)), uint64(copy1), ^t__predefined_size_t(0)) have -= copy1 *(*uintptr)(unsafe.Pointer(bp)) += uintptr(copy1) left -= copy1 put += uintptr(copy1) *(*uint32)(unsafe.Pointer(state + 92)) -= copy1 } (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TYPE) goto _10 _5: ; /* get dynamic table entries descriptor */ for bits < libc.Uint32FromInt32(libc.Int32FromInt32(14)) { if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v16 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v16))) << bits bits += uint32(8) } (*Tinflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(5)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(5)) (*Tinflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(5)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(5)) (*Tinflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(4)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(4)) if (*Tinflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Tinflate_state)(unsafe.Pointer(state)).Fndist > uint32(30) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 54 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _10 } /* get code length code lengths (not a typo) */ (*Tinflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) for (*Tinflate_state)(unsafe.Pointer(state)).Fhave < (*Tinflate_state)(unsafe.Pointer(state)).Fncode { for bits < libc.Uint32FromInt32(libc.Int32FromInt32(3)) { if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v17 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v17))) << bits bits += uint32(8) } v19 = state + 140 v18 = *(*uint32)(unsafe.Pointer(v19)) *(*uint32)(unsafe.Pointer(v19))++ *(*uint16)(unsafe.Pointer(state + 152 + uintptr(_order[v18])*2)) = uint16(uint32(hold) & (libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(3)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(3)) } for (*Tinflate_state)(unsafe.Pointer(state)).Fhave < uint32(19) { v21 = state + 140 v20 = *(*uint32)(unsafe.Pointer(v21)) *(*uint32)(unsafe.Pointer(v21))++ *(*uint16)(unsafe.Pointer(state + 152 + uintptr(_order[v20])*2)) = uint16(0) } (*Tinflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 (*Tinflate_state)(unsafe.Pointer(state)).Flencode = (*Tinflate_state)(unsafe.Pointer(state)).Fnext (*Tinflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) ret = Xinflate_table(tls, int32(_CODES), state+152, uint32(19), state+144, state+120, state+792) if ret != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 90 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _10 } /* get length and distance code code lengths */ (*Tinflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) for (*Tinflate_state)(unsafe.Pointer(state)).Fhave < (*Tinflate_state)(unsafe.Pointer(state)).Fnlen+(*Tinflate_state)(unsafe.Pointer(state)).Fndist { for { here = *(*Tcode)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(libc.Uint32FromUint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Flenbits-libc.Uint32FromInt32(1)))*4)) if uint32(here.Fbits) <= bits { break } if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v23 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v23))) << bits bits += uint32(8) goto _22 _22: } if libc.Int32FromUint16(here.Fval) < int32(16) { hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) v25 = state + 140 v24 = *(*uint32)(unsafe.Pointer(v25)) *(*uint32)(unsafe.Pointer(v25))++ *(*uint16)(unsafe.Pointer(state + 152 + uintptr(v24)*2)) = here.Fval } else { if libc.Int32FromUint16(here.Fval) == int32(16) { for bits < libc.Uint32FromInt32(libc.Int32FromUint8(here.Fbits)+libc.Int32FromInt32(2)) { if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v26 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v26))) << bits bits += uint32(8) } hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) if (*Tinflate_state)(unsafe.Pointer(state)).Fhave == uint32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 115 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) break } len1 = uint32(*(*uint16)(unsafe.Pointer(state + 152 + uintptr((*Tinflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2))) copy1 = uint32(3) + uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(2)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(2)) } else { if libc.Int32FromUint16(here.Fval) == int32(17) { for bits < libc.Uint32FromInt32(libc.Int32FromUint8(here.Fbits)+libc.Int32FromInt32(3)) { if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v27 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v27))) << bits bits += uint32(8) } hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) len1 = uint32(0) copy1 = uint32(3) + uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(3)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(3)) } else { for bits < libc.Uint32FromInt32(libc.Int32FromUint8(here.Fbits)+libc.Int32FromInt32(7)) { if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v28 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v28))) << bits bits += uint32(8) } hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) len1 = uint32(0) copy1 = uint32(11) + uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(7)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(7)) } } if (*Tinflate_state)(unsafe.Pointer(state)).Fhave+copy1 > (*Tinflate_state)(unsafe.Pointer(state)).Fnlen+(*Tinflate_state)(unsafe.Pointer(state)).Fndist { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 115 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) break } for { v29 = copy1 copy1-- if !(v29 != 0) { break } v31 = state + 140 v30 = *(*uint32)(unsafe.Pointer(v31)) *(*uint32)(unsafe.Pointer(v31))++ *(*uint16)(unsafe.Pointer(state + 152 + uintptr(v30)*2)) = uint16(len1) } } } /* handle error breaks in while */ if (*Tinflate_state)(unsafe.Pointer(state)).Fmode == int32(_BAD) { goto _10 } /* check for end-of-block code (better have one) */ if libc.Int32FromUint16(*(*uint16)(unsafe.Pointer(state + 152 + 256*2))) == 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 141 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _10 } /* build code tables -- note: do not change the lenbits or distbits values here (9 and 6) without reading the comments in inftrees.h concerning the ENOUGH constants, which depend on those values */ (*Tinflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 (*Tinflate_state)(unsafe.Pointer(state)).Flencode = (*Tinflate_state)(unsafe.Pointer(state)).Fnext (*Tinflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) ret = Xinflate_table(tls, int32(_LENS), state+152, (*Tinflate_state)(unsafe.Pointer(state)).Fnlen, state+144, state+120, state+792) if ret != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 178 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _10 } (*Tinflate_state)(unsafe.Pointer(state)).Fdistcode = (*Tinflate_state)(unsafe.Pointer(state)).Fnext (*Tinflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) ret = Xinflate_table(tls, int32(_DISTS), state+152+uintptr((*Tinflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Tinflate_state)(unsafe.Pointer(state)).Fndist, state+144, state+124, state+792) if ret != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 206 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _10 } (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_LEN) /* fallthrough */ _6: ; /* use inflate_fast() if we have enough input and output */ if have >= uint32(6) && left >= uint32(258) { (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out = put (*Tz_stream)(unsafe.Pointer(strm)).Favail_out = left (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp)) (*Tz_stream)(unsafe.Pointer(strm)).Favail_in = have (*Tinflate_state)(unsafe.Pointer(state)).Fhold = hold (*Tinflate_state)(unsafe.Pointer(state)).Fbits = bits if (*Tinflate_state)(unsafe.Pointer(state)).Fwhave < (*Tinflate_state)(unsafe.Pointer(state)).Fwsize { (*Tinflate_state)(unsafe.Pointer(state)).Fwhave = (*Tinflate_state)(unsafe.Pointer(state)).Fwsize - left } Xinflate_fast(tls, strm, (*Tinflate_state)(unsafe.Pointer(state)).Fwsize) put = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out left = (*Tz_stream)(unsafe.Pointer(strm)).Favail_out *(*uintptr)(unsafe.Pointer(bp)) = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in have = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in hold = (*Tinflate_state)(unsafe.Pointer(state)).Fhold bits = (*Tinflate_state)(unsafe.Pointer(state)).Fbits goto _10 } /* get a literal, length, or end-of-block code */ for { here = *(*Tcode)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(libc.Uint32FromUint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Flenbits-libc.Uint32FromInt32(1)))*4)) if uint32(here.Fbits) <= bits { break } if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v33 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v33))) << bits bits += uint32(8) goto _32 _32: } if here.Fop != 0 && libc.Int32FromUint8(here.Fop)&int32(0xf0) == 0 { last = here for { here = *(*Tcode)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(libc.Int32FromUint8(last.Fbits)+libc.Int32FromUint8(last.Fop))-uint32(1))>>last.Fbits)*4)) if libc.Uint32FromInt32(libc.Int32FromUint8(last.Fbits)+libc.Int32FromUint8(here.Fbits)) <= bits { break } if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v35 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v35))) << bits bits += uint32(8) goto _34 _34: } hold >>= uint64(last.Fbits) bits -= uint32(last.Fbits) } hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) (*Tinflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) /* process literal */ if libc.Int32FromUint8(here.Fop) == 0 { if left == uint32(0) { put = (*Tinflate_state)(unsafe.Pointer(state)).Fwindow left = (*Tinflate_state)(unsafe.Pointer(state)).Fwsize (*Tinflate_state)(unsafe.Pointer(state)).Fwhave = left if (*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{out})))(tls, out_desc, put, left) != 0 { ret = -int32(5) goto inf_leave } } v36 = put put++ *(*uint8)(unsafe.Pointer(v36)) = uint8((*Tinflate_state)(unsafe.Pointer(state)).Flength) left-- (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_LEN) goto _10 } /* process end of block */ if libc.Int32FromUint8(here.Fop)&int32(32) != 0 { (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TYPE) goto _10 } /* invalid code */ if libc.Int32FromUint8(here.Fop)&int32(64) != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 228 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _10 } /* length code -- get extra bits, if any */ (*Tinflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) if (*Tinflate_state)(unsafe.Pointer(state)).Fextra != uint32(0) { for bits < (*Tinflate_state)(unsafe.Pointer(state)).Fextra { if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v37 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v37))) << bits bits += uint32(8) } *(*uint32)(unsafe.Pointer(state + 92)) += uint32(hold) & (uint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) hold >>= uint64((*Tinflate_state)(unsafe.Pointer(state)).Fextra) bits -= (*Tinflate_state)(unsafe.Pointer(state)).Fextra } /* get distance code */ for { here = *(*Tcode)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(libc.Uint32FromUint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Fdistbits-libc.Uint32FromInt32(1)))*4)) if uint32(here.Fbits) <= bits { break } if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v39 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v39))) << bits bits += uint32(8) goto _38 _38: } if libc.Int32FromUint8(here.Fop)&int32(0xf0) == 0 { last = here for { here = *(*Tcode)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(libc.Int32FromUint8(last.Fbits)+libc.Int32FromUint8(last.Fop))-uint32(1))>>last.Fbits)*4)) if libc.Uint32FromInt32(libc.Int32FromUint8(last.Fbits)+libc.Int32FromUint8(here.Fbits)) <= bits { break } if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v41 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v41))) << bits bits += uint32(8) goto _40 _40: } hold >>= uint64(last.Fbits) bits -= uint32(last.Fbits) } hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) if libc.Int32FromUint8(here.Fop)&int32(64) != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 256 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _10 } (*Tinflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) /* get distance extra bits, if any */ (*Tinflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) if (*Tinflate_state)(unsafe.Pointer(state)).Fextra != uint32(0) { for bits < (*Tinflate_state)(unsafe.Pointer(state)).Fextra { if have == uint32(0) { have = (*(*func(*libc.TLS, uintptr, uintptr) uint32)(unsafe.Pointer(&struct{ uintptr }{in})))(tls, in_desc, bp) if have == uint32(0) { *(*uintptr)(unsafe.Pointer(bp)) = uintptr(m_Z_NULL) ret = -int32(5) goto inf_leave } } have-- v42 = *(*uintptr)(unsafe.Pointer(bp)) *(*uintptr)(unsafe.Pointer(bp))++ hold += uint64(*(*uint8)(unsafe.Pointer(v42))) << bits bits += uint32(8) } *(*uint32)(unsafe.Pointer(state + 96)) += uint32(hold) & (uint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) hold >>= uint64((*Tinflate_state)(unsafe.Pointer(state)).Fextra) bits -= (*Tinflate_state)(unsafe.Pointer(state)).Fextra } if (*Tinflate_state)(unsafe.Pointer(state)).Fwhave < (*Tinflate_state)(unsafe.Pointer(state)).Fwsize { v43 = left } else { v43 = uint32(0) } if (*Tinflate_state)(unsafe.Pointer(state)).Foffset > (*Tinflate_state)(unsafe.Pointer(state)).Fwsize-v43 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 278 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _10 } /* copy match from window to output */ for cond := true; cond; cond = (*Tinflate_state)(unsafe.Pointer(state)).Flength != uint32(0) { if left == uint32(0) { put = (*Tinflate_state)(unsafe.Pointer(state)).Fwindow left = (*Tinflate_state)(unsafe.Pointer(state)).Fwsize (*Tinflate_state)(unsafe.Pointer(state)).Fwhave = left if (*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{out})))(tls, out_desc, put, left) != 0 { ret = -int32(5) goto inf_leave } } copy1 = (*Tinflate_state)(unsafe.Pointer(state)).Fwsize - (*Tinflate_state)(unsafe.Pointer(state)).Foffset if copy1 < left { from = put + uintptr(copy1) copy1 = left - copy1 } else { from = put - uintptr((*Tinflate_state)(unsafe.Pointer(state)).Foffset) copy1 = left } if copy1 > (*Tinflate_state)(unsafe.Pointer(state)).Flength { copy1 = (*Tinflate_state)(unsafe.Pointer(state)).Flength } *(*uint32)(unsafe.Pointer(state + 92)) -= copy1 left -= copy1 for { v46 = put put++ v47 = from from++ *(*uint8)(unsafe.Pointer(v46)) = *(*uint8)(unsafe.Pointer(v47)) goto _45 _45: ; copy1-- v44 = copy1 if !(v44 != 0) { break } } } goto _10 _7: ; /* inflate stream terminated properly */ ret = int32(m_Z_STREAM_END) goto inf_leave _8: ; ret = -int32(3) goto inf_leave _9: ; /* can't happen, but makes compilers happy */ ret = -int32(2) goto inf_leave _10: ; goto _2 _2: } /* Write leftover output and return unused input */ goto inf_leave inf_leave: ; if left < (*Tinflate_state)(unsafe.Pointer(state)).Fwsize { if (*(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{out})))(tls, out_desc, (*Tinflate_state)(unsafe.Pointer(state)).Fwindow, (*Tinflate_state)(unsafe.Pointer(state)).Fwsize-left) != 0 && ret == int32(m_Z_STREAM_END) { ret = -int32(5) } } (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in = *(*uintptr)(unsafe.Pointer(bp)) (*Tz_stream)(unsafe.Pointer(strm)).Favail_in = have return ret } var _order = [19]uint16{ 0: uint16(16), 1: uint16(17), 2: uint16(18), 4: uint16(8), 5: uint16(7), 6: uint16(9), 7: uint16(6), 8: uint16(10), 9: uint16(5), 10: uint16(11), 11: uint16(4), 12: uint16(12), 13: uint16(3), 14: uint16(13), 15: uint16(2), 16: uint16(14), 17: uint16(1), 18: uint16(15), } func XinflateBackEnd(tls *libc.TLS, strm Tz_streamp) (r int32) { if strm == uintptr(m_Z_NULL) || (*Tz_stream)(unsafe.Pointer(strm)).Fstate == uintptr(m_Z_NULL) || (*Tz_stream)(unsafe.Pointer(strm)).Fzfree == libc.UintptrFromInt32(0) { return -int32(2) } (*(*func(*libc.TLS, Tvoidpf, Tvoidpf))(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzfree})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tz_stream)(unsafe.Pointer(strm)).Fstate) (*Tz_stream)(unsafe.Pointer(strm)).Fstate = uintptr(m_Z_NULL) return m_Z_OK } // C documentation // // /* // Decode literal, length, and distance codes and write out the resulting // literal and match bytes until either not enough input or output is // available, an end-of-block is encountered, or a data error is encountered. // When large enough input and output buffers are supplied to inflate(), for // example, a 16K input buffer and a 64K output buffer, more than 95% of the // inflate execution time is spent in this routine. // // Entry assumptions: // // state->mode == LEN // strm->avail_in >= 6 // strm->avail_out >= 258 // start >= strm->avail_out // state->bits < 8 // // On return, state->mode is one of: // // LEN -- ran out of enough output space or enough available input // TYPE -- reached end of block code, inflate() to interpret next block // BAD -- error in block data // // Notes: // // - The maximum input bits used by a length/distance pair is 15 bits for the // length code, 5 bits for the length extra, 15 bits for the distance code, // and 13 bits for the distance extra. This totals 48 bits, or six bytes. // Therefore if strm->avail_in >= 6, then there is enough input to avoid // checking for available input while decoding. // // - The maximum bytes that a single length/distance pair can output is 258 // bytes, which is the maximum length that can be coded. inflate_fast() // requires strm->avail_out >= 258 for each loop to avoid checking for // output space. // */ func Xinflate_fast(tls *libc.TLS, strm Tz_streamp, start uint32) { var beg, dcode, end, from, here, in, last, lcode, out, state, window, v1, v11, v12, v15, v16, v19, v2, v20, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v4, v40, v41, v42, v43, v44, v5, v6, v7, v8 uintptr var bits, dist, dmask, len1, lmask, op, whave, wnext, wsize, v13, v17, v21, v9 uint32 var hold uint64 var v45, v46 int64 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = beg, bits, dcode, dist, dmask, end, from, here, hold, in, last, lcode, len1, lmask, op, out, state, whave, window, wnext, wsize, v1, v11, v12, v13, v15, v16, v17, v19, v2, v20, v21, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v4, v40, v41, v42, v43, v44, v45, v46, v5, v6, v7, v8, v9 /* where to copy match from */ /* copy state to local variables */ state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate in = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in last = in + uintptr((*Tz_stream)(unsafe.Pointer(strm)).Favail_in-libc.Uint32FromInt32(5)) out = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out beg = out - uintptr(start-(*Tz_stream)(unsafe.Pointer(strm)).Favail_out) end = out + uintptr((*Tz_stream)(unsafe.Pointer(strm)).Favail_out-libc.Uint32FromInt32(257)) wsize = (*Tinflate_state)(unsafe.Pointer(state)).Fwsize whave = (*Tinflate_state)(unsafe.Pointer(state)).Fwhave wnext = (*Tinflate_state)(unsafe.Pointer(state)).Fwnext window = (*Tinflate_state)(unsafe.Pointer(state)).Fwindow hold = (*Tinflate_state)(unsafe.Pointer(state)).Fhold bits = (*Tinflate_state)(unsafe.Pointer(state)).Fbits lcode = (*Tinflate_state)(unsafe.Pointer(state)).Flencode dcode = (*Tinflate_state)(unsafe.Pointer(state)).Fdistcode lmask = uint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Flenbits - uint32(1) dmask = uint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Fdistbits - uint32(1) /* decode literals and length/distances until end-of-block or not enough input data or output space */ for cond := true; cond; cond = in < last && out < end { if bits < uint32(15) { v1 = in in++ hold += uint64(*(*uint8)(unsafe.Pointer(v1))) << bits bits += uint32(8) v2 = in in++ hold += uint64(*(*uint8)(unsafe.Pointer(v2))) << bits bits += uint32(8) } here = lcode + uintptr(hold&uint64(lmask))*4 goto dolen dolen: ; op = uint32((*Tcode)(unsafe.Pointer(here)).Fbits) hold >>= uint64(op) bits -= op op = uint32((*Tcode)(unsafe.Pointer(here)).Fop) if op == uint32(0) { /* literal */ v3 = out out++ *(*uint8)(unsafe.Pointer(v3)) = uint8((*Tcode)(unsafe.Pointer(here)).Fval) } else { if op&uint32(16) != 0 { /* length base */ len1 = uint32((*Tcode)(unsafe.Pointer(here)).Fval) op &= uint32(15) /* number of extra bits */ if op != 0 { if bits < op { v4 = in in++ hold += uint64(*(*uint8)(unsafe.Pointer(v4))) << bits bits += uint32(8) } len1 += uint32(hold) & (uint32(1)<>= uint64(op) bits -= op } if bits < uint32(15) { v5 = in in++ hold += uint64(*(*uint8)(unsafe.Pointer(v5))) << bits bits += uint32(8) v6 = in in++ hold += uint64(*(*uint8)(unsafe.Pointer(v6))) << bits bits += uint32(8) } here = dcode + uintptr(hold&uint64(dmask))*4 goto dodist dodist: ; op = uint32((*Tcode)(unsafe.Pointer(here)).Fbits) hold >>= uint64(op) bits -= op op = uint32((*Tcode)(unsafe.Pointer(here)).Fop) if op&uint32(16) != 0 { /* distance base */ dist = uint32((*Tcode)(unsafe.Pointer(here)).Fval) op &= uint32(15) /* number of extra bits */ if bits < op { v7 = in in++ hold += uint64(*(*uint8)(unsafe.Pointer(v7))) << bits bits += uint32(8) if bits < op { v8 = in in++ hold += uint64(*(*uint8)(unsafe.Pointer(v8))) << bits bits += uint32(8) } } dist += uint32(hold) & (uint32(1)<>= uint64(op) bits -= op op = libc.Uint32FromInt64(int64(out) - int64(beg)) /* max distance in output */ if dist > op { /* see if copy from window */ op = dist - op /* distance back in window */ if op > whave { if (*Tinflate_state)(unsafe.Pointer(state)).Fsane != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 278 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) break } } from = window if wnext == uint32(0) { /* very common case */ from += uintptr(wsize - op) if op < len1 { /* some from window */ len1 -= op for { v11 = out out++ v12 = from from++ *(*uint8)(unsafe.Pointer(v11)) = *(*uint8)(unsafe.Pointer(v12)) goto _10 _10: ; op-- v9 = op if !(v9 != 0) { break } } from = out - uintptr(dist) /* rest from output */ } } else { if wnext < op { /* wrap around window */ from += uintptr(wsize + wnext - op) op -= wnext if op < len1 { /* some from end of window */ len1 -= op for { v15 = out out++ v16 = from from++ *(*uint8)(unsafe.Pointer(v15)) = *(*uint8)(unsafe.Pointer(v16)) goto _14 _14: ; op-- v13 = op if !(v13 != 0) { break } } from = window if wnext < len1 { /* some from start of window */ op = wnext len1 -= op for { v19 = out out++ v20 = from from++ *(*uint8)(unsafe.Pointer(v19)) = *(*uint8)(unsafe.Pointer(v20)) goto _18 _18: ; op-- v17 = op if !(v17 != 0) { break } } from = out - uintptr(dist) /* rest from output */ } } } else { /* contiguous in window */ from += uintptr(wnext - op) if op < len1 { /* some from window */ len1 -= op for { v23 = out out++ v24 = from from++ *(*uint8)(unsafe.Pointer(v23)) = *(*uint8)(unsafe.Pointer(v24)) goto _22 _22: ; op-- v21 = op if !(v21 != 0) { break } } from = out - uintptr(dist) /* rest from output */ } } } for len1 > uint32(2) { v25 = out out++ v26 = from from++ *(*uint8)(unsafe.Pointer(v25)) = *(*uint8)(unsafe.Pointer(v26)) v27 = out out++ v28 = from from++ *(*uint8)(unsafe.Pointer(v27)) = *(*uint8)(unsafe.Pointer(v28)) v29 = out out++ v30 = from from++ *(*uint8)(unsafe.Pointer(v29)) = *(*uint8)(unsafe.Pointer(v30)) len1 -= uint32(3) } if len1 != 0 { v31 = out out++ v32 = from from++ *(*uint8)(unsafe.Pointer(v31)) = *(*uint8)(unsafe.Pointer(v32)) if len1 > uint32(1) { v33 = out out++ v34 = from from++ *(*uint8)(unsafe.Pointer(v33)) = *(*uint8)(unsafe.Pointer(v34)) } } } else { from = out - uintptr(dist) /* copy direct from output */ for cond := true; cond; cond = len1 > uint32(2) { /* minimum length is three */ v35 = out out++ v36 = from from++ *(*uint8)(unsafe.Pointer(v35)) = *(*uint8)(unsafe.Pointer(v36)) v37 = out out++ v38 = from from++ *(*uint8)(unsafe.Pointer(v37)) = *(*uint8)(unsafe.Pointer(v38)) v39 = out out++ v40 = from from++ *(*uint8)(unsafe.Pointer(v39)) = *(*uint8)(unsafe.Pointer(v40)) len1 -= uint32(3) } if len1 != 0 { v41 = out out++ v42 = from from++ *(*uint8)(unsafe.Pointer(v41)) = *(*uint8)(unsafe.Pointer(v42)) if len1 > uint32(1) { v43 = out out++ v44 = from from++ *(*uint8)(unsafe.Pointer(v43)) = *(*uint8)(unsafe.Pointer(v44)) } } } } else { if op&uint32(64) == uint32(0) { /* 2nd level distance code */ here = dcode + uintptr((*Tcode)(unsafe.Pointer(here)).Fval)*4 + uintptr(hold&uint64(libc.Uint32FromUint32(1)<> int32(3) in -= uintptr(len1) bits -= len1 << int32(3) hold &= uint64(uint32(1)< int32(_SYNC) { return int32(1) } return 0 } func XinflateResetKeep(tls *libc.TLS, strm Tz_streamp) (r int32) { var state, v3, v4 uintptr var v1 TuLong var v2 uint64 _, _, _, _, _ = state, v1, v2, v3, v4 if _inflateStateCheck(tls, strm) != 0 { return -int32(2) } state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate v2 = libc.Uint64FromInt32(0) (*Tinflate_state)(unsafe.Pointer(state)).Ftotal = v2 v1 = v2 (*Tz_stream)(unsafe.Pointer(strm)).Ftotal_out = v1 (*Tz_stream)(unsafe.Pointer(strm)).Ftotal_in = v1 (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(m_Z_NULL) if (*Tinflate_state)(unsafe.Pointer(state)).Fwrap != 0 { /* to support ill-conceived Java test suite */ (*Tz_stream)(unsafe.Pointer(strm)).Fadler = libc.Uint64FromInt32((*Tinflate_state)(unsafe.Pointer(state)).Fwrap & int32(1)) } (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_HEAD) (*Tinflate_state)(unsafe.Pointer(state)).Flast = 0 (*Tinflate_state)(unsafe.Pointer(state)).Fhavedict = 0 (*Tinflate_state)(unsafe.Pointer(state)).Fflags = -int32(1) (*Tinflate_state)(unsafe.Pointer(state)).Fdmax = uint32(32768) (*Tinflate_state)(unsafe.Pointer(state)).Fhead = uintptr(m_Z_NULL) (*Tinflate_state)(unsafe.Pointer(state)).Fhold = uint64(0) (*Tinflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) v4 = state + 1368 (*Tinflate_state)(unsafe.Pointer(state)).Fnext = v4 v3 = v4 (*Tinflate_state)(unsafe.Pointer(state)).Fdistcode = v3 (*Tinflate_state)(unsafe.Pointer(state)).Flencode = v3 (*Tinflate_state)(unsafe.Pointer(state)).Fsane = int32(1) (*Tinflate_state)(unsafe.Pointer(state)).Fback = -int32(1) return m_Z_OK } func XinflateReset(tls *libc.TLS, strm Tz_streamp) (r int32) { var state uintptr _ = state if _inflateStateCheck(tls, strm) != 0 { return -int32(2) } state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate (*Tinflate_state)(unsafe.Pointer(state)).Fwsize = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fwhave = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) return XinflateResetKeep(tls, strm) } func XinflateReset2(tls *libc.TLS, strm Tz_streamp, windowBits int32) (r int32) { var state uintptr var wrap int32 _, _ = state, wrap /* get the state */ if _inflateStateCheck(tls, strm) != 0 { return -int32(2) } state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate /* extract wrap request from windowBits parameter */ if windowBits < 0 { if windowBits < -int32(15) { return -int32(2) } wrap = 0 windowBits = -windowBits } else { wrap = windowBits>>int32(4) + int32(5) if windowBits < int32(48) { windowBits &= int32(15) } } /* set number of window bits, free window if different */ if windowBits != 0 && (windowBits < int32(8) || windowBits > int32(15)) { return -int32(2) } if (*Tinflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(m_Z_NULL) && (*Tinflate_state)(unsafe.Pointer(state)).Fwbits != libc.Uint32FromInt32(windowBits) { (*(*func(*libc.TLS, Tvoidpf, Tvoidpf))(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzfree})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, (*Tinflate_state)(unsafe.Pointer(state)).Fwindow) (*Tinflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(m_Z_NULL) } /* update state and reset the rest of it */ (*Tinflate_state)(unsafe.Pointer(state)).Fwrap = wrap (*Tinflate_state)(unsafe.Pointer(state)).Fwbits = libc.Uint32FromInt32(windowBits) return XinflateReset(tls, strm) } func XinflateInit2_(tls *libc.TLS, strm Tz_streamp, windowBits int32, version uintptr, stream_size int32) (r int32) { var ret int32 var state uintptr _, _ = ret, state if version == uintptr(m_Z_NULL) || int32(*(*int8)(unsafe.Pointer(version))) != int32(*(*int8)(unsafe.Pointer(__ccgo_ts))) || stream_size != libc.Int32FromUint64(libc.Uint64FromInt64(112)) { return -int32(6) } if strm == uintptr(m_Z_NULL) { return -int32(2) } (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = uintptr(m_Z_NULL) /* in case we return an error */ if (*Tz_stream)(unsafe.Pointer(strm)).Fzalloc == libc.UintptrFromInt32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fzalloc = __ccgo_fp(Xzcalloc) (*Tz_stream)(unsafe.Pointer(strm)).Fopaque = libc.UintptrFromInt32(0) } if (*Tz_stream)(unsafe.Pointer(strm)).Fzfree == libc.UintptrFromInt32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fzfree = __ccgo_fp(Xzcfree) } state = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, libc.Uint32FromInt32(libc.Int32FromInt32(1)), uint32(libc.Uint64FromInt64(7160))) if state == uintptr(m_Z_NULL) { return -int32(4) } (*Tz_stream)(unsafe.Pointer(strm)).Fstate = state (*Tinflate_state)(unsafe.Pointer(state)).Fstrm = strm (*Tinflate_state)(unsafe.Pointer(state)).Fwindow = uintptr(m_Z_NULL) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_HEAD) /* to pass state test in inflateReset2() */ ret = XinflateReset2(tls, strm, windowBits) if ret != m_Z_OK { (*(*func(*libc.TLS, Tvoidpf, Tvoidpf))(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(strm)).Fzfree})))(tls, (*Tz_stream)(unsafe.Pointer(strm)).Fopaque, state) (*Tz_stream)(unsafe.Pointer(strm)).Fstate = uintptr(m_Z_NULL) } return ret } func XinflateInit_(tls *libc.TLS, strm Tz_streamp, version uintptr, stream_size int32) (r int32) { return XinflateInit2_(tls, strm, int32(m_MAX_WBITS), version, stream_size) } func XinflatePrime(tls *libc.TLS, strm Tz_streamp, bits int32, value int32) (r int32) { var state uintptr _ = state if _inflateStateCheck(tls, strm) != 0 { return -int32(2) } if bits == 0 { return m_Z_OK } state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate if bits < 0 { (*Tinflate_state)(unsafe.Pointer(state)).Fhold = uint64(0) (*Tinflate_state)(unsafe.Pointer(state)).Fbits = uint32(0) return m_Z_OK } if bits > int32(16) || (*Tinflate_state)(unsafe.Pointer(state)).Fbits+libc.Uint32FromInt32(bits) > uint32(32) { return -int32(2) } value = int32(int64(value) & (libc.Int64FromInt64(1)<wsize or less output bytes into the circular window */ if copy1 >= (*Tinflate_state)(unsafe.Pointer(state)).Fwsize { libc.X__builtin___memcpy_chk(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr((*Tinflate_state)(unsafe.Pointer(state)).Fwsize), uint64((*Tinflate_state)(unsafe.Pointer(state)).Fwsize), ^t__predefined_size_t(0)) (*Tinflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fwhave = (*Tinflate_state)(unsafe.Pointer(state)).Fwsize } else { dist = (*Tinflate_state)(unsafe.Pointer(state)).Fwsize - (*Tinflate_state)(unsafe.Pointer(state)).Fwnext if dist > copy1 { dist = copy1 } libc.X__builtin___memcpy_chk(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fwindow+uintptr((*Tinflate_state)(unsafe.Pointer(state)).Fwnext), end-uintptr(copy1), uint64(dist), ^t__predefined_size_t(0)) copy1 -= dist if copy1 != 0 { libc.X__builtin___memcpy_chk(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fwindow, end-uintptr(copy1), uint64(copy1), ^t__predefined_size_t(0)) (*Tinflate_state)(unsafe.Pointer(state)).Fwnext = copy1 (*Tinflate_state)(unsafe.Pointer(state)).Fwhave = (*Tinflate_state)(unsafe.Pointer(state)).Fwsize } else { *(*uint32)(unsafe.Pointer(state + 68)) += dist if (*Tinflate_state)(unsafe.Pointer(state)).Fwnext == (*Tinflate_state)(unsafe.Pointer(state)).Fwsize { (*Tinflate_state)(unsafe.Pointer(state)).Fwnext = uint32(0) } if (*Tinflate_state)(unsafe.Pointer(state)).Fwhave < (*Tinflate_state)(unsafe.Pointer(state)).Fwsize { *(*uint32)(unsafe.Pointer(state + 64)) += dist } } } return 0 } /* Macros for inflate(): */ /* check function to use adler32() for zlib or crc32() for gzip */ /* check macros for header crc */ /* Load registers with state in inflate() for speed */ /* Restore state from registers in inflate() */ /* Clear the input bit accumulator */ /* Get a byte of input into the bit accumulator, or return from inflate() if there is no input available. */ /* Assure that there are at least n bits in the bit accumulator. If there is not enough available input to do that, then return from inflate(). */ /* Return the low n bits of the bit accumulator (n < 16) */ /* Remove n bits from the bit accumulator */ /* Remove zero to seven bits as needed to go to a byte boundary */ /* inflate() uses a state machine to process as much input data and generate as much output data as possible before returning. The state machine is structured roughly as follows: for (;;) switch (state) { ... case STATEn: if (not enough input data or output space to make progress) return; ... make progress ... state = STATEm; break; ... } so when inflate() is called again, the same case is attempted again, and if the appropriate resources are provided, the machine proceeds to the next state. The NEEDBITS() macro is usually the way the state evaluates whether it can proceed or should return. NEEDBITS() does the return if the requested bits are not available. The typical use of the BITS macros is: NEEDBITS(n); ... do something with BITS(n) ... DROPBITS(n); where NEEDBITS(n) either returns from inflate() if there isn't enough input left to load n bits into the accumulator, or it continues. BITS(n) gives the low n bits in the accumulator. When done, DROPBITS(n) drops the low n bits off the accumulator. INITBITS() clears the accumulator and sets the number of available bits to zero. BYTEBITS() discards just enough bits to put the accumulator on a byte boundary. After BYTEBITS() and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return if there is no input available. The decoding of variable length codes uses PULLBYTE() directly in order to pull just enough bytes to decode the next code, and no more. Some states loop until they get enough input, making sure that enough state information is maintained to continue the loop where it left off if NEEDBITS() returns in the loop. For example, want, need, and keep would all have to actually be part of the saved state in case NEEDBITS() returns: case STATEw: while (want < need) { NEEDBITS(n); keep[want++] = BITS(n); DROPBITS(n); } state = STATEx; case STATEx: As shown above, if the next state is also the next case, then the break is omitted. A state may also return if there is not enough output space available to complete that state. Those states are copying stored data, writing a literal byte, and copying a matching string. When returning, a "goto inf_leave" is used to update the total counters, update the check value, and determine whether any progress has been made during that inflate() call in order to return the proper return code. Progress is defined as a change in either strm->avail_in or strm->avail_out. When there is a window, goto inf_leave will update the window with the last output written. If a goto inf_leave occurs in the middle of decompression and there is no window currently, goto inf_leave will create one and copy output to the window for the next call of inflate(). In this implementation, the flush parameter of inflate() only affects the return code (per zlib.h). inflate() always writes as much as possible to strm->next_out, given the space available and the provided input--the effect documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers the allocation of and copying into a sliding window until necessary, which provides the effect documented in zlib.h for Z_FINISH when the entire input stream available. So the only thing the flush parameter actually does is: when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it will return Z_BUF_ERROR if it has not reached the end of the stream. */ func Xinflate(tls *libc.TLS, strm Tz_streamp, flush int32) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) var bits, copy1, have, in, left, len1, out, v46, v48, v49, v50, v52, v53, v64, v66, v70, v75, v76, v90 uint32 var from, next, put, state, v100, v36, v42, v43, v44, v45, v51, v54, v55, v57, v60, v61, v62, v63, v65, v67, v69, v71, v72, v73, v74, v77, v79, v81, v82, v85, v87, v88, v92, v93, v94, v95, p83, p89 uintptr var here, last Tcode var hold, v101, v102, v37, v56, v58, v59, v96, v97, v98 uint64 var ret, v103, v104, v105, v38 int32 var v47, v99 bool var _ /* hbuf at bp+0 */ [4]uint8 _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, copy1, from, have, here, hold, in, last, left, len1, next, out, put, ret, state, v100, v101, v102, v103, v104, v105, v36, v37, v38, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63, v64, v65, v66, v67, v69, v70, v71, v72, v73, v74, v75, v76, v77, v79, v81, v82, v85, v87, v88, v90, v92, v93, v94, v95, v96, v97, v98, v99, p83, p89 /* buffer for gzip header crc calculation */ if _inflateStateCheck(tls, strm) != 0 || (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out == uintptr(m_Z_NULL) || (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in == uintptr(m_Z_NULL) && (*Tz_stream)(unsafe.Pointer(strm)).Favail_in != uint32(0) { return -int32(2) } state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate if (*Tinflate_state)(unsafe.Pointer(state)).Fmode == int32(_TYPE) { (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TYPEDO) } /* skip check */ put = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out left = (*Tz_stream)(unsafe.Pointer(strm)).Favail_out next = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in have = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in hold = (*Tinflate_state)(unsafe.Pointer(state)).Fhold bits = (*Tinflate_state)(unsafe.Pointer(state)).Fbits in = have out = left ret = m_Z_OK for { switch (*Tinflate_state)(unsafe.Pointer(state)).Fmode { case int32(_HEAD): goto _2 case int32(_FLAGS): goto _3 case int32(_TIME): goto _4 case int32(_OS): goto _5 case int32(_EXLEN): goto _6 case int32(_EXTRA): goto _7 case int32(_NAME): goto _8 case int32(_COMMENT): goto _9 case int32(_HCRC): goto _10 case int32(_DICTID): goto _11 case int32(_DICT): goto _12 case int32(_TYPE): goto _13 case int32(_TYPEDO): goto _14 case int32(_STORED): goto _15 case int32(_COPY_): goto _16 case int32(_COPY): goto _17 case int32(_TABLE): goto _18 case int32(_LENLENS): goto _19 case int32(_CODELENS): goto _20 case int32(_LEN_): goto _21 case int32(_LEN): goto _22 case int32(_LENEXT): goto _23 case int32(_DIST): goto _24 case int32(_DISTEXT): goto _25 case int32(_MATCH): goto _26 case int32(_LIT): goto _27 case int32(_CHECK): goto _28 case int32(_LENGTH): goto _29 case int32(_DONE): goto _30 case int32(_BAD): goto _31 case int32(_MEM): goto _32 default: goto _33 case int32(_SYNC): goto _34 } goto _35 _2: ; if (*Tinflate_state)(unsafe.Pointer(state)).Fwrap == 0 { (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TYPEDO) goto _35 } for bits < libc.Uint32FromInt32(libc.Int32FromInt32(16)) { if have == uint32(0) { goto inf_leave } have-- v36 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v36))) << bits bits += uint32(8) } if (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(2) != 0 && hold == uint64(0x8b1f) { /* gzip header */ if (*Tinflate_state)(unsafe.Pointer(state)).Fwbits == uint32(0) { (*Tinflate_state)(unsafe.Pointer(state)).Fwbits = uint32(15) } (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, uint64(0), uintptr(m_Z_NULL), uint32(0)) (*(*[4]uint8)(unsafe.Pointer(bp)))[0] = uint8(hold) (*(*[4]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(hold >> libc.Int32FromInt32(8)) (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) hold = uint64(0) bits = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_FLAGS) goto _35 } if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) { (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = -int32(1) } if !((*Tinflate_state)(unsafe.Pointer(state)).Fwrap&libc.Int32FromInt32(1) != 0) || (uint64(uint32(hold)&(libc.Uint32FromUint32(1)<>int32(8))%uint64(31) != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 308 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } if uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(4)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(4)) len1 = uint32(hold)&(libc.Uint32FromUint32(1)< uint32(15) || len1 > (*Tinflate_state)(unsafe.Pointer(state)).Fwbits { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 358 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } (*Tinflate_state)(unsafe.Pointer(state)).Fdmax = uint32(1) << len1 (*Tinflate_state)(unsafe.Pointer(state)).Fflags = 0 /* indicate zlib header */ v37 = Xadler32(tls, uint64(0), uintptr(m_Z_NULL), uint32(0)) (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = v37 (*Tz_stream)(unsafe.Pointer(strm)).Fadler = v37 if hold&uint64(0x200) != 0 { v38 = int32(_DICTID) } else { v38 = int32(_TYPE) } (*Tinflate_state)(unsafe.Pointer(state)).Fmode = v38 hold = uint64(0) bits = uint32(0) goto _35 _3: ; _41: ; for bits < libc.Uint32FromInt32(libc.Int32FromInt32(16)) { if have == uint32(0) { goto inf_leave } have-- v42 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v42))) << bits bits += uint32(8) } goto _40 _40: ; if 0 != 0 { goto _41 } goto _39 _39: ; (*Tinflate_state)(unsafe.Pointer(state)).Fflags = libc.Int32FromUint64(hold) if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0xff) != int32(m_Z_DEFLATED) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 331 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0xe000) != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 378 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) { (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Ftext = libc.Int32FromUint64(hold >> libc.Int32FromInt32(8) & libc.Uint64FromInt32(1)) } if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0200) != 0 && (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(4) != 0 { (*(*[4]uint8)(unsafe.Pointer(bp)))[0] = uint8(hold) (*(*[4]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(hold >> libc.Int32FromInt32(8)) (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) } hold = uint64(0) bits = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TIME) /* fallthrough */ _4: ; for bits < libc.Uint32FromInt32(libc.Int32FromInt32(32)) { if have == uint32(0) { goto inf_leave } have-- v43 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v43))) << bits bits += uint32(8) } if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) { (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Ftime = hold } if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0200) != 0 && (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(4) != 0 { (*(*[4]uint8)(unsafe.Pointer(bp)))[0] = uint8(hold) (*(*[4]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(hold >> libc.Int32FromInt32(8)) (*(*[4]uint8)(unsafe.Pointer(bp)))[int32(2)] = uint8(hold >> libc.Int32FromInt32(16)) (*(*[4]uint8)(unsafe.Pointer(bp)))[int32(3)] = uint8(hold >> libc.Int32FromInt32(24)) (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(4)) } hold = uint64(0) bits = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_OS) /* fallthrough */ _5: ; for bits < libc.Uint32FromInt32(libc.Int32FromInt32(16)) { if have == uint32(0) { goto inf_leave } have-- v44 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v44))) << bits bits += uint32(8) } if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) { (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fxflags = libc.Int32FromUint64(hold & libc.Uint64FromInt32(0xff)) (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fos = libc.Int32FromUint64(hold >> libc.Int32FromInt32(8)) } if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0200) != 0 && (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(4) != 0 { (*(*[4]uint8)(unsafe.Pointer(bp)))[0] = uint8(hold) (*(*[4]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(hold >> libc.Int32FromInt32(8)) (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) } hold = uint64(0) bits = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_EXLEN) /* fallthrough */ _6: ; if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0400) != 0 { for bits < libc.Uint32FromInt32(libc.Int32FromInt32(16)) { if have == uint32(0) { goto inf_leave } have-- v45 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v45))) << bits bits += uint32(8) } (*Tinflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) { (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len = uint32(hold) } if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0200) != 0 && (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(4) != 0 { (*(*[4]uint8)(unsafe.Pointer(bp)))[0] = uint8(hold) (*(*[4]uint8)(unsafe.Pointer(bp)))[int32(1)] = uint8(hold >> libc.Int32FromInt32(8)) (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fcheck, bp, uint32(2)) } hold = uint64(0) bits = uint32(0) } else { if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) { (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fextra = uintptr(m_Z_NULL) } } (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_EXTRA) /* fallthrough */ _7: ; if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0400) != 0 { copy1 = (*Tinflate_state)(unsafe.Pointer(state)).Flength if copy1 > have { copy1 = have } if copy1 != 0 { if v47 = (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) && (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fextra != uintptr(m_Z_NULL); v47 { v46 = (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_len - (*Tinflate_state)(unsafe.Pointer(state)).Flength len1 = v46 } if v47 && v46 < (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max { if len1+copy1 > (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max { v48 = (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fextra_max - len1 } else { v48 = copy1 } libc.X__builtin___memcpy_chk(tls, (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fextra+uintptr(len1), next, uint64(v48), ^t__predefined_size_t(0)) } if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0200) != 0 && (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(4) != 0 { (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fcheck, next, copy1) } have -= copy1 next += uintptr(copy1) *(*uint32)(unsafe.Pointer(state + 92)) -= copy1 } if (*Tinflate_state)(unsafe.Pointer(state)).Flength != 0 { goto inf_leave } } (*Tinflate_state)(unsafe.Pointer(state)).Flength = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_NAME) /* fallthrough */ _8: ; if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0800) != 0 { if have == uint32(0) { goto inf_leave } copy1 = uint32(0) for cond := true; cond; cond = len1 != 0 && copy1 < have { v49 = copy1 copy1++ len1 = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(v49)))) if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) && (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fname != uintptr(m_Z_NULL) && (*Tinflate_state)(unsafe.Pointer(state)).Flength < (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fname_max { v51 = state + 92 v50 = *(*uint32)(unsafe.Pointer(v51)) *(*uint32)(unsafe.Pointer(v51))++ *(*TBytef)(unsafe.Pointer((*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fname + uintptr(v50))) = uint8(len1) } } if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0200) != 0 && (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(4) != 0 { (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fcheck, next, copy1) } have -= copy1 next += uintptr(copy1) if len1 != 0 { goto inf_leave } } else { if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) { (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fname = uintptr(m_Z_NULL) } } (*Tinflate_state)(unsafe.Pointer(state)).Flength = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_COMMENT) /* fallthrough */ _9: ; if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x1000) != 0 { if have == uint32(0) { goto inf_leave } copy1 = uint32(0) for cond := true; cond; cond = len1 != 0 && copy1 < have { v52 = copy1 copy1++ len1 = uint32(*(*uint8)(unsafe.Pointer(next + uintptr(v52)))) if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) && (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment != uintptr(m_Z_NULL) && (*Tinflate_state)(unsafe.Pointer(state)).Flength < (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fcomm_max { v54 = state + 92 v53 = *(*uint32)(unsafe.Pointer(v54)) *(*uint32)(unsafe.Pointer(v54))++ *(*TBytef)(unsafe.Pointer((*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment + uintptr(v53))) = uint8(len1) } } if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0200) != 0 && (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(4) != 0 { (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = Xcrc32(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fcheck, next, copy1) } have -= copy1 next += uintptr(copy1) if len1 != 0 { goto inf_leave } } else { if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) { (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fcomment = uintptr(m_Z_NULL) } } (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_HCRC) /* fallthrough */ _10: ; if (*Tinflate_state)(unsafe.Pointer(state)).Fflags&int32(0x0200) != 0 { for bits < libc.Uint32FromInt32(libc.Int32FromInt32(16)) { if have == uint32(0) { goto inf_leave } have-- v55 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v55))) << bits bits += uint32(8) } if (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(4) != 0 && hold != (*Tinflate_state)(unsafe.Pointer(state)).Fcheck&uint64(0xffff) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 403 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } hold = uint64(0) bits = uint32(0) } if (*Tinflate_state)(unsafe.Pointer(state)).Fhead != uintptr(m_Z_NULL) { (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fhcrc = (*Tinflate_state)(unsafe.Pointer(state)).Fflags >> libc.Int32FromInt32(9) & libc.Int32FromInt32(1) (*Tgz_header)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fhead)).Fdone = int32(1) } v56 = Xcrc32(tls, uint64(0), uintptr(m_Z_NULL), uint32(0)) (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = v56 (*Tz_stream)(unsafe.Pointer(strm)).Fadler = v56 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TYPE) goto _35 _11: ; for bits < libc.Uint32FromInt32(libc.Int32FromInt32(32)) { if have == uint32(0) { goto inf_leave } have-- v57 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v57))) << bits bits += uint32(8) } v58 = hold>>libc.Int32FromInt32(24)&libc.Uint64FromInt32(0xff) + hold>>libc.Int32FromInt32(8)&libc.Uint64FromInt32(0xff00) + hold&libc.Uint64FromInt32(0xff00)<>= uint64(bits & uint32(7)) bits -= bits & uint32(7) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_CHECK) goto _35 } for bits < libc.Uint32FromInt32(libc.Int32FromInt32(3)) { if have == uint32(0) { goto inf_leave } have-- v60 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v60))) << bits bits += uint32(8) } (*Tinflate_state)(unsafe.Pointer(state)).Flast = libc.Int32FromUint32(uint32(hold) & (libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(1)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(1)) switch uint32(hold) & (libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(2)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(2)) goto inf_leave } case uint32(2): /* dynamic block */ (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TABLE) case uint32(3): (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 6 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) } hold >>= libc.Uint64FromInt32(libc.Int32FromInt32(2)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(2)) goto _35 _15: ; hold >>= uint64(bits & uint32(7)) bits -= bits & uint32(7) /* go to byte boundary */ for bits < libc.Uint32FromInt32(libc.Int32FromInt32(32)) { if have == uint32(0) { goto inf_leave } have-- v61 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v61))) << bits bits += uint32(8) } if hold&uint64(0xffff) != hold>>int32(16)^uint64(0xffff) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 25 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } (*Tinflate_state)(unsafe.Pointer(state)).Flength = uint32(hold) & uint32(0xffff) hold = uint64(0) bits = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_COPY_) if flush == int32(m_Z_TREES) { goto inf_leave } /* fallthrough */ _16: ; (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_COPY) /* fallthrough */ _17: ; copy1 = (*Tinflate_state)(unsafe.Pointer(state)).Flength if copy1 != 0 { if copy1 > have { copy1 = have } if copy1 > left { copy1 = left } if copy1 == uint32(0) { goto inf_leave } libc.X__builtin___memcpy_chk(tls, put, next, uint64(copy1), ^t__predefined_size_t(0)) have -= copy1 next += uintptr(copy1) left -= copy1 put += uintptr(copy1) *(*uint32)(unsafe.Pointer(state + 92)) -= copy1 goto _35 } (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TYPE) goto _35 _18: ; for bits < libc.Uint32FromInt32(libc.Int32FromInt32(14)) { if have == uint32(0) { goto inf_leave } have-- v62 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v62))) << bits bits += uint32(8) } (*Tinflate_state)(unsafe.Pointer(state)).Fnlen = uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(5)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(5)) (*Tinflate_state)(unsafe.Pointer(state)).Fndist = uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(5)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(5)) (*Tinflate_state)(unsafe.Pointer(state)).Fncode = uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(4)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(4)) if (*Tinflate_state)(unsafe.Pointer(state)).Fnlen > uint32(286) || (*Tinflate_state)(unsafe.Pointer(state)).Fndist > uint32(30) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 54 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } (*Tinflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_LENLENS) /* fallthrough */ _19: ; for (*Tinflate_state)(unsafe.Pointer(state)).Fhave < (*Tinflate_state)(unsafe.Pointer(state)).Fncode { for bits < libc.Uint32FromInt32(libc.Int32FromInt32(3)) { if have == uint32(0) { goto inf_leave } have-- v63 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v63))) << bits bits += uint32(8) } v65 = state + 140 v64 = *(*uint32)(unsafe.Pointer(v65)) *(*uint32)(unsafe.Pointer(v65))++ *(*uint16)(unsafe.Pointer(state + 152 + uintptr(_order1[v64])*2)) = uint16(uint32(hold) & (libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(3)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(3)) } for (*Tinflate_state)(unsafe.Pointer(state)).Fhave < uint32(19) { v67 = state + 140 v66 = *(*uint32)(unsafe.Pointer(v67)) *(*uint32)(unsafe.Pointer(v67))++ *(*uint16)(unsafe.Pointer(state + 152 + uintptr(_order1[v66])*2)) = uint16(0) } (*Tinflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 (*Tinflate_state)(unsafe.Pointer(state)).Flencode = (*Tinflate_state)(unsafe.Pointer(state)).Fnext (*Tinflate_state)(unsafe.Pointer(state)).Flenbits = uint32(7) ret = Xinflate_table(tls, int32(_CODES), state+152, uint32(19), state+144, state+120, state+792) if ret != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 90 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } (*Tinflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_CODELENS) /* fallthrough */ _20: ; for (*Tinflate_state)(unsafe.Pointer(state)).Fhave < (*Tinflate_state)(unsafe.Pointer(state)).Fnlen+(*Tinflate_state)(unsafe.Pointer(state)).Fndist { for { here = *(*Tcode)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(libc.Uint32FromUint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Flenbits-libc.Uint32FromInt32(1)))*4)) if uint32(here.Fbits) <= bits { break } if have == uint32(0) { goto inf_leave } have-- v69 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v69))) << bits bits += uint32(8) goto _68 _68: } if libc.Int32FromUint16(here.Fval) < int32(16) { hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) v71 = state + 140 v70 = *(*uint32)(unsafe.Pointer(v71)) *(*uint32)(unsafe.Pointer(v71))++ *(*uint16)(unsafe.Pointer(state + 152 + uintptr(v70)*2)) = here.Fval } else { if libc.Int32FromUint16(here.Fval) == int32(16) { for bits < libc.Uint32FromInt32(libc.Int32FromUint8(here.Fbits)+libc.Int32FromInt32(2)) { if have == uint32(0) { goto inf_leave } have-- v72 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v72))) << bits bits += uint32(8) } hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) if (*Tinflate_state)(unsafe.Pointer(state)).Fhave == uint32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 115 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) break } len1 = uint32(*(*uint16)(unsafe.Pointer(state + 152 + uintptr((*Tinflate_state)(unsafe.Pointer(state)).Fhave-uint32(1))*2))) copy1 = uint32(3) + uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(2)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(2)) } else { if libc.Int32FromUint16(here.Fval) == int32(17) { for bits < libc.Uint32FromInt32(libc.Int32FromUint8(here.Fbits)+libc.Int32FromInt32(3)) { if have == uint32(0) { goto inf_leave } have-- v73 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v73))) << bits bits += uint32(8) } hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) len1 = uint32(0) copy1 = uint32(3) + uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(3)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(3)) } else { for bits < libc.Uint32FromInt32(libc.Int32FromUint8(here.Fbits)+libc.Int32FromInt32(7)) { if have == uint32(0) { goto inf_leave } have-- v74 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v74))) << bits bits += uint32(8) } hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) len1 = uint32(0) copy1 = uint32(11) + uint32(hold)&(libc.Uint32FromUint32(1)<>= libc.Uint64FromInt32(libc.Int32FromInt32(7)) bits -= libc.Uint32FromInt32(libc.Int32FromInt32(7)) } } if (*Tinflate_state)(unsafe.Pointer(state)).Fhave+copy1 > (*Tinflate_state)(unsafe.Pointer(state)).Fnlen+(*Tinflate_state)(unsafe.Pointer(state)).Fndist { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 115 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) break } for { v75 = copy1 copy1-- if !(v75 != 0) { break } v77 = state + 140 v76 = *(*uint32)(unsafe.Pointer(v77)) *(*uint32)(unsafe.Pointer(v77))++ *(*uint16)(unsafe.Pointer(state + 152 + uintptr(v76)*2)) = uint16(len1) } } } /* handle error breaks in while */ if (*Tinflate_state)(unsafe.Pointer(state)).Fmode == int32(_BAD) { goto _35 } /* check for end-of-block code (better have one) */ if libc.Int32FromUint16(*(*uint16)(unsafe.Pointer(state + 152 + 256*2))) == 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 141 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } /* build code tables -- note: do not change the lenbits or distbits values here (9 and 6) without reading the comments in inftrees.h concerning the ENOUGH constants, which depend on those values */ (*Tinflate_state)(unsafe.Pointer(state)).Fnext = state + 1368 (*Tinflate_state)(unsafe.Pointer(state)).Flencode = (*Tinflate_state)(unsafe.Pointer(state)).Fnext (*Tinflate_state)(unsafe.Pointer(state)).Flenbits = uint32(9) ret = Xinflate_table(tls, int32(_LENS), state+152, (*Tinflate_state)(unsafe.Pointer(state)).Fnlen, state+144, state+120, state+792) if ret != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 178 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } (*Tinflate_state)(unsafe.Pointer(state)).Fdistcode = (*Tinflate_state)(unsafe.Pointer(state)).Fnext (*Tinflate_state)(unsafe.Pointer(state)).Fdistbits = uint32(6) ret = Xinflate_table(tls, int32(_DISTS), state+152+uintptr((*Tinflate_state)(unsafe.Pointer(state)).Fnlen)*2, (*Tinflate_state)(unsafe.Pointer(state)).Fndist, state+144, state+124, state+792) if ret != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 206 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_LEN_) if flush == int32(m_Z_TREES) { goto inf_leave } /* fallthrough */ _21: ; (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_LEN) /* fallthrough */ _22: ; if have >= uint32(6) && left >= uint32(258) { (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out = put (*Tz_stream)(unsafe.Pointer(strm)).Favail_out = left (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in = next (*Tz_stream)(unsafe.Pointer(strm)).Favail_in = have (*Tinflate_state)(unsafe.Pointer(state)).Fhold = hold (*Tinflate_state)(unsafe.Pointer(state)).Fbits = bits Xinflate_fast(tls, strm, out) put = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out left = (*Tz_stream)(unsafe.Pointer(strm)).Favail_out next = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in have = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in hold = (*Tinflate_state)(unsafe.Pointer(state)).Fhold bits = (*Tinflate_state)(unsafe.Pointer(state)).Fbits if (*Tinflate_state)(unsafe.Pointer(state)).Fmode == int32(_TYPE) { (*Tinflate_state)(unsafe.Pointer(state)).Fback = -int32(1) } goto _35 } (*Tinflate_state)(unsafe.Pointer(state)).Fback = 0 for { here = *(*Tcode)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(hold)&(libc.Uint32FromUint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Flenbits-libc.Uint32FromInt32(1)))*4)) if uint32(here.Fbits) <= bits { break } if have == uint32(0) { goto inf_leave } have-- v79 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v79))) << bits bits += uint32(8) goto _78 _78: } if here.Fop != 0 && libc.Int32FromUint8(here.Fop)&int32(0xf0) == 0 { last = here for { here = *(*Tcode)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Flencode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(libc.Int32FromUint8(last.Fbits)+libc.Int32FromUint8(last.Fop))-uint32(1))>>last.Fbits)*4)) if libc.Uint32FromInt32(libc.Int32FromUint8(last.Fbits)+libc.Int32FromUint8(here.Fbits)) <= bits { break } if have == uint32(0) { goto inf_leave } have-- v81 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v81))) << bits bits += uint32(8) goto _80 _80: } hold >>= uint64(last.Fbits) bits -= uint32(last.Fbits) *(*int32)(unsafe.Pointer(state + 7148)) += libc.Int32FromUint8(last.Fbits) } hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) *(*int32)(unsafe.Pointer(state + 7148)) += libc.Int32FromUint8(here.Fbits) (*Tinflate_state)(unsafe.Pointer(state)).Flength = uint32(here.Fval) if libc.Int32FromUint8(here.Fop) == 0 { (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_LIT) goto _35 } if libc.Int32FromUint8(here.Fop)&int32(32) != 0 { (*Tinflate_state)(unsafe.Pointer(state)).Fback = -int32(1) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TYPE) goto _35 } if libc.Int32FromUint8(here.Fop)&int32(64) != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 228 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } (*Tinflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_LENEXT) /* fallthrough */ _23: ; if (*Tinflate_state)(unsafe.Pointer(state)).Fextra != 0 { for bits < (*Tinflate_state)(unsafe.Pointer(state)).Fextra { if have == uint32(0) { goto inf_leave } have-- v82 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v82))) << bits bits += uint32(8) } *(*uint32)(unsafe.Pointer(state + 92)) += uint32(hold) & (uint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) hold >>= uint64((*Tinflate_state)(unsafe.Pointer(state)).Fextra) bits -= (*Tinflate_state)(unsafe.Pointer(state)).Fextra p83 = state + 7148 *(*int32)(unsafe.Pointer(p83)) = int32(uint32(*(*int32)(unsafe.Pointer(p83))) + (*Tinflate_state)(unsafe.Pointer(state)).Fextra) } (*Tinflate_state)(unsafe.Pointer(state)).Fwas = (*Tinflate_state)(unsafe.Pointer(state)).Flength (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_DIST) /* fallthrough */ _24: ; for { here = *(*Tcode)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(hold)&(libc.Uint32FromUint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Fdistbits-libc.Uint32FromInt32(1)))*4)) if uint32(here.Fbits) <= bits { break } if have == uint32(0) { goto inf_leave } have-- v85 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v85))) << bits bits += uint32(8) goto _84 _84: } if libc.Int32FromUint8(here.Fop)&int32(0xf0) == 0 { last = here for { here = *(*Tcode)(unsafe.Pointer((*Tinflate_state)(unsafe.Pointer(state)).Fdistcode + uintptr(uint32(last.Fval)+uint32(hold)&(uint32(1)<<(libc.Int32FromUint8(last.Fbits)+libc.Int32FromUint8(last.Fop))-uint32(1))>>last.Fbits)*4)) if libc.Uint32FromInt32(libc.Int32FromUint8(last.Fbits)+libc.Int32FromUint8(here.Fbits)) <= bits { break } if have == uint32(0) { goto inf_leave } have-- v87 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v87))) << bits bits += uint32(8) goto _86 _86: } hold >>= uint64(last.Fbits) bits -= uint32(last.Fbits) *(*int32)(unsafe.Pointer(state + 7148)) += libc.Int32FromUint8(last.Fbits) } hold >>= uint64(here.Fbits) bits -= uint32(here.Fbits) *(*int32)(unsafe.Pointer(state + 7148)) += libc.Int32FromUint8(here.Fbits) if libc.Int32FromUint8(here.Fop)&int32(64) != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 256 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } (*Tinflate_state)(unsafe.Pointer(state)).Foffset = uint32(here.Fval) (*Tinflate_state)(unsafe.Pointer(state)).Fextra = uint32(here.Fop) & uint32(15) (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_DISTEXT) /* fallthrough */ _25: ; if (*Tinflate_state)(unsafe.Pointer(state)).Fextra != 0 { for bits < (*Tinflate_state)(unsafe.Pointer(state)).Fextra { if have == uint32(0) { goto inf_leave } have-- v88 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v88))) << bits bits += uint32(8) } *(*uint32)(unsafe.Pointer(state + 96)) += uint32(hold) & (uint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Fextra - uint32(1)) hold >>= uint64((*Tinflate_state)(unsafe.Pointer(state)).Fextra) bits -= (*Tinflate_state)(unsafe.Pointer(state)).Fextra p89 = state + 7148 *(*int32)(unsafe.Pointer(p89)) = int32(uint32(*(*int32)(unsafe.Pointer(p89))) + (*Tinflate_state)(unsafe.Pointer(state)).Fextra) } (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_MATCH) /* fallthrough */ _26: ; if left == uint32(0) { goto inf_leave } copy1 = out - left if (*Tinflate_state)(unsafe.Pointer(state)).Foffset > copy1 { /* copy from window */ copy1 = (*Tinflate_state)(unsafe.Pointer(state)).Foffset - copy1 if copy1 > (*Tinflate_state)(unsafe.Pointer(state)).Fwhave { if (*Tinflate_state)(unsafe.Pointer(state)).Fsane != 0 { (*Tz_stream)(unsafe.Pointer(strm)).Fmsg = __ccgo_ts + 278 (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_BAD) goto _35 } } if copy1 > (*Tinflate_state)(unsafe.Pointer(state)).Fwnext { copy1 -= (*Tinflate_state)(unsafe.Pointer(state)).Fwnext from = (*Tinflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Tinflate_state)(unsafe.Pointer(state)).Fwsize-copy1) } else { from = (*Tinflate_state)(unsafe.Pointer(state)).Fwindow + uintptr((*Tinflate_state)(unsafe.Pointer(state)).Fwnext-copy1) } if copy1 > (*Tinflate_state)(unsafe.Pointer(state)).Flength { copy1 = (*Tinflate_state)(unsafe.Pointer(state)).Flength } } else { /* copy from output */ from = put - uintptr((*Tinflate_state)(unsafe.Pointer(state)).Foffset) copy1 = (*Tinflate_state)(unsafe.Pointer(state)).Flength } if copy1 > left { copy1 = left } left -= copy1 *(*uint32)(unsafe.Pointer(state + 92)) -= copy1 for { v92 = put put++ v93 = from from++ *(*uint8)(unsafe.Pointer(v92)) = *(*uint8)(unsafe.Pointer(v93)) goto _91 _91: ; copy1-- v90 = copy1 if !(v90 != 0) { break } } if (*Tinflate_state)(unsafe.Pointer(state)).Flength == uint32(0) { (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_LEN) } goto _35 _27: ; if left == uint32(0) { goto inf_leave } v94 = put put++ *(*uint8)(unsafe.Pointer(v94)) = uint8((*Tinflate_state)(unsafe.Pointer(state)).Flength) left-- (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_LEN) goto _35 _28: ; if (*Tinflate_state)(unsafe.Pointer(state)).Fwrap != 0 { for bits < libc.Uint32FromInt32(libc.Int32FromInt32(32)) { if have == uint32(0) { goto inf_leave } have-- v95 = next next++ hold += uint64(*(*uint8)(unsafe.Pointer(v95))) << bits bits += uint32(8) } out -= left *(*TuLong)(unsafe.Pointer(strm + 40)) += uint64(out) *(*uint64)(unsafe.Pointer(state + 40)) += uint64(out) if (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(4) != 0 && out != 0 { if (*Tinflate_state)(unsafe.Pointer(state)).Fflags != 0 { v97 = Xcrc32(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out) } else { v97 = Xadler32(tls, (*Tinflate_state)(unsafe.Pointer(state)).Fcheck, put-uintptr(out), out) } v96 = v97 (*Tinflate_state)(unsafe.Pointer(state)).Fcheck = v96 (*Tz_stream)(unsafe.Pointer(strm)).Fadler = v96 } out = left if v99 = (*Tinflate_state)(unsafe.Pointer(state)).Fwrap&int32(4) != 0; v99 { if (*Tinflate_state)(unsafe.Pointer(state)).Fflags != 0 { v98 = hold } else { v98 = hold>>int32(24)&uint64(0xff) + hold>>int32(8)&uint64(0xff00) + hold&uint64(0xff00)<>= uint64((*Tinflate_state)(unsafe.Pointer(state)).Fbits & uint32(7)) *(*uint32)(unsafe.Pointer(state + 88)) -= (*Tinflate_state)(unsafe.Pointer(state)).Fbits & uint32(7) len1 = uint32(0) for (*Tinflate_state)(unsafe.Pointer(state)).Fbits >= uint32(8) { v1 = len1 len1++ (*(*[4]uint8)(unsafe.Pointer(bp)))[v1] = uint8((*Tinflate_state)(unsafe.Pointer(state)).Fhold) *(*uint64)(unsafe.Pointer(state + 80)) >>= uint64(8) *(*uint32)(unsafe.Pointer(state + 88)) -= uint32(8) } (*Tinflate_state)(unsafe.Pointer(state)).Fhave = uint32(0) _syncsearch(tls, state+140, bp, len1) } /* search available input */ len1 = _syncsearch(tls, state+140, (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in, (*Tz_stream)(unsafe.Pointer(strm)).Favail_in) *(*TuInt)(unsafe.Pointer(strm + 8)) -= len1 *(*uintptr)(unsafe.Pointer(strm)) += uintptr(len1) *(*TuLong)(unsafe.Pointer(strm + 16)) += uint64(len1) /* return no joy or set up to restart inflate() on a new block */ if (*Tinflate_state)(unsafe.Pointer(state)).Fhave != uint32(4) { return -int32(3) } if (*Tinflate_state)(unsafe.Pointer(state)).Fflags == -int32(1) { (*Tinflate_state)(unsafe.Pointer(state)).Fwrap = 0 } else { *(*int32)(unsafe.Pointer(state + 16)) &= ^libc.Int32FromInt32(4) } /* no point in computing a check value now */ flags = (*Tinflate_state)(unsafe.Pointer(state)).Fflags in = (*Tz_stream)(unsafe.Pointer(strm)).Ftotal_in out = (*Tz_stream)(unsafe.Pointer(strm)).Ftotal_out XinflateReset(tls, strm) (*Tz_stream)(unsafe.Pointer(strm)).Ftotal_in = in (*Tz_stream)(unsafe.Pointer(strm)).Ftotal_out = out (*Tinflate_state)(unsafe.Pointer(state)).Fflags = flags (*Tinflate_state)(unsafe.Pointer(state)).Fmode = int32(_TYPE) return m_Z_OK } // C documentation // // /* // Returns true if inflate is currently at the end of a block generated by // Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP // implementation to provide an additional safety check. PPP uses // Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored // block. When decompressing, PPP checks that at the end of input packet, // inflate is waiting for these length bytes. // */ func XinflateSyncPoint(tls *libc.TLS, strm Tz_streamp) (r int32) { var state uintptr _ = state if _inflateStateCheck(tls, strm) != 0 { return -int32(2) } state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate return libc.BoolInt32((*Tinflate_state)(unsafe.Pointer(state)).Fmode == int32(_STORED) && (*Tinflate_state)(unsafe.Pointer(state)).Fbits == uint32(0)) } func XinflateCopy(tls *libc.TLS, dest Tz_streamp, source Tz_streamp) (r int32) { var copy1, state, window uintptr var wsize uint32 _, _, _, _ = copy1, state, window, wsize /* check input */ if _inflateStateCheck(tls, source) != 0 || dest == uintptr(m_Z_NULL) { return -int32(2) } state = (*Tz_stream)(unsafe.Pointer(source)).Fstate /* allocate space */ copy1 = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(source)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(source)).Fopaque, libc.Uint32FromInt32(libc.Int32FromInt32(1)), uint32(libc.Uint64FromInt64(7160))) if copy1 == uintptr(m_Z_NULL) { return -int32(4) } window = uintptr(m_Z_NULL) if (*Tinflate_state)(unsafe.Pointer(state)).Fwindow != uintptr(m_Z_NULL) { window = (*(*func(*libc.TLS, Tvoidpf, TuInt, TuInt) Tvoidpf)(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(source)).Fzalloc})))(tls, (*Tz_stream)(unsafe.Pointer(source)).Fopaque, libc.Uint32FromUint32(1)<<(*Tinflate_state)(unsafe.Pointer(state)).Fwbits, uint32(libc.Uint64FromInt64(1))) if window == uintptr(m_Z_NULL) { (*(*func(*libc.TLS, Tvoidpf, Tvoidpf))(unsafe.Pointer(&struct{ uintptr }{(*Tz_stream)(unsafe.Pointer(source)).Fzfree})))(tls, (*Tz_stream)(unsafe.Pointer(source)).Fopaque, copy1) return -int32(4) } } /* copy state */ libc.X__builtin___memcpy_chk(tls, dest, source, uint64(112), ^t__predefined_size_t(0)) libc.X__builtin___memcpy_chk(tls, copy1, state, uint64(7160), ^t__predefined_size_t(0)) (*Tinflate_state)(unsafe.Pointer(copy1)).Fstrm = dest if (*Tinflate_state)(unsafe.Pointer(state)).Flencode >= state+1368 && (*Tinflate_state)(unsafe.Pointer(state)).Flencode <= state+1368+uintptr(libc.Int32FromInt32(m_ENOUGH_LENS)+libc.Int32FromInt32(m_ENOUGH_DISTS))*4-uintptr(1)*4 { (*Tinflate_state)(unsafe.Pointer(copy1)).Flencode = copy1 + 1368 + uintptr((int64((*Tinflate_state)(unsafe.Pointer(state)).Flencode)-t__predefined_ptrdiff_t(state+1368))/4)*4 (*Tinflate_state)(unsafe.Pointer(copy1)).Fdistcode = copy1 + 1368 + uintptr((int64((*Tinflate_state)(unsafe.Pointer(state)).Fdistcode)-t__predefined_ptrdiff_t(state+1368))/4)*4 } (*Tinflate_state)(unsafe.Pointer(copy1)).Fnext = copy1 + 1368 + uintptr((int64((*Tinflate_state)(unsafe.Pointer(state)).Fnext)-t__predefined_ptrdiff_t(state+1368))/4)*4 if window != uintptr(m_Z_NULL) { wsize = uint32(1) << (*Tinflate_state)(unsafe.Pointer(state)).Fwbits libc.X__builtin___memcpy_chk(tls, window, (*Tinflate_state)(unsafe.Pointer(state)).Fwindow, uint64(wsize), ^t__predefined_size_t(0)) } (*Tinflate_state)(unsafe.Pointer(copy1)).Fwindow = window (*Tz_stream)(unsafe.Pointer(dest)).Fstate = copy1 return m_Z_OK } func XinflateUndermine(tls *libc.TLS, strm Tz_streamp, subvert int32) (r int32) { var state uintptr _ = state if _inflateStateCheck(tls, strm) != 0 { return -int32(2) } state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate _ = subvert (*Tinflate_state)(unsafe.Pointer(state)).Fsane = int32(1) return -int32(3) } func XinflateValidate(tls *libc.TLS, strm Tz_streamp, check int32) (r int32) { var state uintptr _ = state if _inflateStateCheck(tls, strm) != 0 { return -int32(2) } state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate if check != 0 && (*Tinflate_state)(unsafe.Pointer(state)).Fwrap != 0 { *(*int32)(unsafe.Pointer(state + 16)) |= int32(4) } else { *(*int32)(unsafe.Pointer(state + 16)) &= ^libc.Int32FromInt32(4) } return m_Z_OK } func XinflateMark(tls *libc.TLS, strm Tz_streamp) (r int64) { var state uintptr var v1, v2 uint32 _, _, _ = state, v1, v2 if _inflateStateCheck(tls, strm) != 0 { return -(libc.Int64FromInt64(1) << libc.Int32FromInt32(16)) } state = (*Tz_stream)(unsafe.Pointer(strm)).Fstate if (*Tinflate_state)(unsafe.Pointer(state)).Fmode == int32(_COPY) { v1 = (*Tinflate_state)(unsafe.Pointer(state)).Flength } else { if (*Tinflate_state)(unsafe.Pointer(state)).Fmode == int32(_MATCH) { v2 = (*Tinflate_state)(unsafe.Pointer(state)).Fwas - (*Tinflate_state)(unsafe.Pointer(state)).Flength } else { v2 = uint32(0) } v1 = v2 } return libc.Int64FromUint64(libc.Uint64FromInt64(int64((*Tinflate_state)(unsafe.Pointer(state)).Fback))<= uint32(1)) { break } if libc.Int32FromUint16((*(*[16]uint16)(unsafe.Pointer(bp)))[max]) != 0 { break } goto _3 _3: ; max-- } if root > max { root = max } if max == uint32(0) { /* no symbols to code at all */ here.Fop = libc.Uint8FromInt32(64) /* invalid code marker */ here.Fbits = libc.Uint8FromInt32(1) here.Fval = libc.Uint16FromInt32(0) v5 = table v4 = *(*uintptr)(unsafe.Pointer(v5)) *(*uintptr)(unsafe.Pointer(v5)) += 4 *(*Tcode)(unsafe.Pointer(v4)) = here /* make a table to force an error */ v7 = table v6 = *(*uintptr)(unsafe.Pointer(v7)) *(*uintptr)(unsafe.Pointer(v7)) += 4 *(*Tcode)(unsafe.Pointer(v6)) = here *(*uint32)(unsafe.Pointer(bits)) = uint32(1) return 0 /* no symbols, but wait for decoding to report error */ } min = uint32(1) for { if !(min < max) { break } if libc.Int32FromUint16((*(*[16]uint16)(unsafe.Pointer(bp)))[min]) != 0 { break } goto _8 _8: ; min++ } if root < min { root = min } /* check for an over-subscribed or incomplete set of lengths */ left = int32(1) len1 = uint32(1) for { if !(len1 <= uint32(m_MAXBITS)) { break } left <<= int32(1) left -= libc.Int32FromUint16((*(*[16]uint16)(unsafe.Pointer(bp)))[len1]) if left < 0 { return -int32(1) } /* over-subscribed */ goto _9 _9: ; len1++ } if left > 0 && (type1 == int32(_CODES) || max != uint32(1)) { return -int32(1) } /* incomplete set */ /* generate offsets into symbol table for each length for sorting */ (*(*[16]uint16)(unsafe.Pointer(bp + 32)))[int32(1)] = uint16(0) len1 = uint32(1) for { if !(len1 < uint32(m_MAXBITS)) { break } (*(*[16]uint16)(unsafe.Pointer(bp + 32)))[len1+uint32(1)] = libc.Uint16FromInt32(libc.Int32FromUint16((*(*[16]uint16)(unsafe.Pointer(bp + 32)))[len1]) + libc.Int32FromUint16((*(*[16]uint16)(unsafe.Pointer(bp)))[len1])) goto _10 _10: ; len1++ } /* sort symbols by length, by symbol order within each length */ sym = uint32(0) for { if !(sym < codes) { break } if libc.Int32FromUint16(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2))) != 0 { v13 = bp + 32 + uintptr(*(*uint16)(unsafe.Pointer(lens + uintptr(sym)*2)))*2 v12 = *(*uint16)(unsafe.Pointer(v13)) *(*uint16)(unsafe.Pointer(v13))++ *(*uint16)(unsafe.Pointer(work + uintptr(v12)*2)) = uint16(sym) } goto _11 _11: ; sym++ } /* Create and fill in decoding tables. In this loop, the table being filled is at next and has curr index bits. The code being used is huff with length len. That code is converted to an index by dropping drop bits off of the bottom. For codes where len is less than drop + curr, those top drop + curr - len bits are incremented through all values to fill the table with replicated entries. root is the number of index bits for the root table. When len exceeds root, sub-tables are created pointed to by the root entry with an index of the low root bits of huff. This is saved in low to check for when a new sub-table should be started. drop is zero when the root table is being filled, and drop is root when sub-tables are being filled. When a new sub-table is needed, it is necessary to look ahead in the code lengths to determine what size sub-table is needed. The length counts are used for this, and so count[] is decremented as codes are entered in the tables. used keeps track of how many table entries have been allocated from the provided *table space. It is checked for LENS and DIST tables against the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in the initial root table size constants. See the comments in inftrees.h for more information. sym increments through all symbols, and the loop terminates when all codes of length max, i.e. all codes, have been processed. This routine permits incomplete codes, so another loop after this one fills in the rest of the decoding tables with invalid code markers. */ /* set up for code type */ switch type1 { case int32(_CODES): v14 = work extra = v14 base = v14 /* dummy value--not used */ match = uint32(20) case int32(_LENS): base = uintptr(unsafe.Pointer(&_lbase)) extra = uintptr(unsafe.Pointer(&_lext)) match = uint32(257) default: /* DISTS */ base = uintptr(unsafe.Pointer(&_dbase)) extra = uintptr(unsafe.Pointer(&_dext)) match = uint32(0) } /* initialize state for loop */ huff = uint32(0) /* starting code */ sym = uint32(0) /* starting code symbol */ len1 = min /* starting code length */ next = *(*uintptr)(unsafe.Pointer(table)) /* current table to fill in */ curr = root /* current table index bits */ drop = uint32(0) /* current bits to drop from code for index */ low = libc.Uint32FromInt32(-libc.Int32FromInt32(1)) /* trigger new sub-table when len > root */ used = uint32(1) << root /* use root table entries */ mask = used - uint32(1) /* mask for comparing low */ /* check available table space */ if type1 == int32(_LENS) && used > uint32(m_ENOUGH_LENS) || type1 == int32(_DISTS) && used > uint32(m_ENOUGH_DISTS) { return int32(1) } /* process all codes and make table entries */ for { /* create table entry */ here.Fbits = uint8(len1 - drop) if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))+uint32(1) < match { here.Fop = libc.Uint8FromInt32(0) here.Fval = *(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)) } else { if uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2))) >= match { here.Fop = uint8(*(*uint16)(unsafe.Pointer(extra + uintptr(uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match)*2))) here.Fval = *(*uint16)(unsafe.Pointer(base + uintptr(uint32(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))-match)*2)) } else { here.Fop = libc.Uint8FromInt32(libc.Int32FromInt32(32) + libc.Int32FromInt32(64)) /* end of block */ here.Fval = uint16(0) } } /* replicate for those indices with low len bits equal to huff */ incr = uint32(1) << (len1 - drop) fill = uint32(1) << curr min = fill /* save offset to next table */ for cond := true; cond; cond = fill != uint32(0) { fill -= incr *(*Tcode)(unsafe.Pointer(next + uintptr(huff>>drop+fill)*4)) = here } /* backwards increment the len-bit code huff */ incr = uint32(1) << (len1 - uint32(1)) for huff&incr != 0 { incr >>= uint32(1) } if incr != uint32(0) { huff &= incr - uint32(1) huff += incr } else { huff = uint32(0) } /* go to next symbol, update count, len */ sym++ v17 = bp + uintptr(len1)*2 *(*uint16)(unsafe.Pointer(v17))-- v16 = *(*uint16)(unsafe.Pointer(v17)) if libc.Int32FromUint16(v16) == 0 { if len1 == max { break } len1 = uint32(*(*uint16)(unsafe.Pointer(lens + uintptr(*(*uint16)(unsafe.Pointer(work + uintptr(sym)*2)))*2))) } /* create new sub-table if needed */ if len1 > root && huff&mask != low { /* if first time, transition to sub-tables */ if drop == uint32(0) { drop = root } /* increment past last table */ next += uintptr(min) * 4 /* here min is 1 << curr */ /* determine length of next table */ curr = len1 - drop left = libc.Int32FromInt32(1) << curr for curr+drop < max { left -= libc.Int32FromUint16((*(*[16]uint16)(unsafe.Pointer(bp)))[curr+drop]) if left <= 0 { break } curr++ left <<= int32(1) } /* check for enough space */ used += uint32(1) << curr if type1 == int32(_LENS) && used > uint32(m_ENOUGH_LENS) || type1 == int32(_DISTS) && used > uint32(m_ENOUGH_DISTS) { return int32(1) } /* point entry in root table to sub-table */ low = huff & mask (*(*Tcode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4))).Fop = uint8(curr) (*(*Tcode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4))).Fbits = uint8(root) (*(*Tcode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(table)) + uintptr(low)*4))).Fval = libc.Uint16FromInt64((int64(next) - int64(*(*uintptr)(unsafe.Pointer(table)))) / 4) } goto _15 _15: } /* fill in remaining table entry if code is incomplete (guaranteed to have at most one remaining entry, since if the code is incomplete, the maximum code length that was allowed to get this far is one bit) */ if huff != uint32(0) { here.Fop = libc.Uint8FromInt32(64) /* invalid code marker */ here.Fbits = uint8(len1 - drop) here.Fval = libc.Uint16FromInt32(0) *(*Tcode)(unsafe.Pointer(next + uintptr(huff)*4)) = here } /* set return parameters */ *(*uintptr)(unsafe.Pointer(table)) += uintptr(used) * 4 *(*uint32)(unsafe.Pointer(bits)) = root return 0 } var _lbase = [31]uint16{ 0: uint16(3), 1: uint16(4), 2: uint16(5), 3: uint16(6), 4: uint16(7), 5: uint16(8), 6: uint16(9), 7: uint16(10), 8: uint16(11), 9: uint16(13), 10: uint16(15), 11: uint16(17), 12: uint16(19), 13: uint16(23), 14: uint16(27), 15: uint16(31), 16: uint16(35), 17: uint16(43), 18: uint16(51), 19: uint16(59), 20: uint16(67), 21: uint16(83), 22: uint16(99), 23: uint16(115), 24: uint16(131), 25: uint16(163), 26: uint16(195), 27: uint16(227), 28: uint16(258), } var _lext = [31]uint16{ 0: uint16(16), 1: uint16(16), 2: uint16(16), 3: uint16(16), 4: uint16(16), 5: uint16(16), 6: uint16(16), 7: uint16(16), 8: uint16(17), 9: uint16(17), 10: uint16(17), 11: uint16(17), 12: uint16(18), 13: uint16(18), 14: uint16(18), 15: uint16(18), 16: uint16(19), 17: uint16(19), 18: uint16(19), 19: uint16(19), 20: uint16(20), 21: uint16(20), 22: uint16(20), 23: uint16(20), 24: uint16(21), 25: uint16(21), 26: uint16(21), 27: uint16(21), 28: uint16(16), 29: uint16(203), 30: uint16(77), } var _dbase = [32]uint16{ 0: uint16(1), 1: uint16(2), 2: uint16(3), 3: uint16(4), 4: uint16(5), 5: uint16(7), 6: uint16(9), 7: uint16(13), 8: uint16(17), 9: uint16(25), 10: uint16(33), 11: uint16(49), 12: uint16(65), 13: uint16(97), 14: uint16(129), 15: uint16(193), 16: uint16(257), 17: uint16(385), 18: uint16(513), 19: uint16(769), 20: uint16(1025), 21: uint16(1537), 22: uint16(2049), 23: uint16(3073), 24: uint16(4097), 25: uint16(6145), 26: uint16(8193), 27: uint16(12289), 28: uint16(16385), 29: uint16(24577), } var _dext = [32]uint16{ 0: uint16(16), 1: uint16(16), 2: uint16(16), 3: uint16(16), 4: uint16(17), 5: uint16(17), 6: uint16(18), 7: uint16(18), 8: uint16(19), 9: uint16(19), 10: uint16(20), 11: uint16(20), 12: uint16(21), 13: uint16(21), 14: uint16(22), 15: uint16(22), 16: uint16(23), 17: uint16(23), 18: uint16(24), 19: uint16(24), 20: uint16(25), 21: uint16(25), 22: uint16(26), 23: uint16(26), 24: uint16(27), 25: uint16(27), 26: uint16(28), 27: uint16(28), 28: uint16(29), 29: uint16(29), 30: uint16(64), 31: uint16(64), } const m_DIST_CODE_LEN = 512 const m_END_BLOCK = 256 const m_MAX_BL_BITS = 7 const m_REPZ_11_138 = 18 const m_REPZ_3_10 = 17 const m_REP_3_6 = 16 const m_SMALLEST = 1 const m_TCONST = "const" type Tstatic_tree_desc = struct { Fstatic_tree uintptr Fextra_bits uintptr Fextra_base int32 Felems int32 Fmax_length int32 } type Tstatic_tree_desc_s = Tstatic_tree_desc /* =========================================================================== * Constants */ /* Bit length codes must not exceed MAX_BL_BITS bits */ /* end of block literal code */ /* repeat previous bit length 3-6 times (2 bits of repeat count) */ /* repeat a zero length 3-10 times (3 bits of repeat count) */ /* repeat a zero length 11-138 times (7 bits of repeat count) */ var _extra_lbits = [29]int32{ 8: int32(1), 9: int32(1), 10: int32(1), 11: int32(1), 12: int32(2), 13: int32(2), 14: int32(2), 15: int32(2), 16: int32(3), 17: int32(3), 18: int32(3), 19: int32(3), 20: int32(4), 21: int32(4), 22: int32(4), 23: int32(4), 24: int32(5), 25: int32(5), 26: int32(5), 27: int32(5), } var _extra_dbits = [30]int32{ 4: int32(1), 5: int32(1), 6: int32(2), 7: int32(2), 8: int32(3), 9: int32(3), 10: int32(4), 11: int32(4), 12: int32(5), 13: int32(5), 14: int32(6), 15: int32(6), 16: int32(7), 17: int32(7), 18: int32(8), 19: int32(8), 20: int32(9), 21: int32(9), 22: int32(10), 23: int32(10), 24: int32(11), 25: int32(11), 26: int32(12), 27: int32(12), 28: int32(13), 29: int32(13), } var _extra_blbits = [19]int32{ 16: int32(2), 17: int32(3), 18: int32(7), } var _bl_order = [19]Tuch{ 0: uint8(16), 1: uint8(17), 2: uint8(18), 4: uint8(8), 5: uint8(7), 6: uint8(9), 7: uint8(6), 8: uint8(10), 9: uint8(5), 10: uint8(11), 11: uint8(4), 12: uint8(12), 13: uint8(3), 14: uint8(13), 15: uint8(2), 16: uint8(14), 17: uint8(1), 18: uint8(15), } var _static_ltree = [288]Tct_data{ 0: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(12)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 1: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(140)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 2: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(76)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 3: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(204)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 4: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(44)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 5: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(172)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 6: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(108)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 7: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(236)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 8: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(28)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 9: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(156)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 10: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(92)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 11: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(220)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 12: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(60)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 13: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(188)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 14: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(124)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 15: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(252)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 16: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(2)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 17: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(130)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 18: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(66)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 19: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(194)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 20: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(34)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 21: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(162)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 22: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(98)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 23: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(226)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 24: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(18)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 25: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(146)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 26: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(82)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 27: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(210)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 28: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(50)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 29: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(178)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 30: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(114)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 31: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(242)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 32: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(10)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 33: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(138)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 34: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(74)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 35: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(202)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 36: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(42)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 37: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(170)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 38: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(106)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 39: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(234)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 40: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(26)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 41: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(154)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 42: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(90)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 43: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(218)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 44: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(58)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 45: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(186)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 46: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(122)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 47: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(250)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 48: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(6)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 49: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(134)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 50: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(70)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 51: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(198)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 52: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(38)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 53: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(166)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 54: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(102)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 55: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(230)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 56: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(22)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 57: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(150)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 58: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(86)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 59: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(214)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 60: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(54)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 61: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(182)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 62: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(118)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 63: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(246)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 64: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(14)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 65: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(142)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 66: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(78)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 67: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(206)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 68: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(46)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 69: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(174)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 70: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(110)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 71: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(238)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 72: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(30)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 73: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(158)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 74: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(94)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 75: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(222)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 76: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(62)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 77: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(190)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 78: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(126)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 79: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(254)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 80: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(1)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 81: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(129)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 82: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(65)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 83: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(193)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 84: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(33)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 85: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(161)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 86: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(97)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 87: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(225)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 88: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(17)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 89: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(145)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 90: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(81)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 91: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(209)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 92: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(49)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 93: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(177)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 94: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(113)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 95: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(241)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 96: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 97: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(137)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 98: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(73)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 99: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(201)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 100: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(41)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 101: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(169)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 102: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(105)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 103: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(233)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 104: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(25)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 105: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(153)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 106: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(89)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 107: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(217)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 108: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(57)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 109: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(185)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 110: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(121)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 111: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(249)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 112: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 113: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(133)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 114: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(69)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 115: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(197)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 116: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(37)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 117: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(165)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 118: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(101)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 119: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(229)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 120: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(21)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 121: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(149)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 122: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(85)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 123: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(213)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 124: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(53)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 125: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(181)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 126: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(117)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 127: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(245)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 128: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(13)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 129: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(141)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 130: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(77)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 131: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(205)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 132: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(45)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 133: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(173)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 134: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(109)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 135: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(237)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 136: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(29)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 137: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(157)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 138: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(93)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 139: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(221)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 140: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(61)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 141: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(189)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 142: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(125)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 143: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(253)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 144: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(19)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 145: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(275)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 146: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(147)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 147: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(403)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 148: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(83)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 149: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(339)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 150: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(211)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 151: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(467)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 152: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(51)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 153: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(307)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 154: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(179)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 155: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(435)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 156: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(115)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 157: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(371)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 158: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(243)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 159: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(499)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 160: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(11)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 161: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(267)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 162: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(139)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 163: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(395)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 164: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(75)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 165: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(331)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 166: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(203)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 167: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(459)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 168: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(43)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 169: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(299)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 170: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(171)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 171: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(427)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 172: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(107)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 173: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(363)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 174: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(235)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 175: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(491)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 176: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(27)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 177: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(283)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 178: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(155)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 179: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(411)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 180: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(91)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 181: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(347)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 182: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(219)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 183: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(475)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 184: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(59)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 185: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(315)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 186: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(187)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 187: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(443)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 188: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(123)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 189: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(379)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 190: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(251)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 191: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(507)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 192: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 193: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(263)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 194: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(135)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 195: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(391)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 196: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(71)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 197: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(327)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 198: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(199)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 199: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(455)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 200: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(39)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 201: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(295)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 202: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(167)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 203: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(423)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 204: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(103)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 205: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(359)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 206: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(231)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 207: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(487)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 208: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(23)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 209: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(279)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 210: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(151)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 211: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(407)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 212: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(87)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 213: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(343)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 214: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(215)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 215: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(471)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 216: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(55)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 217: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(311)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 218: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(183)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 219: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(439)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 220: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(119)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 221: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(375)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 222: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(247)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 223: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(503)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 224: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(15)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 225: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(271)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 226: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(143)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 227: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(399)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 228: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(79)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 229: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(335)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 230: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(207)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 231: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(463)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 232: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(47)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 233: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(303)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 234: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(175)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 235: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(431)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 236: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(111)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 237: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(367)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 238: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(239)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 239: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(495)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 240: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(31)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 241: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(287)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 242: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(159)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 243: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(415)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 244: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(95)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 245: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(351)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 246: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(223)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 247: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(479)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 248: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(63)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 249: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(319)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 250: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(191)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 251: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(447)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 252: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(127)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 253: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(383)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 254: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(255)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 255: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(511)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), }, 256: { Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 257: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(64)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 258: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(32)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 259: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(96)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 260: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(16)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 261: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(80)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 262: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(48)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 263: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(112)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 264: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 265: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(72)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 266: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(40)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 267: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(104)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 268: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(24)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 269: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(88)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 270: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(56)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 271: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(120)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 272: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(4)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 273: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(68)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 274: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(36)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 275: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(100)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 276: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(20)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 277: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(84)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 278: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(52)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 279: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(116)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), }, 280: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(3)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 281: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(131)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 282: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(67)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 283: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(195)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 284: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(35)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 285: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(163)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 286: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(99)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, 287: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(227)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), }, } var _static_dtree = [30]Tct_data{ 0: { Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 1: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(16)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 2: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(8)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 3: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(24)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 4: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(4)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 5: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(20)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 6: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(12)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 7: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(28)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 8: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(2)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 9: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(18)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 10: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(10)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 11: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(26)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 12: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(6)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 13: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(22)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 14: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(14)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 15: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(30)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 16: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(1)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 17: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(17)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 18: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(9)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 19: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(25)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 20: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 21: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(21)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 22: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(13)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 23: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(29)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 24: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(3)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 25: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(19)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 26: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(11)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 27: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(27)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 28: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(7)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, 29: { Ffc: *(*struct { Fcode [0]Tush Ffreq Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(23)})), Fdl: *(*struct { Flen1 [0]Tush Fdad Tush })(unsafe.Pointer(&struct{ f Tush }{f: uint16(5)})), }, } var _base_length = [29]int32{ 1: int32(1), 2: int32(2), 3: int32(3), 4: int32(4), 5: int32(5), 6: int32(6), 7: int32(7), 8: int32(8), 9: int32(10), 10: int32(12), 11: int32(14), 12: int32(16), 13: int32(20), 14: int32(24), 15: int32(28), 16: int32(32), 17: int32(40), 18: int32(48), 19: int32(56), 20: int32(64), 21: int32(80), 22: int32(96), 23: int32(112), 24: int32(128), 25: int32(160), 26: int32(192), 27: int32(224), } var _base_dist = [30]int32{ 1: int32(1), 2: int32(2), 3: int32(3), 4: int32(4), 5: int32(6), 6: int32(8), 7: int32(12), 8: int32(16), 9: int32(24), 10: int32(32), 11: int32(48), 12: int32(64), 13: int32(96), 14: int32(128), 15: int32(192), 16: int32(256), 17: int32(384), 18: int32(512), 19: int32(768), 20: int32(1024), 21: int32(1536), 22: int32(2048), 23: int32(3072), 24: int32(4096), 25: int32(6144), 26: int32(8192), 27: int32(12288), 28: int32(16384), 29: int32(24576), } var _static_l_desc = Tstatic_tree_desc{ Fstatic_tree: uintptr(unsafe.Pointer(&_static_ltree)), Fextra_bits: uintptr(unsafe.Pointer(&_extra_lbits)), Fextra_base: libc.Int32FromInt32(m_LITERALS) + libc.Int32FromInt32(1), Felems: libc.Int32FromInt32(m_LITERALS) + libc.Int32FromInt32(1) + libc.Int32FromInt32(m_LENGTH_CODES), Fmax_length: int32(m_MAX_BITS), } var _static_d_desc = Tstatic_tree_desc{ Fstatic_tree: uintptr(unsafe.Pointer(&_static_dtree)), Fextra_bits: uintptr(unsafe.Pointer(&_extra_dbits)), Felems: int32(m_D_CODES), Fmax_length: int32(m_MAX_BITS), } var _static_bl_desc = Tstatic_tree_desc{ Fextra_bits: uintptr(unsafe.Pointer(&_extra_blbits)), Felems: int32(m_BL_CODES), Fmax_length: int32(m_MAX_BL_BITS), } /* =========================================================================== * Output a short LSB first on the stream. * IN assertion: there is enough room in pendingBuf. */ // C documentation // // /* =========================================================================== // * Reverse the first len bits of a code, using straightforward code (a faster // * method would use a table) // * IN assertion: 1 <= len <= 15 // */ func _bi_reverse(tls *libc.TLS, code uint32, len1 int32) (r uint32) { var res uint32 var v1 int32 _, _ = res, v1 res = uint32(0) for { res |= code & uint32(1) code >>= uint32(1) res <<= uint32(1) goto _2 _2: ; len1-- v1 = len1 if !(v1 > 0) { break } } return res >> int32(1) } // C documentation // // /* =========================================================================== // * Flush the bit buffer, keeping at most 7 bits in it. // */ func _bi_flush(tls *libc.TLS, s uintptr) { var v1, v3, v5 Tulg var v2, v4, v6, p7 uintptr _, _, _, _, _, _, _ = v1, v2, v3, v4, v5, v6, p7 if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid == int32(16) { v2 = s + 40 v1 = *(*Tulg)(unsafe.Pointer(v2)) *(*Tulg)(unsafe.Pointer(v2))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v1))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v4 = s + 40 v3 = *(*Tulg)(unsafe.Pointer(v4)) *(*Tulg)(unsafe.Pointer(v4))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v3))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = uint16(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid >= int32(8) { v6 = s + 40 v5 = *(*Tulg)(unsafe.Pointer(v6)) *(*Tulg)(unsafe.Pointer(v6))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v5))) = uint8((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) p7 = s + 5936 *(*Tush)(unsafe.Pointer(p7)) = Tush(int32(*(*Tush)(unsafe.Pointer(p7))) >> libc.Int32FromInt32(8)) *(*int32)(unsafe.Pointer(s + 5940)) -= int32(8) } } } // C documentation // // /* =========================================================================== // * Flush the bit buffer and align the output on a byte boundary // */ func _bi_windup(tls *libc.TLS, s uintptr) { var v1, v3, v5 Tulg var v2, v4, v6 uintptr _, _, _, _, _, _ = v1, v2, v3, v4, v5, v6 if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > int32(8) { v2 = s + 40 v1 = *(*Tulg)(unsafe.Pointer(v2)) *(*Tulg)(unsafe.Pointer(v2))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v1))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v4 = s + 40 v3 = *(*Tulg)(unsafe.Pointer(v4)) *(*Tulg)(unsafe.Pointer(v4))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v3))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) } else { if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > 0 { v6 = s + 40 v5 = *(*Tulg)(unsafe.Pointer(v6)) *(*Tulg)(unsafe.Pointer(v6))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v5))) = uint8((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) } } (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = uint16(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 } // C documentation // // /* =========================================================================== // * Generate the codes for a given tree and bit counts (which need not be // * optimal). // * IN assertion: the array bl_count contains the bit length statistics for // * the given tree and the field len is set for all tree elements. // * OUT assertion: the field code is set for all tree elements of non // * zero code length. // */ func _gen_codes(tls *libc.TLS, tree uintptr, max_code int32, bl_count uintptr) { bp := tls.Alloc(32) defer tls.Free(32) var bits, len1, n int32 var code uint32 var v3 Tush var v4 uintptr var _ /* next_code at bp+0 */ [16]Tush _, _, _, _, _, _ = bits, code, len1, n, v3, v4 /* next code value for each bit length */ code = uint32(0) /* code index */ /* The distribution counts are first used to generate the code values * without bit reversal. */ bits = int32(1) for { if !(bits <= int32(m_MAX_BITS)) { break } code = (code + uint32(*(*Tushf)(unsafe.Pointer(bl_count + uintptr(bits-int32(1))*2)))) << int32(1) (*(*[16]Tush)(unsafe.Pointer(bp)))[bits] = uint16(code) goto _1 _1: ; bits++ } /* Check that the bit counts in bl_count are consistent. The last code * must be all ones. */ n = 0 for { if !(n <= max_code) { break } len1 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(n)*4 + 2))) if len1 == 0 { goto _2 } /* Now reverse the bits */ v4 = bp + uintptr(len1)*2 v3 = *(*Tush)(unsafe.Pointer(v4)) *(*Tush)(unsafe.Pointer(v4))++ *(*Tush)(unsafe.Pointer(tree + uintptr(n)*4)) = uint16(_bi_reverse(tls, uint32(v3), len1)) goto _2 _2: ; n++ } } /* Send a code of the given tree. c and tree must not have side effects */ /* =========================================================================== * Send a value on a given number of bits. * IN assertion: length <= 16 and value fits in length bits. */ /* the arguments must not have side effects */ // C documentation // // /* =========================================================================== // * Initialize the various 'constant' tables. // */ func _tr_static_init(tls *libc.TLS) { } /* =========================================================================== * Generate the file trees.h describing the static trees. */ // C documentation // // /* =========================================================================== // * Initialize a new block. // */ func _init_block(tls *libc.TLS, s uintptr) { var n int32 var v4 Tulg var v5 TuInt _, _, _ = n, v4, v5 /* iterates over tree elements */ /* Initialize the trees. */ n = 0 for { if !(n < libc.Int32FromInt32(m_LITERALS)+libc.Int32FromInt32(1)+libc.Int32FromInt32(m_LENGTH_CODES)) { break } *(*Tush)(unsafe.Pointer(s + 212 + uintptr(n)*4)) = uint16(0) goto _1 _1: ; n++ } n = 0 for { if !(n < int32(m_D_CODES)) { break } *(*Tush)(unsafe.Pointer(s + 2504 + uintptr(n)*4)) = uint16(0) goto _2 _2: ; n++ } n = 0 for { if !(n < int32(m_BL_CODES)) { break } *(*Tush)(unsafe.Pointer(s + 2748 + uintptr(n)*4)) = uint16(0) goto _3 _3: ; n++ } *(*Tush)(unsafe.Pointer(s + 212 + 256*4)) = uint16(1) v4 = libc.Uint64FromInt64(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fstatic_len = v4 (*Tdeflate_state)(unsafe.Pointer(s)).Fopt_len = v4 v5 = libc.Uint32FromInt32(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fmatches = v5 (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next = v5 } // C documentation // // /* =========================================================================== // * Initialize the tree data structures for a new zlib stream. // */ func x__tr_init(tls *libc.TLS, s uintptr) { _tr_static_init(tls) (*Tdeflate_state)(unsafe.Pointer(s)).Fl_desc.Fdyn_tree = s + 212 (*Tdeflate_state)(unsafe.Pointer(s)).Fl_desc.Fstat_desc = uintptr(unsafe.Pointer(&_static_l_desc)) (*Tdeflate_state)(unsafe.Pointer(s)).Fd_desc.Fdyn_tree = s + 2504 (*Tdeflate_state)(unsafe.Pointer(s)).Fd_desc.Fstat_desc = uintptr(unsafe.Pointer(&_static_d_desc)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbl_desc.Fdyn_tree = s + 2748 (*Tdeflate_state)(unsafe.Pointer(s)).Fbl_desc.Fstat_desc = uintptr(unsafe.Pointer(&_static_bl_desc)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = uint16(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid = 0 /* Initialize the first block of the first file: */ _init_block(tls, s) } /* Index within the heap array of least frequent node in the Huffman tree */ /* =========================================================================== * Remove the smallest element from the heap and recreate the heap with * one less element. Updates heap and heap_len. */ /* =========================================================================== * Compares to subtrees, using the tree depth as tie breaker when * the subtrees have equal frequency. This minimizes the worst case length. */ // C documentation // // /* =========================================================================== // * Restore the heap property by moving down the tree starting at node k, // * exchanging a node with the smallest of its two sons if necessary, stopping // * when the heap property is re-established (each father smaller than its // * two sons). // */ func _pqdownheap(tls *libc.TLS, s uintptr, tree uintptr, k int32) { var j, v int32 _, _ = j, v v = *(*int32)(unsafe.Pointer(s + 3008 + uintptr(k)*4)) j = k << int32(1) /* left son of k */ for j <= (*Tdeflate_state)(unsafe.Pointer(s)).Fheap_len { /* Set j to the smallest of the two sons: */ if j < (*Tdeflate_state)(unsafe.Pointer(s)).Fheap_len && (libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j+int32(1))*4)))*4))) < libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)))*4))) || libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j+int32(1))*4)))*4))) == libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)))*4))) && libc.Int32FromUint8(*(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j+int32(1))*4)))))) <= libc.Int32FromUint8(*(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4))))))) { j++ } /* Exit if v is smaller than both sons */ if libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(v)*4))) < libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)))*4))) || libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(v)*4))) == libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)))*4))) && libc.Int32FromUint8(*(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(v)))) <= libc.Int32FromUint8(*(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)))))) { break } /* Exchange v with the smallest son */ *(*int32)(unsafe.Pointer(s + 3008 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(s + 3008 + uintptr(j)*4)) k = j /* And continue down the tree, setting j to the left son of k */ j <<= int32(1) } *(*int32)(unsafe.Pointer(s + 3008 + uintptr(k)*4)) = v } // C documentation // // /* =========================================================================== // * Compute the optimal bit lengths for a tree and update the total bit length // * for the current block. // * IN assertion: the fields freq and dad are set, heap[heap_max] and // * above are the tree nodes sorted by increasing frequency. // * OUT assertions: the field len is set to the optimal bit length, the // * array bl_count contains the frequencies for each bit length. // * The length opt_len is updated; static_len is also updated if stree is // * not null. // */ func _gen_bitlen(tls *libc.TLS, s uintptr, desc uintptr) { var base, bits, h, m, max_code, max_length, n, overflow, xbits, v5 int32 var extra, stree, tree, p3 uintptr var f Tush _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = base, bits, extra, f, h, m, max_code, max_length, n, overflow, stree, tree, xbits, v5, p3 tree = (*Ttree_desc)(unsafe.Pointer(desc)).Fdyn_tree max_code = (*Ttree_desc)(unsafe.Pointer(desc)).Fmax_code stree = (*Tstatic_tree_desc)(unsafe.Pointer((*Ttree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree extra = (*Tstatic_tree_desc)(unsafe.Pointer((*Ttree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_bits base = (*Tstatic_tree_desc)(unsafe.Pointer((*Ttree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fextra_base max_length = (*Tstatic_tree_desc)(unsafe.Pointer((*Ttree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fmax_length /* frequency */ overflow = 0 /* number of elements with bit length too large */ bits = 0 for { if !(bits <= int32(m_MAX_BITS)) { break } *(*Tush)(unsafe.Pointer(s + 2976 + uintptr(bits)*2)) = uint16(0) goto _1 _1: ; bits++ } /* In a first pass, compute the optimal bit lengths (which may * overflow in the case of the bit length tree). */ *(*Tush)(unsafe.Pointer(tree + uintptr(*(*int32)(unsafe.Pointer(s + 3008 + uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fheap_max)*4)))*4 + 2)) = uint16(0) /* root of the heap */ h = (*Tdeflate_state)(unsafe.Pointer(s)).Fheap_max + int32(1) for { if !(h < libc.Int32FromInt32(2)*(libc.Int32FromInt32(m_LITERALS)+libc.Int32FromInt32(1)+libc.Int32FromInt32(m_LENGTH_CODES))+libc.Int32FromInt32(1)) { break } n = *(*int32)(unsafe.Pointer(s + 3008 + uintptr(h)*4)) bits = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(*(*Tush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)))*4 + 2))) + int32(1) if bits > max_length { bits = max_length overflow++ } *(*Tush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = libc.Uint16FromInt32(bits) /* We overwrite tree[n].Dad which is no longer needed */ if n > max_code { goto _2 } /* not a leaf node */ *(*Tush)(unsafe.Pointer(s + 2976 + uintptr(bits)*2))++ xbits = 0 if n >= base { xbits = *(*Tintf)(unsafe.Pointer(extra + uintptr(n-base)*4)) } f = *(*Tush)(unsafe.Pointer(tree + uintptr(n)*4)) *(*Tulg)(unsafe.Pointer(s + 5912)) += uint64(f) * uint64(libc.Uint32FromInt32(bits+xbits)) if stree != 0 { *(*Tulg)(unsafe.Pointer(s + 5920)) += uint64(f) * uint64(libc.Uint32FromInt32(libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(stree + uintptr(n)*4 + 2)))+xbits)) } goto _2 _2: ; h++ } if overflow == 0 { return } /* This happens for example on obj2 and pic of the Calgary corpus */ /* Find the first bit length which could increase: */ for cond := true; cond; cond = overflow > 0 { bits = max_length - int32(1) for libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2976 + uintptr(bits)*2))) == 0 { bits-- } *(*Tush)(unsafe.Pointer(s + 2976 + uintptr(bits)*2))-- /* move one leaf down the tree */ p3 = s + 2976 + uintptr(bits+int32(1))*2 *(*Tush)(unsafe.Pointer(p3)) = Tush(int32(*(*Tush)(unsafe.Pointer(p3))) + libc.Int32FromInt32(2)) /* move one overflow item as its brother */ *(*Tush)(unsafe.Pointer(s + 2976 + uintptr(max_length)*2))-- /* The brother of the overflow item also moves one step up, * but this does not affect bl_count[max_length] */ overflow -= int32(2) } /* Now recompute all bit lengths, scanning in increasing frequency. * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all * lengths instead of fixing only the wrong ones. This idea is taken * from 'ar' written by Haruhiko Okumura.) */ bits = max_length for { if !(bits != 0) { break } n = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2976 + uintptr(bits)*2))) for n != 0 { h-- v5 = h m = *(*int32)(unsafe.Pointer(s + 3008 + uintptr(v5)*4)) if m > max_code { continue } if uint32(*(*Tush)(unsafe.Pointer(tree + uintptr(m)*4 + 2))) != libc.Uint32FromInt32(bits) { *(*Tulg)(unsafe.Pointer(s + 5912)) += (libc.Uint64FromInt32(bits) - uint64(*(*Tush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)))) * uint64(*(*Tush)(unsafe.Pointer(tree + uintptr(m)*4))) *(*Tush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)) = libc.Uint16FromInt32(bits) } n-- } goto _4 _4: ; bits-- } } // C documentation // // /* =========================================================================== // * Construct one Huffman tree and assigns the code bit strings and lengths. // * Update the total bit length for the current block. // * IN assertion: the field freq is set for all tree elements. // * OUT assertions: the fields len and code are set to the optimal bit length // * and corresponding code. The length opt_len is updated; static_len is // * also updated if stree is not null. The field max_code is set. // */ func _build_tree(tls *libc.TLS, s uintptr, desc uintptr) { var elems, m, max_code, n, node, v11, v13, v15, v17, v19, v2, v20, v4, v5, v6, v7, v8 int32 var stree, tree, v12, v14, v16, v21, v3, v9 uintptr var v18 Tush _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = elems, m, max_code, n, node, stree, tree, v11, v12, v13, v14, v15, v16, v17, v18, v19, v2, v20, v21, v3, v4, v5, v6, v7, v8, v9 tree = (*Ttree_desc)(unsafe.Pointer(desc)).Fdyn_tree stree = (*Tstatic_tree_desc)(unsafe.Pointer((*Ttree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Fstatic_tree elems = (*Tstatic_tree_desc)(unsafe.Pointer((*Ttree_desc)(unsafe.Pointer(desc)).Fstat_desc)).Felems /* iterate over heap elements */ max_code = -int32(1) /* new node being created */ /* Construct the initial heap, with least frequent element in * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n + 1]. * heap[0] is not used. */ (*Tdeflate_state)(unsafe.Pointer(s)).Fheap_len = 0 /* new node being created */ /* Construct the initial heap, with least frequent element in * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n + 1]. * heap[0] is not used. */ (*Tdeflate_state)(unsafe.Pointer(s)).Fheap_max = libc.Int32FromInt32(2)*(libc.Int32FromInt32(m_LITERALS)+libc.Int32FromInt32(1)+libc.Int32FromInt32(m_LENGTH_CODES)) + libc.Int32FromInt32(1) n = 0 for { if !(n < elems) { break } if libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(n)*4))) != 0 { v3 = s + 5300 *(*int32)(unsafe.Pointer(v3))++ v2 = *(*int32)(unsafe.Pointer(v3)) v4 = n max_code = v4 *(*int32)(unsafe.Pointer(s + 3008 + uintptr(v2)*4)) = v4 *(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(n))) = uint8(0) } else { *(*Tush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = uint16(0) } goto _1 _1: ; n++ } /* The pkzip format requires that at least one distance code exists, * and that at least one bit should be sent even if there is only one * possible code. So to avoid special checks later on we force at least * two codes of non zero frequency. */ for (*Tdeflate_state)(unsafe.Pointer(s)).Fheap_len < int32(2) { if max_code < int32(2) { max_code++ v7 = max_code v6 = v7 } else { v6 = 0 } v5 = v6 v9 = s + 5300 *(*int32)(unsafe.Pointer(v9))++ v8 = *(*int32)(unsafe.Pointer(v9)) *(*int32)(unsafe.Pointer(s + 3008 + uintptr(v8)*4)) = v5 node = v5 *(*Tush)(unsafe.Pointer(tree + uintptr(node)*4)) = uint16(1) *(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(node))) = uint8(0) (*Tdeflate_state)(unsafe.Pointer(s)).Fopt_len-- if stree != 0 { *(*Tulg)(unsafe.Pointer(s + 5920)) -= uint64(*(*Tush)(unsafe.Pointer(stree + uintptr(node)*4 + 2))) } /* node is 0 or 1 so it does not have extra bits */ } (*Ttree_desc)(unsafe.Pointer(desc)).Fmax_code = max_code /* The elements heap[heap_len/2 + 1 .. heap_len] are leaves of the tree, * establish sub-heaps of increasing lengths: */ n = (*Tdeflate_state)(unsafe.Pointer(s)).Fheap_len / int32(2) for { if !(n >= int32(1)) { break } _pqdownheap(tls, s, tree, n) goto _10 _10: ; n-- } /* Construct the Huffman tree by repeatedly combining the least two * frequent nodes. */ node = elems /* next internal node of the tree */ for cond := true; cond; cond = (*Tdeflate_state)(unsafe.Pointer(s)).Fheap_len >= int32(2) { n = *(*int32)(unsafe.Pointer(s + 3008 + 1*4)) v12 = s + 5300 v11 = *(*int32)(unsafe.Pointer(v12)) *(*int32)(unsafe.Pointer(v12))-- *(*int32)(unsafe.Pointer(s + 3008 + 1*4)) = *(*int32)(unsafe.Pointer(s + 3008 + uintptr(v11)*4)) _pqdownheap(tls, s, tree, int32(m_SMALLEST)) /* n = node of least frequency */ m = *(*int32)(unsafe.Pointer(s + 3008 + 1*4)) /* m = node of next least frequency */ v14 = s + 5304 *(*int32)(unsafe.Pointer(v14))-- v13 = *(*int32)(unsafe.Pointer(v14)) *(*int32)(unsafe.Pointer(s + 3008 + uintptr(v13)*4)) = n /* keep the nodes sorted by frequency */ v16 = s + 5304 *(*int32)(unsafe.Pointer(v16))-- v15 = *(*int32)(unsafe.Pointer(v16)) *(*int32)(unsafe.Pointer(s + 3008 + uintptr(v15)*4)) = m /* Create a new node father of n and m */ *(*Tush)(unsafe.Pointer(tree + uintptr(node)*4)) = libc.Uint16FromInt32(libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(n)*4))) + libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(m)*4)))) if libc.Int32FromUint8(*(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(n)))) >= libc.Int32FromUint8(*(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(m)))) { v17 = libc.Int32FromUint8(*(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(n)))) } else { v17 = libc.Int32FromUint8(*(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(m)))) } *(*Tuch)(unsafe.Pointer(s + 5308 + uintptr(node))) = libc.Uint8FromInt32(v17 + libc.Int32FromInt32(1)) v18 = libc.Uint16FromInt32(node) *(*Tush)(unsafe.Pointer(tree + uintptr(m)*4 + 2)) = v18 *(*Tush)(unsafe.Pointer(tree + uintptr(n)*4 + 2)) = v18 /* and insert the new node in the heap */ v19 = node node++ *(*int32)(unsafe.Pointer(s + 3008 + 1*4)) = v19 _pqdownheap(tls, s, tree, int32(m_SMALLEST)) } v21 = s + 5304 *(*int32)(unsafe.Pointer(v21))-- v20 = *(*int32)(unsafe.Pointer(v21)) *(*int32)(unsafe.Pointer(s + 3008 + uintptr(v20)*4)) = *(*int32)(unsafe.Pointer(s + 3008 + 1*4)) /* At this point, the fields freq and dad are set. We can now * generate the bit lengths. */ _gen_bitlen(tls, s, desc) /* The field len is now set, we can generate the bit codes */ _gen_codes(tls, tree, max_code, s+2976) } // C documentation // // /* =========================================================================== // * Scan a literal or distance tree to determine the frequencies of the codes // * in the bit length tree. // */ func _scan_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { var count, curlen, max_count, min_count, n, nextlen, prevlen, v2 int32 var p3 uintptr _, _, _, _, _, _, _, _, _ = count, curlen, max_count, min_count, n, nextlen, prevlen, v2, p3 /* iterates over all tree elements */ prevlen = -int32(1) /* length of current code */ nextlen = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + 2))) /* length of next code */ count = 0 /* repeat count of the current code */ max_count = int32(7) /* max repeat count */ min_count = int32(4) /* min repeat count */ if nextlen == 0 { max_count = int32(138) min_count = libc.Int32FromInt32(3) } *(*Tush)(unsafe.Pointer(tree + uintptr(max_code+int32(1))*4 + 2)) = libc.Uint16FromInt32(0xffff) /* guard */ n = 0 for { if !(n <= max_code) { break } curlen = nextlen nextlen = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(n+int32(1))*4 + 2))) count++ v2 = count if v2 < max_count && curlen == nextlen { goto _1 } else { if count < min_count { p3 = s + 2748 + uintptr(curlen)*4 *(*Tush)(unsafe.Pointer(p3)) = Tush(int32(*(*Tush)(unsafe.Pointer(p3))) + count) } else { if curlen != 0 { if curlen != prevlen { *(*Tush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4))++ } *(*Tush)(unsafe.Pointer(s + 2748 + 16*4))++ } else { if count <= int32(10) { *(*Tush)(unsafe.Pointer(s + 2748 + 17*4))++ } else { *(*Tush)(unsafe.Pointer(s + 2748 + 18*4))++ } } } } count = 0 prevlen = curlen if nextlen == 0 { max_count = int32(138) min_count = libc.Int32FromInt32(3) } else { if curlen == nextlen { max_count = int32(6) min_count = libc.Int32FromInt32(3) } else { max_count = int32(7) min_count = libc.Int32FromInt32(4) } } goto _1 _1: ; n++ } } // C documentation // // /* =========================================================================== // * Send a literal or distance tree in compressed form, using the codes in // * bl_tree. // */ func _send_tree(tls *libc.TLS, s uintptr, tree uintptr, max_code int32) { var count, curlen, len1, len11, len2, len3, len4, len5, len6, len7, max_count, min_count, n, nextlen, prevlen, val, val1, val2, val3, val4, val5, val6, val7, v2, v3 int32 var v12, v14, v18, v20, v24, v26, v30, v32, v36, v38, v42, v44, v48, v50, v6, v8 Tulg var v13, v15, v19, v21, v25, v27, v31, v33, v37, v39, v43, v45, v49, v51, v7, v9, p10, p11, p16, p17, p22, p23, p28, p29, p34, p35, p40, p41, p46, p47, p5, p52 uintptr _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = count, curlen, len1, len11, len2, len3, len4, len5, len6, len7, max_count, min_count, n, nextlen, prevlen, val, val1, val2, val3, val4, val5, val6, val7, v12, v13, v14, v15, v18, v19, v2, v20, v21, v24, v25, v26, v27, v3, v30, v31, v32, v33, v36, v37, v38, v39, v42, v43, v44, v45, v48, v49, v50, v51, v6, v7, v8, v9, p10, p11, p16, p17, p22, p23, p28, p29, p34, p35, p40, p41, p46, p47, p5, p52 /* iterates over all tree elements */ prevlen = -int32(1) /* length of current code */ nextlen = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + 2))) /* length of next code */ count = 0 /* repeat count of the current code */ max_count = int32(7) /* max repeat count */ min_count = int32(4) /* min repeat count */ /* tree[max_code + 1].Len = -1; */ /* guard already set */ if nextlen == 0 { max_count = int32(138) min_count = libc.Int32FromInt32(3) } n = 0 for { if !(n <= max_code) { break } curlen = nextlen nextlen = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(tree + uintptr(n+int32(1))*4 + 2))) count++ v2 = count if v2 < max_count && curlen == nextlen { goto _1 } else { if count < min_count { for { len1 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4 + 2))) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len1 { val = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4))) p5 = s + 5936 *(*Tush)(unsafe.Pointer(p5)) = Tush(int32(*(*Tush)(unsafe.Pointer(p5))) | libc.Int32FromUint16(libc.Uint16FromInt32(val))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v7 = s + 40 v6 = *(*Tulg)(unsafe.Pointer(v7)) *(*Tulg)(unsafe.Pointer(v7))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v6))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v9 = s + 40 v8 = *(*Tulg)(unsafe.Pointer(v9)) *(*Tulg)(unsafe.Pointer(v9))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v8))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len1 - int32(m_Buf_size) } else { p10 = s + 5936 *(*Tush)(unsafe.Pointer(p10)) = Tush(int32(*(*Tush)(unsafe.Pointer(p10))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len1 } goto _4 _4: ; count-- v3 = count if !(v3 != 0) { break } } } else { if curlen != 0 { if curlen != prevlen { len11 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4 + 2))) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len11 { val1 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4))) p11 = s + 5936 *(*Tush)(unsafe.Pointer(p11)) = Tush(int32(*(*Tush)(unsafe.Pointer(p11))) | libc.Int32FromUint16(libc.Uint16FromInt32(val1))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v13 = s + 40 v12 = *(*Tulg)(unsafe.Pointer(v13)) *(*Tulg)(unsafe.Pointer(v13))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v12))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v15 = s + 40 v14 = *(*Tulg)(unsafe.Pointer(v15)) *(*Tulg)(unsafe.Pointer(v15))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v14))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val1)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len11 - int32(m_Buf_size) } else { p16 = s + 5936 *(*Tush)(unsafe.Pointer(p16)) = Tush(int32(*(*Tush)(unsafe.Pointer(p16))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + uintptr(curlen)*4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len11 } count-- } len2 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + 16*4 + 2))) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len2 { val2 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + 16*4))) p17 = s + 5936 *(*Tush)(unsafe.Pointer(p17)) = Tush(int32(*(*Tush)(unsafe.Pointer(p17))) | libc.Int32FromUint16(libc.Uint16FromInt32(val2))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v19 = s + 40 v18 = *(*Tulg)(unsafe.Pointer(v19)) *(*Tulg)(unsafe.Pointer(v19))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v18))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v21 = s + 40 v20 = *(*Tulg)(unsafe.Pointer(v21)) *(*Tulg)(unsafe.Pointer(v21))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v20))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val2)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len2 - int32(m_Buf_size) } else { p22 = s + 5936 *(*Tush)(unsafe.Pointer(p22)) = Tush(int32(*(*Tush)(unsafe.Pointer(p22))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + 16*4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len2 } len3 = int32(2) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len3 { val3 = count - int32(3) p23 = s + 5936 *(*Tush)(unsafe.Pointer(p23)) = Tush(int32(*(*Tush)(unsafe.Pointer(p23))) | libc.Int32FromUint16(libc.Uint16FromInt32(val3))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v25 = s + 40 v24 = *(*Tulg)(unsafe.Pointer(v25)) *(*Tulg)(unsafe.Pointer(v25))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v24))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v27 = s + 40 v26 = *(*Tulg)(unsafe.Pointer(v27)) *(*Tulg)(unsafe.Pointer(v27))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v26))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val3)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len3 - int32(m_Buf_size) } else { p28 = s + 5936 *(*Tush)(unsafe.Pointer(p28)) = Tush(int32(*(*Tush)(unsafe.Pointer(p28))) | libc.Int32FromUint16(libc.Uint16FromInt32(count-libc.Int32FromInt32(3)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len3 } } else { if count <= int32(10) { len4 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + 17*4 + 2))) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len4 { val4 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + 17*4))) p29 = s + 5936 *(*Tush)(unsafe.Pointer(p29)) = Tush(int32(*(*Tush)(unsafe.Pointer(p29))) | libc.Int32FromUint16(libc.Uint16FromInt32(val4))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v31 = s + 40 v30 = *(*Tulg)(unsafe.Pointer(v31)) *(*Tulg)(unsafe.Pointer(v31))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v30))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v33 = s + 40 v32 = *(*Tulg)(unsafe.Pointer(v33)) *(*Tulg)(unsafe.Pointer(v33))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v32))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val4)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len4 - int32(m_Buf_size) } else { p34 = s + 5936 *(*Tush)(unsafe.Pointer(p34)) = Tush(int32(*(*Tush)(unsafe.Pointer(p34))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + 17*4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len4 } len5 = int32(3) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len5 { val5 = count - int32(3) p35 = s + 5936 *(*Tush)(unsafe.Pointer(p35)) = Tush(int32(*(*Tush)(unsafe.Pointer(p35))) | libc.Int32FromUint16(libc.Uint16FromInt32(val5))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v37 = s + 40 v36 = *(*Tulg)(unsafe.Pointer(v37)) *(*Tulg)(unsafe.Pointer(v37))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v36))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v39 = s + 40 v38 = *(*Tulg)(unsafe.Pointer(v39)) *(*Tulg)(unsafe.Pointer(v39))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v38))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val5)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len5 - int32(m_Buf_size) } else { p40 = s + 5936 *(*Tush)(unsafe.Pointer(p40)) = Tush(int32(*(*Tush)(unsafe.Pointer(p40))) | libc.Int32FromUint16(libc.Uint16FromInt32(count-libc.Int32FromInt32(3)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len5 } } else { len6 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + 18*4 + 2))) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len6 { val6 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + 18*4))) p41 = s + 5936 *(*Tush)(unsafe.Pointer(p41)) = Tush(int32(*(*Tush)(unsafe.Pointer(p41))) | libc.Int32FromUint16(libc.Uint16FromInt32(val6))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v43 = s + 40 v42 = *(*Tulg)(unsafe.Pointer(v43)) *(*Tulg)(unsafe.Pointer(v43))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v42))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v45 = s + 40 v44 = *(*Tulg)(unsafe.Pointer(v45)) *(*Tulg)(unsafe.Pointer(v45))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v44))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val6)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len6 - int32(m_Buf_size) } else { p46 = s + 5936 *(*Tush)(unsafe.Pointer(p46)) = Tush(int32(*(*Tush)(unsafe.Pointer(p46))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + 18*4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len6 } len7 = int32(7) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len7 { val7 = count - int32(11) p47 = s + 5936 *(*Tush)(unsafe.Pointer(p47)) = Tush(int32(*(*Tush)(unsafe.Pointer(p47))) | libc.Int32FromUint16(libc.Uint16FromInt32(val7))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v49 = s + 40 v48 = *(*Tulg)(unsafe.Pointer(v49)) *(*Tulg)(unsafe.Pointer(v49))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v48))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v51 = s + 40 v50 = *(*Tulg)(unsafe.Pointer(v51)) *(*Tulg)(unsafe.Pointer(v51))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v50))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val7)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len7 - int32(m_Buf_size) } else { p52 = s + 5936 *(*Tush)(unsafe.Pointer(p52)) = Tush(int32(*(*Tush)(unsafe.Pointer(p52))) | libc.Int32FromUint16(libc.Uint16FromInt32(count-libc.Int32FromInt32(11)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len7 } } } } } count = 0 prevlen = curlen if nextlen == 0 { max_count = int32(138) min_count = libc.Int32FromInt32(3) } else { if curlen == nextlen { max_count = int32(6) min_count = libc.Int32FromInt32(3) } else { max_count = int32(7) min_count = libc.Int32FromInt32(4) } } goto _1 _1: ; n++ } } // C documentation // // /* =========================================================================== // * Construct the Huffman tree for the bit lengths and return the index in // * bl_order of the last bit length code to send. // */ func _build_bl_tree(tls *libc.TLS, s uintptr) (r int32) { var max_blindex int32 _ = max_blindex /* index of last bit length code of non zero freq */ /* Determine the bit length frequencies for literal and distance trees */ _scan_tree(tls, s, s+212, (*Tdeflate_state)(unsafe.Pointer(s)).Fl_desc.Fmax_code) _scan_tree(tls, s, s+2504, (*Tdeflate_state)(unsafe.Pointer(s)).Fd_desc.Fmax_code) /* Build the bit length tree: */ _build_tree(tls, s, s+2952) /* opt_len now includes the length of the tree representations, except the * lengths of the bit lengths codes and the 5 + 5 + 4 bits for the counts. */ /* Determine the number of bit length codes to send. The pkzip format * requires that at least 4 bit length codes be sent. (appnote.txt says * 3 but the actual value used is 4.) */ max_blindex = libc.Int32FromInt32(m_BL_CODES) - libc.Int32FromInt32(1) for { if !(max_blindex >= int32(3)) { break } if libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + uintptr(_bl_order[max_blindex])*4 + 2))) != 0 { break } goto _1 _1: ; max_blindex-- } /* Update opt_len to include the bit length tree and counts */ *(*Tulg)(unsafe.Pointer(s + 5912)) += uint64(3)*(libc.Uint64FromInt32(max_blindex)+uint64(1)) + uint64(5) + uint64(5) + uint64(4) return max_blindex } // C documentation // // /* =========================================================================== // * Send the header for a block using dynamic Huffman trees: the counts, the // * lengths of the bit length codes, the literal tree and the distance tree. // * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. // */ func _send_all_trees(tls *libc.TLS, s uintptr, lcodes int32, dcodes int32, blcodes int32) { var len1, len11, len2, len3, rank, val, val1, val2, val3 int32 var v10, v14, v16, v2, v21, v23, v4, v8 Tulg var v11, v15, v17, v22, v24, v3, v5, v9, p1, p12, p13, p18, p20, p25, p6, p7 uintptr _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = len1, len11, len2, len3, rank, val, val1, val2, val3, v10, v11, v14, v15, v16, v17, v2, v21, v22, v23, v24, v3, v4, v5, v8, v9, p1, p12, p13, p18, p20, p25, p6, p7 /* index in bl_order */ len1 = int32(5) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len1 { val = lcodes - int32(257) p1 = s + 5936 *(*Tush)(unsafe.Pointer(p1)) = Tush(int32(*(*Tush)(unsafe.Pointer(p1))) | libc.Int32FromUint16(libc.Uint16FromInt32(val))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v3 = s + 40 v2 = *(*Tulg)(unsafe.Pointer(v3)) *(*Tulg)(unsafe.Pointer(v3))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v2))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v5 = s + 40 v4 = *(*Tulg)(unsafe.Pointer(v5)) *(*Tulg)(unsafe.Pointer(v5))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v4))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len1 - int32(m_Buf_size) } else { p6 = s + 5936 *(*Tush)(unsafe.Pointer(p6)) = Tush(int32(*(*Tush)(unsafe.Pointer(p6))) | libc.Int32FromUint16(libc.Uint16FromInt32(lcodes-libc.Int32FromInt32(257)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len1 } /* not +255 as stated in appnote.txt */ len11 = int32(5) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len11 { val1 = dcodes - int32(1) p7 = s + 5936 *(*Tush)(unsafe.Pointer(p7)) = Tush(int32(*(*Tush)(unsafe.Pointer(p7))) | libc.Int32FromUint16(libc.Uint16FromInt32(val1))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v9 = s + 40 v8 = *(*Tulg)(unsafe.Pointer(v9)) *(*Tulg)(unsafe.Pointer(v9))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v8))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v11 = s + 40 v10 = *(*Tulg)(unsafe.Pointer(v11)) *(*Tulg)(unsafe.Pointer(v11))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v10))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val1)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len11 - int32(m_Buf_size) } else { p12 = s + 5936 *(*Tush)(unsafe.Pointer(p12)) = Tush(int32(*(*Tush)(unsafe.Pointer(p12))) | libc.Int32FromUint16(libc.Uint16FromInt32(dcodes-libc.Int32FromInt32(1)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len11 } len2 = int32(4) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len2 { val2 = blcodes - int32(4) p13 = s + 5936 *(*Tush)(unsafe.Pointer(p13)) = Tush(int32(*(*Tush)(unsafe.Pointer(p13))) | libc.Int32FromUint16(libc.Uint16FromInt32(val2))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v15 = s + 40 v14 = *(*Tulg)(unsafe.Pointer(v15)) *(*Tulg)(unsafe.Pointer(v15))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v14))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v17 = s + 40 v16 = *(*Tulg)(unsafe.Pointer(v17)) *(*Tulg)(unsafe.Pointer(v17))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v16))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val2)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len2 - int32(m_Buf_size) } else { p18 = s + 5936 *(*Tush)(unsafe.Pointer(p18)) = Tush(int32(*(*Tush)(unsafe.Pointer(p18))) | libc.Int32FromUint16(libc.Uint16FromInt32(blcodes-libc.Int32FromInt32(4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len2 } /* not -3 as stated in appnote.txt */ rank = 0 for { if !(rank < blcodes) { break } len3 = int32(3) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len3 { val3 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + uintptr(_bl_order[rank])*4 + 2))) p20 = s + 5936 *(*Tush)(unsafe.Pointer(p20)) = Tush(int32(*(*Tush)(unsafe.Pointer(p20))) | libc.Int32FromUint16(libc.Uint16FromInt32(val3))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v22 = s + 40 v21 = *(*Tulg)(unsafe.Pointer(v22)) *(*Tulg)(unsafe.Pointer(v22))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v21))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v24 = s + 40 v23 = *(*Tulg)(unsafe.Pointer(v24)) *(*Tulg)(unsafe.Pointer(v24))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v23))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val3)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len3 - int32(m_Buf_size) } else { p25 = s + 5936 *(*Tush)(unsafe.Pointer(p25)) = Tush(int32(*(*Tush)(unsafe.Pointer(p25))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 2748 + uintptr(_bl_order[rank])*4 + 2)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len3 } goto _19 _19: ; rank++ } _send_tree(tls, s, s+212, lcodes-int32(1)) /* literal tree */ _send_tree(tls, s, s+2504, dcodes-int32(1)) /* distance tree */ } // C documentation // // /* =========================================================================== // * Send a stored block // */ func x__tr_stored_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Tulg, last int32) { var len1, val int32 var v10, v12, v14, v3, v5, v8, p1, p6 uintptr var v11, v13, v2, v4, v7, v9 Tulg _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = len1, val, v10, v11, v12, v13, v14, v2, v3, v4, v5, v7, v8, v9, p1, p6 len1 = int32(3) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len1 { val = libc.Int32FromInt32(m_STORED_BLOCK)<> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len1 - int32(m_Buf_size) } else { p6 = s + 5936 *(*Tush)(unsafe.Pointer(p6)) = Tush(int32(*(*Tush)(unsafe.Pointer(p6))) | libc.Int32FromUint16(libc.Uint16FromInt32(libc.Int32FromInt32(m_STORED_BLOCK)<> libc.Int32FromInt32(8)) v12 = s + 40 v11 = *(*Tulg)(unsafe.Pointer(v12)) *(*Tulg)(unsafe.Pointer(v12))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v11))) = libc.Uint8FromInt32(libc.Int32FromUint16(uint16(^stored_len)) & libc.Int32FromInt32(0xff)) v14 = s + 40 v13 = *(*Tulg)(unsafe.Pointer(v14)) *(*Tulg)(unsafe.Pointer(v14))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v13))) = libc.Uint8FromInt32(libc.Int32FromUint16(uint16(^stored_len)) >> libc.Int32FromInt32(8)) if stored_len != 0 { libc.X__builtin___memcpy_chk(tls, (*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf+uintptr((*Tdeflate_state)(unsafe.Pointer(s)).Fpending), buf, stored_len, ^t__predefined_size_t(0)) } *(*Tulg)(unsafe.Pointer(s + 40)) += stored_len } // C documentation // // /* =========================================================================== // * Flush the bits in the bit buffer to pending output (leaves at most 7 bits) // */ func x__tr_flush_bits(tls *libc.TLS, s uintptr) { _bi_flush(tls, s) } // C documentation // // /* =========================================================================== // * Send one empty static block to give enough lookahead for inflate. // * This takes 10 bits, of which 7 may remain in the bit buffer. // */ func x__tr_align(tls *libc.TLS, s uintptr) { var len1, len11, val, val1 int32 var v10, v2, v4, v8 Tulg var v11, v3, v5, v9, p1, p12, p6, p7 uintptr _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = len1, len11, val, val1, v10, v11, v2, v3, v4, v5, v8, v9, p1, p12, p6, p7 len1 = int32(3) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len1 { val = libc.Int32FromInt32(m_STATIC_TREES) << libc.Int32FromInt32(1) p1 = s + 5936 *(*Tush)(unsafe.Pointer(p1)) = Tush(int32(*(*Tush)(unsafe.Pointer(p1))) | libc.Int32FromUint16(libc.Uint16FromInt32(val))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v3 = s + 40 v2 = *(*Tulg)(unsafe.Pointer(v3)) *(*Tulg)(unsafe.Pointer(v3))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v2))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v5 = s + 40 v4 = *(*Tulg)(unsafe.Pointer(v5)) *(*Tulg)(unsafe.Pointer(v5))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v4))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len1 - int32(m_Buf_size) } else { p6 = s + 5936 *(*Tush)(unsafe.Pointer(p6)) = Tush(int32(*(*Tush)(unsafe.Pointer(p6))) | libc.Int32FromUint16(libc.Uint16FromInt32(libc.Int32FromInt32(m_STATIC_TREES)< libc.Int32FromInt32(m_Buf_size)-len11 { val1 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(uintptr(unsafe.Pointer(&_static_ltree)) + 256*4))) p7 = s + 5936 *(*Tush)(unsafe.Pointer(p7)) = Tush(int32(*(*Tush)(unsafe.Pointer(p7))) | libc.Int32FromUint16(libc.Uint16FromInt32(val1))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v9 = s + 40 v8 = *(*Tulg)(unsafe.Pointer(v9)) *(*Tulg)(unsafe.Pointer(v9))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v8))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v11 = s + 40 v10 = *(*Tulg)(unsafe.Pointer(v11)) *(*Tulg)(unsafe.Pointer(v11))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v10))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val1)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len11 - int32(m_Buf_size) } else { p12 = s + 5936 *(*Tush)(unsafe.Pointer(p12)) = Tush(int32(*(*Tush)(unsafe.Pointer(p12))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(uintptr(unsafe.Pointer(&_static_ltree)) + 256*4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len11 } _bi_flush(tls, s) } // C documentation // // /* =========================================================================== // * Send the block data compressed using the given Huffman trees // */ func _compress_block(tls *libc.TLS, s uintptr, ltree uintptr, dtree uintptr) { var code, dist, sx, v1, v2, v3 uint32 var extra, lc, len1, len11, len2, len3, len4, len5, val, val1, val2, val3, val4, val5, v22 int32 var v11, v13, v17, v19, v24, v26, v30, v32, v36, v38, v5, v7 Tulg var v12, v14, v18, v20, v25, v27, v31, v33, v37, v39, v6, v8, p10, p15, p16, p21, p23, p28, p29, p34, p35, p4, p40, p9 uintptr _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = code, dist, extra, lc, len1, len11, len2, len3, len4, len5, sx, val, val1, val2, val3, val4, val5, v1, v11, v12, v13, v14, v17, v18, v19, v2, v20, v22, v24, v25, v26, v27, v3, v30, v31, v32, v33, v36, v37, v38, v39, v5, v6, v7, v8, p10, p15, p16, p21, p23, p28, p29, p34, p35, p4, p40, p9 /* match length or unmatched char (if dist == 0) */ sx = uint32(0) /* number of extra bits to send */ if (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next != uint32(0) { for cond := true; cond; cond = sx < (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next { v1 = sx sx++ dist = libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v1)))) & int32(0xff)) v2 = sx sx++ dist += libc.Uint32FromInt32(libc.Int32FromUint8(*(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v2))))&libc.Int32FromInt32(0xff)) << int32(8) v3 = sx sx++ lc = libc.Int32FromUint8(*(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v3)))) if dist == uint32(0) { len1 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(ltree + uintptr(lc)*4 + 2))) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len1 { val = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(ltree + uintptr(lc)*4))) p4 = s + 5936 *(*Tush)(unsafe.Pointer(p4)) = Tush(int32(*(*Tush)(unsafe.Pointer(p4))) | libc.Int32FromUint16(libc.Uint16FromInt32(val))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v6 = s + 40 v5 = *(*Tulg)(unsafe.Pointer(v6)) *(*Tulg)(unsafe.Pointer(v6))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v5))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v8 = s + 40 v7 = *(*Tulg)(unsafe.Pointer(v8)) *(*Tulg)(unsafe.Pointer(v8))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v7))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len1 - int32(m_Buf_size) } else { p9 = s + 5936 *(*Tush)(unsafe.Pointer(p9)) = Tush(int32(*(*Tush)(unsafe.Pointer(p9))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(ltree + uintptr(lc)*4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len1 } /* send a literal byte */ } else { /* Here, lc is the match length - MIN_MATCH */ code = uint32(x__length_code[lc]) len11 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(ltree + uintptr(code+uint32(m_LITERALS)+uint32(1))*4 + 2))) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len11 { val1 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(ltree + uintptr(code+uint32(m_LITERALS)+uint32(1))*4))) p10 = s + 5936 *(*Tush)(unsafe.Pointer(p10)) = Tush(int32(*(*Tush)(unsafe.Pointer(p10))) | libc.Int32FromUint16(libc.Uint16FromInt32(val1))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v12 = s + 40 v11 = *(*Tulg)(unsafe.Pointer(v12)) *(*Tulg)(unsafe.Pointer(v12))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v11))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v14 = s + 40 v13 = *(*Tulg)(unsafe.Pointer(v14)) *(*Tulg)(unsafe.Pointer(v14))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v13))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val1)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len11 - int32(m_Buf_size) } else { p15 = s + 5936 *(*Tush)(unsafe.Pointer(p15)) = Tush(int32(*(*Tush)(unsafe.Pointer(p15))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(ltree + uintptr(code+uint32(m_LITERALS)+uint32(1))*4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len11 } /* send length code */ extra = _extra_lbits[code] if extra != 0 { lc -= _base_length[code] len2 = extra if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len2 { val2 = lc p16 = s + 5936 *(*Tush)(unsafe.Pointer(p16)) = Tush(int32(*(*Tush)(unsafe.Pointer(p16))) | libc.Int32FromUint16(libc.Uint16FromInt32(val2))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v18 = s + 40 v17 = *(*Tulg)(unsafe.Pointer(v18)) *(*Tulg)(unsafe.Pointer(v18))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v17))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v20 = s + 40 v19 = *(*Tulg)(unsafe.Pointer(v20)) *(*Tulg)(unsafe.Pointer(v20))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v19))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val2)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len2 - int32(m_Buf_size) } else { p21 = s + 5936 *(*Tush)(unsafe.Pointer(p21)) = Tush(int32(*(*Tush)(unsafe.Pointer(p21))) | libc.Int32FromUint16(libc.Uint16FromInt32(lc))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len2 } /* send the extra length bits */ } dist-- /* dist is now the match distance - 1 */ if dist < uint32(256) { v22 = libc.Int32FromUint8(x__dist_code[dist]) } else { v22 = libc.Int32FromUint8(x__dist_code[uint32(256)+dist>>int32(7)]) } code = libc.Uint32FromInt32(v22) len3 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(dtree + uintptr(code)*4 + 2))) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len3 { val3 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(dtree + uintptr(code)*4))) p23 = s + 5936 *(*Tush)(unsafe.Pointer(p23)) = Tush(int32(*(*Tush)(unsafe.Pointer(p23))) | libc.Int32FromUint16(libc.Uint16FromInt32(val3))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v25 = s + 40 v24 = *(*Tulg)(unsafe.Pointer(v25)) *(*Tulg)(unsafe.Pointer(v25))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v24))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v27 = s + 40 v26 = *(*Tulg)(unsafe.Pointer(v27)) *(*Tulg)(unsafe.Pointer(v27))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v26))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val3)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len3 - int32(m_Buf_size) } else { p28 = s + 5936 *(*Tush)(unsafe.Pointer(p28)) = Tush(int32(*(*Tush)(unsafe.Pointer(p28))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(dtree + uintptr(code)*4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len3 } /* send the distance code */ extra = _extra_dbits[code] if extra != 0 { dist -= libc.Uint32FromInt32(_base_dist[code]) len4 = extra if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len4 { val4 = libc.Int32FromUint32(dist) p29 = s + 5936 *(*Tush)(unsafe.Pointer(p29)) = Tush(int32(*(*Tush)(unsafe.Pointer(p29))) | libc.Int32FromUint16(libc.Uint16FromInt32(val4))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v31 = s + 40 v30 = *(*Tulg)(unsafe.Pointer(v31)) *(*Tulg)(unsafe.Pointer(v31))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v30))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v33 = s + 40 v32 = *(*Tulg)(unsafe.Pointer(v33)) *(*Tulg)(unsafe.Pointer(v33))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v32))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val4)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len4 - int32(m_Buf_size) } else { p34 = s + 5936 *(*Tush)(unsafe.Pointer(p34)) = Tush(int32(*(*Tush)(unsafe.Pointer(p34))) | libc.Int32FromUint16(uint16(dist))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len4 } /* send the extra distance bits */ } } /* literal or match pair ? */ /* Check for no overlay of pending_buf on needed symbols */ } } len5 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(ltree + 256*4 + 2))) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len5 { val5 = libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(ltree + 256*4))) p35 = s + 5936 *(*Tush)(unsafe.Pointer(p35)) = Tush(int32(*(*Tush)(unsafe.Pointer(p35))) | libc.Int32FromUint16(libc.Uint16FromInt32(val5))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) v37 = s + 40 v36 = *(*Tulg)(unsafe.Pointer(v37)) *(*Tulg)(unsafe.Pointer(v37))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v36))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) & libc.Int32FromInt32(0xff)) v39 = s + 40 v38 = *(*Tulg)(unsafe.Pointer(v39)) *(*Tulg)(unsafe.Pointer(v39))++ *(*TBytef)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(v38))) = libc.Uint8FromInt32(libc.Int32FromUint16((*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf) >> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val5)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len5 - int32(m_Buf_size) } else { p40 = s + 5936 *(*Tush)(unsafe.Pointer(p40)) = Tush(int32(*(*Tush)(unsafe.Pointer(p40))) | libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(ltree + 256*4)))<<(*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid) *(*int32)(unsafe.Pointer(s + 5940)) += len5 } } // C documentation // // /* =========================================================================== // * Check if the data type is TEXT or BINARY, using the following algorithm: // * - TEXT if the two conditions below are satisfied: // * a) There are no non-portable control characters belonging to the // * "block list" (0..6, 14..25, 28..31). // * b) There is at least one printable character belonging to the // * "allow list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). // * - BINARY otherwise. // * - The following partially-portable control characters form a // * "gray list" that is ignored in this detection algorithm: // * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). // * IN assertion: the fields Freq of dyn_ltree are set. // */ func _detect_data_type(tls *libc.TLS, s uintptr) (r int32) { var block_mask uint64 var n int32 _, _ = block_mask, n /* block_mask is the bit mask of block-listed bytes * set bits 0..6, 14..25, and 28..31 * 0xf3ffc07f = binary 11110011111111111100000001111111 */ block_mask = uint64(0xf3ffc07f) /* Check for non-textual ("block-listed") bytes. */ n = 0 for { if !(n <= int32(31)) { break } if block_mask&uint64(1) != 0 && libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 212 + uintptr(n)*4))) != 0 { return m_Z_BINARY } goto _1 _1: ; n++ block_mask >>= uint64(1) } /* Check for textual ("allow-listed") bytes. */ if libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 212 + 9*4))) != 0 || libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 212 + 10*4))) != 0 || libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 212 + 13*4))) != 0 { return int32(m_Z_TEXT) } n = int32(32) for { if !(n < int32(m_LITERALS)) { break } if libc.Int32FromUint16(*(*Tush)(unsafe.Pointer(s + 212 + uintptr(n)*4))) != 0 { return int32(m_Z_TEXT) } goto _2 _2: ; n++ } /* There are no "block-listed" or "allow-listed" bytes: * this stream either is empty or has tolerated ("gray-listed") bytes only. */ return m_Z_BINARY } // C documentation // // /* =========================================================================== // * Determine the best encoding for the current block: dynamic trees, static // * trees or store, and write out the encoded block. // */ func x__tr_flush_block(tls *libc.TLS, s uintptr, buf uintptr, stored_len Tulg, last int32) { var len1, len11, max_blindex, val, val1 int32 var opt_lenb, static_lenb, v1, v11, v3, v5, v9 Tulg var v10, v12, v4, v6, p13, p2, p7, p8 uintptr _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = len1, len11, max_blindex, opt_lenb, static_lenb, val, val1, v1, v10, v11, v12, v3, v4, v5, v6, v9, p13, p2, p7, p8 /* opt_len and static_len in bytes */ max_blindex = 0 /* index of last bit length code of non zero freq */ /* Build the Huffman trees unless a stored block is forced */ if (*Tdeflate_state)(unsafe.Pointer(s)).Flevel > 0 { /* Check if the file is binary or text */ if (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type == int32(m_Z_UNKNOWN) { (*Tz_stream)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fstrm)).Fdata_type = _detect_data_type(tls, s) } /* Construct the literal and distance trees */ _build_tree(tls, s, s+2904) _build_tree(tls, s, s+2928) /* At this point, opt_len and static_len are the total bit lengths of * the compressed block data, excluding the tree representations. */ /* Build the bit length tree for the above two trees, and get the index * in bl_order of the last bit length code to send. */ max_blindex = _build_bl_tree(tls, s) /* Determine the best encoding. Compute the block lengths in bytes. */ opt_lenb = ((*Tdeflate_state)(unsafe.Pointer(s)).Fopt_len + uint64(3) + uint64(7)) >> int32(3) static_lenb = ((*Tdeflate_state)(unsafe.Pointer(s)).Fstatic_len + uint64(3) + uint64(7)) >> int32(3) if static_lenb <= opt_lenb || (*Tdeflate_state)(unsafe.Pointer(s)).Fstrategy == int32(m_Z_FIXED) { opt_lenb = static_lenb } } else { v1 = stored_len + libc.Uint64FromInt32(5) static_lenb = v1 opt_lenb = v1 /* force a stored block */ } if stored_len+uint64(4) <= opt_lenb && buf != libc.UintptrFromInt32(0) { /* 4: two words for the lengths */ /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. * Otherwise we can't have processed more than WSIZE input bytes since * the last block flush, because compression would have been * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to * transform a block into a stored block. */ x__tr_stored_block(tls, s, buf, stored_len, last) } else { if static_lenb == opt_lenb { len1 = int32(3) if (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid > libc.Int32FromInt32(m_Buf_size)-len1 { val = libc.Int32FromInt32(m_STATIC_TREES)<> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len1 - int32(m_Buf_size) } else { p7 = s + 5936 *(*Tush)(unsafe.Pointer(p7)) = Tush(int32(*(*Tush)(unsafe.Pointer(p7))) | libc.Int32FromUint16(libc.Uint16FromInt32(libc.Int32FromInt32(m_STATIC_TREES)< libc.Int32FromInt32(m_Buf_size)-len11 { val1 = libc.Int32FromInt32(m_DYN_TREES)<> libc.Int32FromInt32(8)) (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_buf = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32(val1)) >> (int32(m_Buf_size) - (*Tdeflate_state)(unsafe.Pointer(s)).Fbi_valid)) *(*int32)(unsafe.Pointer(s + 5940)) += len11 - int32(m_Buf_size) } else { p13 = s + 5936 *(*Tush)(unsafe.Pointer(p13)) = Tush(int32(*(*Tush)(unsafe.Pointer(p13))) | libc.Int32FromUint16(libc.Uint16FromInt32(libc.Int32FromInt32(m_DYN_TREES)<> libc.Int32FromInt32(8)) v6 = s + 5900 v5 = *(*TuInt)(unsafe.Pointer(v6)) *(*TuInt)(unsafe.Pointer(v6))++ *(*Tuchf)(unsafe.Pointer((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_buf + uintptr(v5))) = uint8(lc) if dist == uint32(0) { /* lc is the unmatched char */ *(*Tush)(unsafe.Pointer(s + 212 + uintptr(lc)*4))++ } else { (*Tdeflate_state)(unsafe.Pointer(s)).Fmatches++ /* Here, lc is the match length - MIN_MATCH */ dist-- /* dist = match distance - 1 */ *(*Tush)(unsafe.Pointer(s + 212 + uintptr(libc.Int32FromUint8(x__length_code[lc])+int32(m_LITERALS)+int32(1))*4))++ if dist < uint32(256) { v7 = libc.Int32FromUint8(x__dist_code[dist]) } else { v7 = libc.Int32FromUint8(x__dist_code[uint32(256)+dist>>int32(7)]) } *(*Tush)(unsafe.Pointer(s + 2504 + uintptr(v7)*4))++ } return libc.BoolInt32((*Tdeflate_state)(unsafe.Pointer(s)).Fsym_next == (*Tdeflate_state)(unsafe.Pointer(s)).Fsym_end) } const m_ATTRIBUTION_NAME_MAX = 255 const m_AT_EACCESS = 0x0010 const m_AT_FDONLY = 0x0400 const m_AT_REALDEV = 0x0200 const m_AT_REMOVEDIR = 0x0080 const m_AT_SYMLINK_FOLLOW = 0x0040 const m_AT_SYMLINK_NOFOLLOW = 0x0020 const m_AT_SYMLINK_NOFOLLOW_ANY = 0x0800 const m_BUFSIZ = 1024 const m_COPY = 1 const m_CPF_IGNORE_MODE = 0x0002 const m_CPF_OVERWRITE = 0x0001 const m_E2BIG = 7 const m_EACCES = 13 const m_EADDRINUSE = 48 const m_EADDRNOTAVAIL = 49 const m_EAFNOSUPPORT = 47 const m_EAGAIN = 35 const m_EALREADY = 37 const m_EAUTH = 80 const m_EBADARCH = 86 const m_EBADEXEC = 85 const m_EBADF = 9 const m_EBADMACHO = 88 const m_EBADMSG = 94 const m_EBADRPC = 72 const m_EBUSY = 16 const m_ECANCELED = 89 const m_ECHILD = 10 const m_ECONNABORTED = 53 const m_ECONNREFUSED = 61 const m_ECONNRESET = 54 const m_EDEADLK = 11 const m_EDESTADDRREQ = 39 const m_EDEVERR = 83 const m_EDOM = 33 const m_EDQUOT = 69 const m_EEXIST = 17 const m_EFAULT = 14 const m_EFBIG = 27 const m_EFTYPE = 79 const m_EHOSTDOWN = 64 const m_EHOSTUNREACH = 65 const m_EIDRM = 90 const m_EILSEQ = 92 const m_EINPROGRESS = 36 const m_EINTR = 4 const m_EINVAL = 22 const m_EIO = 5 const m_EISCONN = 56 const m_EISDIR = 21 const m_ELAST = 106 const m_ELOOP = 62 const m_EMFILE = 24 const m_EMLINK = 31 const m_EMSGSIZE = 40 const m_EMULTIHOP = 95 const m_ENAMETOOLONG = 63 const m_ENEEDAUTH = 81 const m_ENETDOWN = 50 const m_ENETRESET = 52 const m_ENETUNREACH = 51 const m_ENFILE = 23 const m_ENOATTR = 93 const m_ENOBUFS = 55 const m_ENODATA = 96 const m_ENODEV = 19 const m_ENOENT = 2 const m_ENOEXEC = 8 const m_ENOLCK = 77 const m_ENOLINK = 97 const m_ENOMEM = 12 const m_ENOMSG = 91 const m_ENOPOLICY = 103 const m_ENOPROTOOPT = 42 const m_ENOSPC = 28 const m_ENOSR = 98 const m_ENOSTR = 99 const m_ENOSYS = 78 const m_ENOTBLK = 15 const m_ENOTCONN = 57 const m_ENOTDIR = 20 const m_ENOTEMPTY = 66 const m_ENOTRECOVERABLE = 104 const m_ENOTSOCK = 38 const m_ENOTSUP = 45 const m_ENOTTY = 25 const m_ENXIO = 6 const m_EOPNOTSUPP = 102 const m_EOVERFLOW = 84 const m_EOWNERDEAD = 105 const m_EPERM = 1 const m_EPFNOSUPPORT = 46 const m_EPIPE = 32 const m_EPROCLIM = 67 const m_EPROCUNAVAIL = 76 const m_EPROGMISMATCH = 75 const m_EPROGUNAVAIL = 74 const m_EPROTO = 100 const m_EPROTONOSUPPORT = 43 const m_EPROTOTYPE = 41 const m_EPWROFF = 82 const m_EQFULL = 106 const m_ERANGE = 34 const m_EREMOTE = 71 const m_EROFS = 30 const m_ERPCMISMATCH = 73 const m_ESHLIBVERS = 87 const m_ESHUTDOWN = 58 const m_ESOCKTNOSUPPORT = 44 const m_ESPIPE = 29 const m_ESRCH = 3 const m_ESTALE = 70 const m_ETIME = 101 const m_ETIMEDOUT = 60 const m_ETOOMANYREFS = 59 const m_ETXTBSY = 26 const m_EUSERS = 68 const m_EWOULDBLOCK = "EAGAIN" const m_EXDEV = 18 const m_FAPPEND = "O_APPEND" const m_FASYNC = "O_ASYNC" const m_FCNTL_FS_SPECIFIC_BASE = 0x00010000 const m_FD_CLOEXEC = 1 const m_FFDSYNC = "O_DSYNC" const m_FFSYNC = "O_FSYNC" const m_FILENAME_MAX = 1024 const m_FILESEC_GUID = "FILESEC_UUID" const m_FNDELAY = "O_NONBLOCK" const m_FNONBLOCK = "O_NONBLOCK" const m_FOPEN_MAX = 20 const m_FREAD = 0x00000001 const m_FWRITE = 0x00000002 const m_F_ADDFILESIGS = 61 const m_F_ADDFILESIGS_FOR_DYLD_SIM = 83 const m_F_ADDFILESIGS_INFO = 103 const m_F_ADDFILESIGS_RETURN = 97 const m_F_ADDFILESUPPL = 104 const m_F_ADDSIGS = 59 const m_F_ADDSIGS_MAIN_BINARY = 113 const m_F_ALLOCATEALL = 0x00000004 const m_F_ALLOCATECONTIG = 0x00000002 const m_F_ALLOCATEPERSIST = 0x00000008 const m_F_ATTRIBUTION_TAG = 111 const m_F_BARRIERFSYNC = 85 const m_F_CHECK_LV = 98 const m_F_CHKCLEAN = 41 const m_F_CREATE_TAG = 0x00000001 const m_F_DELETE_TAG = 0x00000002 const m_F_DUPFD = 0 const m_F_DUPFD_CLOEXEC = 67 const m_F_FINDSIGS = 78 const m_F_FLUSH_DATA = 40 const m_F_FREEZE_FS = 53 const m_F_FULLFSYNC = 51 const m_F_GETCODEDIR = 72 const m_F_GETFD = 1 const m_F_GETFL = 3 const m_F_GETLEASE = 107 const m_F_GETLK = 7 const m_F_GETLKPID = 66 const m_F_GETNOSIGPIPE = 74 const m_F_GETOWN = 5 const m_F_GETPATH = 50 const m_F_GETPATH_MTMINFO = 71 const m_F_GETPATH_NOFIRMLINK = 102 const m_F_GETPROTECTIONCLASS = 63 const m_F_GETPROTECTIONLEVEL = 77 const m_F_GETSIGSINFO = 105 const m_F_GLOBAL_NOCACHE = 55 const m_F_LOG2PHYS = 49 const m_F_LOG2PHYS_EXT = 65 const m_F_NOCACHE = 48 const m_F_NODIRECT = 62 const m_F_OFD_GETLK = 92 const m_F_OFD_SETLK = 90 const m_F_OFD_SETLKW = 91 const m_F_OFD_SETLKWTIMEOUT = 93 const m_F_PATHPKG_CHECK = 52 const m_F_PEOFPOSMODE = 3 const m_F_PREALLOCATE = 42 const m_F_PUNCHHOLE = 99 const m_F_QUERY_TAG = 0x00000004 const m_F_RDADVISE = 44 const m_F_RDAHEAD = 45 const m_F_RDLCK = 1 const m_F_SETBACKINGSTORE = 70 const m_F_SETFD = 2 const m_F_SETFL = 4 const m_F_SETLEASE = 106 const m_F_SETLK = 8 const m_F_SETLKW = 9 const m_F_SETLKWTIMEOUT = 10 const m_F_SETNOSIGPIPE = 73 const m_F_SETOWN = 6 const m_F_SETPROTECTIONCLASS = 64 const m_F_SETSIZE = 43 const m_F_SINGLE_WRITER = 76 const m_F_SPECULATIVE_READ = 101 const m_F_THAW_FS = 54 const m_F_TRANSCODEKEY = 75 const m_F_TRANSFEREXTENTS = 110 const m_F_TRIM_ACTIVE_FILE = 100 const m_F_UNLCK = 2 const m_F_VOLPOSMODE = 4 const m_F_WRLCK = 3 const m_GETSIGSINFO_PLATFORM_BINARY = 1 const m_GZBUFSIZE = 8192 const m_GZIP = 2 const m_GZ_APPEND = 1 const m_GZ_NONE = 0 const m_GZ_READ = 7247 const m_GZ_WRITE = 31153 const m_LOCK_EX = 0x02 const m_LOCK_NB = 0x04 const m_LOCK_SH = 0x01 const m_LOCK_UN = 0x08 const m_LOOK = 0 const m_L_tmpnam = 1024 const m_O_ACCMODE = 0x0003 const m_O_ALERT = 0x20000000 const m_O_APPEND = 0x00000008 const m_O_ASYNC = 0x00000040 const m_O_CLOEXEC = 0x01000000 const m_O_CREAT = 0x00000200 const m_O_DIRECTORY = 0x00100000 const m_O_DP_AUTHENTICATE = 0x0004 const m_O_DP_GETRAWENCRYPTED = 0x0001 const m_O_DP_GETRAWUNENCRYPTED = 0x0002 const m_O_DSYNC = 0x400000 const m_O_EVTONLY = 0x00008000 const m_O_EXCL = 0x00000800 const m_O_EXEC = 0x40000000 const m_O_EXLOCK = 0x00000020 const m_O_FSYNC = "O_SYNC" const m_O_NDELAY = "O_NONBLOCK" const m_O_NOCTTY = 0x00020000 const m_O_NOFOLLOW = 0x00000100 const m_O_NOFOLLOW_ANY = 0x20000000 const m_O_NONBLOCK = 0x00000004 const m_O_POPUP = 0x80000000 const m_O_RDONLY = 0x0000 const m_O_RDWR = 0x0002 const m_O_RESOLVE_BENEATH = 0x00001000 const m_O_SHLOCK = 0x00000010 const m_O_SYMLINK = 0x00200000 const m_O_SYNC = 0x0080 const m_O_TRUNC = 0x00000400 const m_O_WRONLY = 0x0001 const m_P_tmpdir = "/var/tmp/" const m_RENAME_EXCL = 0x00000004 const m_RENAME_NOFOLLOW_ANY = 0x00000010 const m_RENAME_RESERVED1 = 0x00000008 const m_RENAME_SECLUDE = 0x00000001 const m_RENAME_SWAP = 0x00000002 const m_S_IEXEC = "S_IXUSR" const m_S_IFBLK = 0060000 const m_S_IFCHR = 0020000 const m_S_IFDIR = 0040000 const m_S_IFIFO = 0010000 const m_S_IFLNK = 0120000 const m_S_IFMT = 0170000 const m_S_IFREG = 0100000 const m_S_IFSOCK = 0140000 const m_S_IFWHT = 0160000 const m_S_IREAD = "S_IRUSR" const m_S_IRGRP = 0000040 const m_S_IROTH = 0000004 const m_S_IRUSR = 0000400 const m_S_IRWXG = 0000070 const m_S_IRWXO = 0000007 const m_S_IRWXU = 0000700 const m_S_ISGID = 0002000 const m_S_ISTXT = "S_ISVTX" const m_S_ISUID = 0004000 const m_S_ISVTX = 0001000 const m_S_IWGRP = 0000020 const m_S_IWOTH = 0000002 const m_S_IWRITE = "S_IWUSR" const m_S_IWUSR = 0000200 const m_S_IXGRP = 0000010 const m_S_IXOTH = 0000001 const m_S_IXUSR = 0000100 const m_TMP_MAX = 308915776 const m_USER_FSIGNATURES_CDHASH_LEN = 20 const m__IOFBF = 0 const m__IOLBF = 1 const m__IONBF = 2 const m___SALC = 0x4000 const m___SAPP = 0x0100 const m___SEOF = 0x0020 const m___SERR = 0x0040 const m___SIGN = 0x8000 const m___SLBF = 0x0001 const m___SMBF = 0x0080 const m___SMOD = 0x2000 const m___SNBF = 0x0002 const m___SNPT = 0x0800 const m___SOFF = 0x1000 const m___SOPT = 0x0400 const m___SRD = 0x0004 const m___SRW = 0x0010 const m___SSTR = 0x0200 const m___SWR = 0x0008 const m_stderr = "__stderrp" const m_stdin = "__stdinp" const m_stdout = "__stdoutp" type Tfpos_t = int64 type t__sbuf = struct { F_base uintptr F_size int32 } type TFILE = struct { F_p uintptr F_r int32 F_w int32 F_flags int16 F_file int16 F_bf t__sbuf F_lbfsize int32 F_cookie uintptr F_close uintptr F_read uintptr F_seek uintptr F_write uintptr F_ub t__sbuf F_extra uintptr F_ur int32 F_ubuf [3]uint8 F_nbuf [1]uint8 F_lb t__sbuf F_blksize int32 F_offset Tfpos_t } type t__sFILE = TFILE type Tflock = struct { Fl_start Toff_t Fl_len Toff_t Fl_pid Tpid_t Fl_type int16 Fl_whence int16 } type Tflocktimeout = struct { Ffl Tflock Ftimeout Ttimespec } type Tradvisory = struct { Fra_offset Toff_t Fra_count int32 } type Tfsignatures_t = struct { Ffs_file_start Toff_t Ffs_blob_start uintptr Ffs_blob_size Tsize_t Ffs_fsignatures_size Tsize_t Ffs_cdhash [20]int8 Ffs_hash_type int32 } type Tfsignatures = Tfsignatures_t type Tfsupplement_t = struct { Ffs_file_start Toff_t Ffs_blob_start Toff_t Ffs_blob_size Tsize_t Ffs_orig_fd int32 } type Tfsupplement = Tfsupplement_t type Tfchecklv_t = struct { Flv_file_start Toff_t Flv_error_message_size Tsize_t Flv_error_message uintptr } type Tfchecklv = Tfchecklv_t type Tfgetsigsinfo_t = struct { Ffg_file_start Toff_t Ffg_info_request int32 Ffg_sig_is_platform int32 } type Tfgetsigsinfo = Tfgetsigsinfo_t type Tfstore_t = struct { Ffst_flags uint32 Ffst_posmode int32 Ffst_offset Toff_t Ffst_length Toff_t Ffst_bytesalloc Toff_t } type Tfstore = Tfstore_t type Tfpunchhole_t = struct { Ffp_flags uint32 Freserved uint32 Ffp_offset Toff_t Ffp_length Toff_t } type Tfpunchhole = Tfpunchhole_t type Tftrimactivefile_t = struct { Ffta_offset Toff_t Ffta_length Toff_t } type Tftrimactivefile = Tftrimactivefile_t type Tfspecread_t = struct { Ffsr_flags uint32 Freserved uint32 Ffsr_offset Toff_t Ffsr_length Toff_t } type Tfspecread = Tfspecread_t type Tfattributiontag_t = struct { Fft_flags uint32 Fft_hash uint64 Fft_attribution_name [255]int8 } type Tfattributiontag = Tfattributiontag_t type Tlog2phys = struct { Fl2p_flags uint32 Fl2p_contigbytes Toff_t Fl2p_devoffset Toff_t } type Tfilesec_t = uintptr type Tfilesec_property_t = int32 const _FILESEC_OWNER = 1 const _FILESEC_GROUP = 2 const _FILESEC_UUID = 3 const _FILESEC_MODE = 4 const _FILESEC_ACL = 5 const _FILESEC_GRPUUID = 6 const _FILESEC_ACL_RAW = 100 const _FILESEC_ACL_ALLOCSIZE = 101 type Tgz_state = struct { Fx TgzFile_s Fmode int32 Ffd int32 Fpath uintptr Fsize uint32 Fwant uint32 Fin uintptr Fout uintptr Fdirect int32 Fhow int32 Fstart Toff_t Feof int32 Fpast int32 Flevel int32 Fstrategy int32 Freset int32 Fskip Toff_t Fseek int32 Ferr int32 Fmsg uintptr Fstrm Tz_stream } type Tgz_statep = uintptr func XzlibVersion(tls *libc.TLS) (r uintptr) { return __ccgo_ts } func XzlibCompileFlags(tls *libc.TLS) (r TuLong) { var flags TuLong _ = flags flags = uint64(0) switch libc.Int32FromUint64(libc.Uint64FromInt64(4)) { case int32(2): case int32(4): flags += uint64(1) case int32(8): flags += uint64(2) default: flags += uint64(3) } switch libc.Int32FromUint64(libc.Uint64FromInt64(8)) { case int32(2): case int32(4): flags += libc.Uint64FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(2)) case int32(8): flags += libc.Uint64FromInt32(libc.Int32FromInt32(2) << libc.Int32FromInt32(2)) default: flags += libc.Uint64FromInt32(libc.Int32FromInt32(3) << libc.Int32FromInt32(2)) } switch libc.Int32FromUint64(libc.Uint64FromInt64(8)) { case int32(2): case int32(4): flags += libc.Uint64FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(4)) case int32(8): flags += libc.Uint64FromInt32(libc.Int32FromInt32(2) << libc.Int32FromInt32(4)) default: flags += libc.Uint64FromInt32(libc.Int32FromInt32(3) << libc.Int32FromInt32(4)) } switch libc.Int32FromUint64(libc.Uint64FromInt64(8)) { case int32(2): case int32(4): flags += libc.Uint64FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(6)) case int32(8): flags += libc.Uint64FromInt32(libc.Int32FromInt32(2) << libc.Int32FromInt32(6)) default: flags += libc.Uint64FromInt32(libc.Int32FromInt32(3) << libc.Int32FromInt32(6)) } /* #if defined(ASMV) || defined(ASMINF) flags += 1 << 9; #endif */ return flags } // C documentation // // /* exported to allow conversion of error code to string for compress() and // * uncompress() // */ func XzError(tls *libc.TLS, err int32) (r uintptr) { var v1 int32 _ = v1 if err < -int32(6) || err > int32(2) { v1 = int32(9) } else { v1 = int32(2) - err } return Xz_errmsg[v1] } func Xzcalloc(tls *libc.TLS, opaque Tvoidpf, items uint32, size uint32) (r Tvoidpf) { _ = opaque return libc.Xmalloc(tls, uint64(items*size)) } func Xzcfree(tls *libc.TLS, opaque Tvoidpf, ptr Tvoidpf) { _ = opaque libc.Xfree(tls, ptr) } // C documentation // // /* =========================================================================== // Compresses the source buffer into the destination buffer. The level // parameter has the same meaning as in deflateInit. sourceLen is the byte // length of the source buffer. Upon entry, destLen is the total size of the // destination buffer, which must be at least 0.1% larger than sourceLen plus // 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. // // compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough // memory, Z_BUF_ERROR if there was not enough room in the output buffer, // Z_STREAM_ERROR if the level parameter is invalid. // */ func Xcompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen TuLong, level int32) (r int32) { bp := tls.Alloc(112) defer tls.Free(112) var err, v3, v4 int32 var left TuLong var max TuInt var v1, v2 uint32 var _ /* stream at bp+0 */ Tz_stream _, _, _, _, _, _, _ = err, left, max, v1, v2, v3, v4 max = libc.Uint32FromInt32(-libc.Int32FromInt32(1)) left = *(*TuLongf)(unsafe.Pointer(destLen)) *(*TuLongf)(unsafe.Pointer(destLen)) = uint64(0) (*(*Tz_stream)(unsafe.Pointer(bp))).Fzalloc = libc.UintptrFromInt32(0) (*(*Tz_stream)(unsafe.Pointer(bp))).Fzfree = libc.UintptrFromInt32(0) (*(*Tz_stream)(unsafe.Pointer(bp))).Fopaque = libc.UintptrFromInt32(0) err = XdeflateInit_(tls, bp, level, __ccgo_ts, libc.Int32FromInt64(112)) if err != m_Z_OK { return err } (*(*Tz_stream)(unsafe.Pointer(bp))).Fnext_out = dest (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_out = uint32(0) (*(*Tz_stream)(unsafe.Pointer(bp))).Fnext_in = source (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_in = uint32(0) for cond := true; cond; cond = err == m_Z_OK { if (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_out == uint32(0) { if left > uint64(max) { v1 = max } else { v1 = uint32(left) } (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_out = v1 left -= uint64((*(*Tz_stream)(unsafe.Pointer(bp))).Favail_out) } if (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_in == uint32(0) { if sourceLen > uint64(max) { v2 = max } else { v2 = uint32(sourceLen) } (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_in = v2 sourceLen -= uint64((*(*Tz_stream)(unsafe.Pointer(bp))).Favail_in) } if sourceLen != 0 { v3 = m_Z_NO_FLUSH } else { v3 = int32(m_Z_FINISH) } err = Xdeflate(tls, bp, v3) } *(*TuLongf)(unsafe.Pointer(destLen)) = (*(*Tz_stream)(unsafe.Pointer(bp))).Ftotal_out XdeflateEnd(tls, bp) if err == int32(m_Z_STREAM_END) { v4 = m_Z_OK } else { v4 = err } return v4 } // C documentation // // /* =========================================================================== // */ func Xcompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen TuLong) (r int32) { return Xcompress2(tls, dest, destLen, source, sourceLen, -int32(1)) } // C documentation // // /* =========================================================================== // If the default memLevel or windowBits for deflateInit() is changed, then // this function needs to be updated. // */ func XcompressBound(tls *libc.TLS, sourceLen TuLong) (r TuLong) { return sourceLen + sourceLen>>libc.Int32FromInt32(12) + sourceLen>>libc.Int32FromInt32(14) + sourceLen>>libc.Int32FromInt32(25) + uint64(13) } // C documentation // // /* =========================================================================== // Decompresses the source buffer into the destination buffer. *sourceLen is // the byte length of the source buffer. Upon entry, *destLen is the total size // of the destination buffer, which must be large enough to hold the entire // uncompressed data. (The size of the uncompressed data must have been saved // previously by the compressor and transmitted to the decompressor by some // mechanism outside the scope of this compression library.) Upon exit, // *destLen is the size of the decompressed data and *sourceLen is the number // of source bytes consumed. Upon return, source + *sourceLen points to the // first unused input byte. // // uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough // memory, Z_BUF_ERROR if there was not enough room in the output buffer, or // Z_DATA_ERROR if the input data was corrupted, including if the input data is // an incomplete zlib stream. // */ func Xuncompress2(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, sourceLen uintptr) (r int32) { bp := tls.Alloc(128) defer tls.Free(128) var err, v3, v4, v5 int32 var left, len1 TuLong var max TuInt var v1, v2 uint32 var _ /* buf at bp+112 */ [1]TByte var _ /* stream at bp+0 */ Tz_stream _, _, _, _, _, _, _, _, _ = err, left, len1, max, v1, v2, v3, v4, v5 max = libc.Uint32FromInt32(-libc.Int32FromInt32(1)) /* for detection of incomplete stream when *destLen == 0 */ len1 = *(*TuLong)(unsafe.Pointer(sourceLen)) if *(*TuLongf)(unsafe.Pointer(destLen)) != 0 { left = *(*TuLongf)(unsafe.Pointer(destLen)) *(*TuLongf)(unsafe.Pointer(destLen)) = uint64(0) } else { left = uint64(1) dest = bp + 112 } (*(*Tz_stream)(unsafe.Pointer(bp))).Fnext_in = source (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_in = uint32(0) (*(*Tz_stream)(unsafe.Pointer(bp))).Fzalloc = libc.UintptrFromInt32(0) (*(*Tz_stream)(unsafe.Pointer(bp))).Fzfree = libc.UintptrFromInt32(0) (*(*Tz_stream)(unsafe.Pointer(bp))).Fopaque = libc.UintptrFromInt32(0) err = XinflateInit_(tls, bp, __ccgo_ts, libc.Int32FromInt64(112)) if err != m_Z_OK { return err } (*(*Tz_stream)(unsafe.Pointer(bp))).Fnext_out = dest (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_out = uint32(0) for cond := true; cond; cond = err == m_Z_OK { if (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_out == uint32(0) { if left > uint64(max) { v1 = max } else { v1 = uint32(left) } (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_out = v1 left -= uint64((*(*Tz_stream)(unsafe.Pointer(bp))).Favail_out) } if (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_in == uint32(0) { if len1 > uint64(max) { v2 = max } else { v2 = uint32(len1) } (*(*Tz_stream)(unsafe.Pointer(bp))).Favail_in = v2 len1 -= uint64((*(*Tz_stream)(unsafe.Pointer(bp))).Favail_in) } err = Xinflate(tls, bp, m_Z_NO_FLUSH) } *(*TuLong)(unsafe.Pointer(sourceLen)) -= len1 + uint64((*(*Tz_stream)(unsafe.Pointer(bp))).Favail_in) if dest != bp+112 { *(*TuLongf)(unsafe.Pointer(destLen)) = (*(*Tz_stream)(unsafe.Pointer(bp))).Ftotal_out } else { if (*(*Tz_stream)(unsafe.Pointer(bp))).Ftotal_out != 0 && err == -int32(5) { left = uint64(1) } } XinflateEnd(tls, bp) if err == int32(m_Z_STREAM_END) { v3 = m_Z_OK } else { if err == int32(m_Z_NEED_DICT) { v4 = -int32(3) } else { if err == -int32(5) && left+uint64((*(*Tz_stream)(unsafe.Pointer(bp))).Favail_out) != 0 { v5 = -int32(3) } else { v5 = err } v4 = v5 } v3 = v4 } return v3 } func Xuncompress(tls *libc.TLS, dest uintptr, destLen uintptr, source uintptr, _sourceLen TuLong) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) *(*TuLong)(unsafe.Pointer(bp)) = _sourceLen return Xuncompress2(tls, dest, destLen, source, bp) } // C documentation // // /* gzclose() is in a separate file so that it is linked in only if it is used. // That way the other gzclose functions can be used instead to avoid linking in // unneeded compression or decompression routines. */ func Xgzclose(tls *libc.TLS, file TgzFile) (r int32) { var state Tgz_statep var v1 int32 _, _ = state, v1 if file == libc.UintptrFromInt32(0) { return -int32(2) } state = file if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) { v1 = Xgzclose_r(tls, file) } else { v1 = Xgzclose_w(tls, file) } return v1 } const m_LSEEK = "lseek" const m_O_APPEND1 = 8 const m_O_CLOEXEC1 = 16777216 const m_O_CREAT1 = 512 const m_O_EXCL1 = 2048 const m_O_RDONLY1 = 0 const m_O_TRUNC1 = 1024 const m_O_WRONLY1 = 1 // C documentation // // /* Reset gzip file state */ func _gz_reset(tls *libc.TLS, state Tgz_statep) { (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) /* no output data available */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) { /* for reading ... */ (*Tgz_state)(unsafe.Pointer(state)).Feof = 0 /* not at end of file */ (*Tgz_state)(unsafe.Pointer(state)).Fpast = 0 /* have not read past end yet */ (*Tgz_state)(unsafe.Pointer(state)).Fhow = m_LOOK /* look for gzip header */ } else { /* for writing ... */ (*Tgz_state)(unsafe.Pointer(state)).Freset = 0 } /* no deflateReset pending */ (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 /* no seek request pending */ Xgz_error(tls, state, m_Z_OK, libc.UintptrFromInt32(0)) /* clear error */ (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos = 0 /* no uncompressed data yet */ (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = uint32(0) /* no input data yet */ } // C documentation // // /* Open a gzip file either by name or file descriptor. */ func _gz_open(tls *libc.TLS, path uintptr, fd int32, mode uintptr) (r TgzFile) { bp := tls.Alloc(16) defer tls.Free(16) var cloexec, exclusive, oflag, v1, v2, v3, v4, v5 int32 var len1 Tz_size_t var state Tgz_statep _, _, _, _, _, _, _, _, _, _ = cloexec, exclusive, len1, oflag, state, v1, v2, v3, v4, v5 cloexec = 0 exclusive = 0 /* check input */ if path == libc.UintptrFromInt32(0) { return libc.UintptrFromInt32(0) } /* allocate gzFile structure to return */ state = libc.Xmalloc(tls, uint64(240)) if state == libc.UintptrFromInt32(0) { return libc.UintptrFromInt32(0) } (*Tgz_state)(unsafe.Pointer(state)).Fsize = uint32(0) /* no buffers allocated yet */ (*Tgz_state)(unsafe.Pointer(state)).Fwant = uint32(m_GZBUFSIZE) /* requested buffer size */ (*Tgz_state)(unsafe.Pointer(state)).Fmsg = libc.UintptrFromInt32(0) /* no error message yet */ /* interpret mode */ (*Tgz_state)(unsafe.Pointer(state)).Fmode = m_GZ_NONE (*Tgz_state)(unsafe.Pointer(state)).Flevel = -int32(1) (*Tgz_state)(unsafe.Pointer(state)).Fstrategy = m_Z_DEFAULT_STRATEGY (*Tgz_state)(unsafe.Pointer(state)).Fdirect = 0 for *(*int8)(unsafe.Pointer(mode)) != 0 { if int32(*(*int8)(unsafe.Pointer(mode))) >= int32('0') && int32(*(*int8)(unsafe.Pointer(mode))) <= int32('9') { (*Tgz_state)(unsafe.Pointer(state)).Flevel = int32(*(*int8)(unsafe.Pointer(mode))) - int32('0') } else { switch int32(*(*int8)(unsafe.Pointer(mode))) { case int32('r'): (*Tgz_state)(unsafe.Pointer(state)).Fmode = int32(m_GZ_READ) case int32('w'): (*Tgz_state)(unsafe.Pointer(state)).Fmode = int32(m_GZ_WRITE) case int32('a'): (*Tgz_state)(unsafe.Pointer(state)).Fmode = int32(m_GZ_APPEND) case int32('+'): /* can't read and write at the same time */ libc.Xfree(tls, state) return libc.UintptrFromInt32(0) case int32('b'): /* ignore -- will request binary anyway */ case int32('e'): cloexec = int32(1) case int32('x'): exclusive = int32(1) case int32('f'): (*Tgz_state)(unsafe.Pointer(state)).Fstrategy = int32(m_Z_FILTERED) case int32('h'): (*Tgz_state)(unsafe.Pointer(state)).Fstrategy = int32(m_Z_HUFFMAN_ONLY) case int32('R'): (*Tgz_state)(unsafe.Pointer(state)).Fstrategy = int32(m_Z_RLE) case int32('F'): (*Tgz_state)(unsafe.Pointer(state)).Fstrategy = int32(m_Z_FIXED) case int32('T'): (*Tgz_state)(unsafe.Pointer(state)).Fdirect = int32(1) default: /* could consider as an error, but just ignore */ } } mode++ } /* must provide an "r", "w", or "a" */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode == m_GZ_NONE { libc.Xfree(tls, state) return libc.UintptrFromInt32(0) } /* can't force transparent read */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) { if (*Tgz_state)(unsafe.Pointer(state)).Fdirect != 0 { libc.Xfree(tls, state) return libc.UintptrFromInt32(0) } (*Tgz_state)(unsafe.Pointer(state)).Fdirect = int32(1) /* for empty file */ } /* save the path name for error messages */ len1 = libc.Xstrlen(tls, path) (*Tgz_state)(unsafe.Pointer(state)).Fpath = libc.Xmalloc(tls, len1+uint64(1)) if (*Tgz_state)(unsafe.Pointer(state)).Fpath == libc.UintptrFromInt32(0) { libc.Xfree(tls, state) return libc.UintptrFromInt32(0) } libc.X__builtin___snprintf_chk(tls, (*Tgz_state)(unsafe.Pointer(state)).Fpath, len1+uint64(1), 0, ^t__predefined_size_t(0), __ccgo_ts+584, libc.VaList(bp+8, path)) /* compute the flags for open() */ if cloexec != 0 { v1 = int32(m_O_CLOEXEC1) } else { v1 = 0 } if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) { v2 = m_O_RDONLY1 } else { if exclusive != 0 { v3 = int32(m_O_EXCL1) } else { v3 = 0 } if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_WRITE) { v4 = int32(m_O_TRUNC1) } else { v4 = int32(m_O_APPEND1) } v2 = libc.Int32FromInt32(m_O_WRONLY1) | libc.Int32FromInt32(m_O_CREAT1) | v3 | v4 } oflag = v1 | v2 /* open the file with the appropriate flags (or just use fd) */ if fd > -int32(1) { v5 = fd } else { v5 = libc.Xopen(tls, path, oflag, libc.VaList(bp+8, int32(0666))) } (*Tgz_state)(unsafe.Pointer(state)).Ffd = v5 if (*Tgz_state)(unsafe.Pointer(state)).Ffd == -int32(1) { libc.Xfree(tls, (*Tgz_state)(unsafe.Pointer(state)).Fpath) libc.Xfree(tls, state) return libc.UintptrFromInt32(0) } if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_APPEND) { libc.Xlseek(tls, (*Tgz_state)(unsafe.Pointer(state)).Ffd, 0, int32(m_SEEK_END)) /* so gzoffset() is correct */ (*Tgz_state)(unsafe.Pointer(state)).Fmode = int32(m_GZ_WRITE) /* simplify later checks */ } /* save the current position for rewinding (only if reading) */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) { (*Tgz_state)(unsafe.Pointer(state)).Fstart = libc.Xlseek(tls, (*Tgz_state)(unsafe.Pointer(state)).Ffd, 0, int32(m_SEEK_CUR)) if (*Tgz_state)(unsafe.Pointer(state)).Fstart == int64(-int32(1)) { (*Tgz_state)(unsafe.Pointer(state)).Fstart = 0 } } /* initialize stream */ _gz_reset(tls, state) /* return stream */ return state } // C documentation // // /* -- see zlib.h -- */ func Xgzopen(tls *libc.TLS, path uintptr, mode uintptr) (r TgzFile) { return _gz_open(tls, path, -int32(1), mode) } // C documentation // // /* -- see zlib.h -- */ func Xgzopen64(tls *libc.TLS, path uintptr, mode uintptr) (r TgzFile) { return _gz_open(tls, path, -int32(1), mode) } // C documentation // // /* -- see zlib.h -- */ func Xgzdopen(tls *libc.TLS, fd int32, mode uintptr) (r TgzFile) { bp := tls.Alloc(16) defer tls.Free(16) var gz TgzFile var path, v1 uintptr var v2 bool _, _, _, _ = gz, path, v1, v2 if v2 = fd == -int32(1); !v2 { v1 = libc.Xmalloc(tls, libc.Uint64FromInt32(7)+libc.Uint64FromInt32(3)*libc.Uint64FromInt64(4)) path = v1 } if v2 || v1 == libc.UintptrFromInt32(0) { return libc.UintptrFromInt32(0) } libc.X__builtin___snprintf_chk(tls, path, libc.Uint64FromInt32(7)+libc.Uint64FromInt32(3)*libc.Uint64FromInt64(4), 0, ^t__predefined_size_t(0), __ccgo_ts+587, libc.VaList(bp+8, fd)) gz = _gz_open(tls, path, fd, mode) libc.Xfree(tls, path) return gz } /* -- see zlib.h -- */ // C documentation // // /* -- see zlib.h -- */ func Xgzbuffer(tls *libc.TLS, file TgzFile, size uint32) (r int32) { var state Tgz_statep _ = state /* get internal structure and check integrity */ if file == libc.UintptrFromInt32(0) { return -int32(1) } state = file if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) && (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) { return -int32(1) } /* make sure we haven't already allocated memory */ if (*Tgz_state)(unsafe.Pointer(state)).Fsize != uint32(0) { return -int32(1) } /* check and set requested size */ if size<= 0 { ret = libc.Xlseek(tls, (*Tgz_state)(unsafe.Pointer(state)).Ffd, offset-libc.Int64FromUint32((*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave), int32(m_SEEK_CUR)) if ret == int64(-int32(1)) { return int64(-int32(1)) } (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) (*Tgz_state)(unsafe.Pointer(state)).Feof = 0 (*Tgz_state)(unsafe.Pointer(state)).Fpast = 0 (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 Xgz_error(tls, state, m_Z_OK, libc.UintptrFromInt32(0)) (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = uint32(0) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos += offset return (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos } /* calculate skip amount, rewinding if needed for back seek when reading */ if offset < 0 { if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) { /* writing -- can't go backwards */ return int64(-int32(1)) } offset += (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos if offset < 0 { /* before start of file! */ return int64(-int32(1)) } if Xgzrewind(tls, file) == -int32(1) { /* rewind, then skip to offset */ return int64(-int32(1)) } } /* if reading, skip what's in output buffer (one less gzgetc() check) */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) { if libc.Bool(libc.Bool(uint64(4) == uint64(8)) && (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave > Xgz_intmax(tls)) || libc.Int64FromUint32((*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave) > offset { v1 = libc.Uint32FromInt64(offset) } else { v1 = (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave } n = v1 (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave -= n (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext += uintptr(n) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos += libc.Int64FromUint32(n) offset -= libc.Int64FromUint32(n) } /* request skip (if not zero) */ if offset != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fseek = int32(1) (*Tgz_state)(unsafe.Pointer(state)).Fskip = offset } return (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos + offset } // C documentation // // /* -- see zlib.h -- */ func Xgzseek(tls *libc.TLS, file TgzFile, offset Toff_t, whence int32) (r Toff_t) { var ret Toff_t var v1 int64 _, _ = ret, v1 ret = Xgzseek64(tls, file, offset, whence) if ret == ret { v1 = ret } else { v1 = int64(-int32(1)) } return v1 } // C documentation // // /* -- see zlib.h -- */ func Xgztell64(tls *libc.TLS, file TgzFile) (r Toff_t) { var state Tgz_statep var v1 int64 _, _ = state, v1 /* get internal structure and check integrity */ if file == libc.UintptrFromInt32(0) { return int64(-int32(1)) } state = file if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) && (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) { return int64(-int32(1)) } /* return position */ if (*Tgz_state)(unsafe.Pointer(state)).Fseek != 0 { v1 = (*Tgz_state)(unsafe.Pointer(state)).Fskip } else { v1 = 0 } return (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos + v1 } // C documentation // // /* -- see zlib.h -- */ func Xgztell(tls *libc.TLS, file TgzFile) (r Toff_t) { var ret Toff_t var v1 int64 _, _ = ret, v1 ret = Xgztell64(tls, file) if ret == ret { v1 = ret } else { v1 = int64(-int32(1)) } return v1 } // C documentation // // /* -- see zlib.h -- */ func Xgzoffset64(tls *libc.TLS, file TgzFile) (r Toff_t) { var offset Toff_t var state Tgz_statep _, _ = offset, state /* get internal structure and check integrity */ if file == libc.UintptrFromInt32(0) { return int64(-int32(1)) } state = file if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) && (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) { return int64(-int32(1)) } /* compute and return effective offset in file */ offset = libc.Xlseek(tls, (*Tgz_state)(unsafe.Pointer(state)).Ffd, 0, int32(m_SEEK_CUR)) if offset == int64(-int32(1)) { return int64(-int32(1)) } if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) { /* reading */ offset -= libc.Int64FromUint32((*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_in) } /* don't count buffered input */ return offset } // C documentation // // /* -- see zlib.h -- */ func Xgzoffset(tls *libc.TLS, file TgzFile) (r Toff_t) { var ret Toff_t var v1 int64 _, _ = ret, v1 ret = Xgzoffset64(tls, file) if ret == ret { v1 = ret } else { v1 = int64(-int32(1)) } return v1 } // C documentation // // /* -- see zlib.h -- */ func Xgzeof(tls *libc.TLS, file TgzFile) (r int32) { var state Tgz_statep var v1 int32 _, _ = state, v1 /* get internal structure and check integrity */ if file == libc.UintptrFromInt32(0) { return 0 } state = file if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) && (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) { return 0 } /* return end-of-file state */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) { v1 = (*Tgz_state)(unsafe.Pointer(state)).Fpast } else { v1 = 0 } return v1 } // C documentation // // /* -- see zlib.h -- */ func Xgzerror(tls *libc.TLS, file TgzFile, errnum uintptr) (r uintptr) { var state Tgz_statep var v1, v2 uintptr _, _, _ = state, v1, v2 /* get internal structure and check integrity */ if file == libc.UintptrFromInt32(0) { return libc.UintptrFromInt32(0) } state = file if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) && (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) { return libc.UintptrFromInt32(0) } /* return error information */ if errnum != libc.UintptrFromInt32(0) { *(*int32)(unsafe.Pointer(errnum)) = (*Tgz_state)(unsafe.Pointer(state)).Ferr } if (*Tgz_state)(unsafe.Pointer(state)).Ferr == -int32(4) { v1 = __ccgo_ts + 595 } else { if (*Tgz_state)(unsafe.Pointer(state)).Fmsg == libc.UintptrFromInt32(0) { v2 = __ccgo_ts + 494 } else { v2 = (*Tgz_state)(unsafe.Pointer(state)).Fmsg } v1 = v2 } return v1 } // C documentation // // /* -- see zlib.h -- */ func Xgzclearerr(tls *libc.TLS, file TgzFile) { var state Tgz_statep _ = state /* get internal structure and check integrity */ if file == libc.UintptrFromInt32(0) { return } state = file if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) && (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) { return } /* clear error and end-of-file */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) { (*Tgz_state)(unsafe.Pointer(state)).Feof = 0 (*Tgz_state)(unsafe.Pointer(state)).Fpast = 0 } Xgz_error(tls, state, m_Z_OK, libc.UintptrFromInt32(0)) } // C documentation // // /* Create an error message in allocated memory and set state->err and // state->msg accordingly. Free any previous error message already there. Do // not try to free or allocate space if the error is Z_MEM_ERROR (out of // memory). Simply save the error message as a static string. If there is an // allocation failure constructing the error message, then convert the error to // out of memory. */ func Xgz_error(tls *libc.TLS, state Tgz_statep, err int32, msg uintptr) { bp := tls.Alloc(32) defer tls.Free(32) var v1 uintptr _ = v1 /* free previously allocated message and clear */ if (*Tgz_state)(unsafe.Pointer(state)).Fmsg != libc.UintptrFromInt32(0) { if (*Tgz_state)(unsafe.Pointer(state)).Ferr != -int32(4) { libc.Xfree(tls, (*Tgz_state)(unsafe.Pointer(state)).Fmsg) } (*Tgz_state)(unsafe.Pointer(state)).Fmsg = libc.UintptrFromInt32(0) } /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */ if err != m_Z_OK && err != -int32(5) { (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) } /* set error code, and if no message, then done */ (*Tgz_state)(unsafe.Pointer(state)).Ferr = err if msg == libc.UintptrFromInt32(0) { return } /* for an out of memory error, return literal string when requested */ if err == -int32(4) { return } /* construct error message with path */ v1 = libc.Xmalloc(tls, libc.Xstrlen(tls, (*Tgz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg)+uint64(3)) (*Tgz_state)(unsafe.Pointer(state)).Fmsg = v1 if v1 == libc.UintptrFromInt32(0) { (*Tgz_state)(unsafe.Pointer(state)).Ferr = -int32(4) return } libc.X__builtin___snprintf_chk(tls, (*Tgz_state)(unsafe.Pointer(state)).Fmsg, libc.Xstrlen(tls, (*Tgz_state)(unsafe.Pointer(state)).Fpath)+libc.Xstrlen(tls, msg)+uint64(3), 0, ^t__predefined_size_t(0), __ccgo_ts+609, libc.VaList(bp+8, (*Tgz_state)(unsafe.Pointer(state)).Fpath, __ccgo_ts+616, msg)) } // C documentation // // /* portably return maximum value for an int (when limits.h presumed not // available) -- we need to do this to cover cases where 2's complement not // used, since C standard permits 1's complement and sign-bit representations, // otherwise we could just use ((unsigned)-1) >> 1 */ func Xgz_intmax(tls *libc.TLS) (r uint32) { return uint32(m___INT_MAX__) } const m_O_APPEND2 = 0x00000008 const m_O_CLOEXEC2 = 0x01000000 const m_O_CREAT2 = 0x00000200 const m_O_EXCL2 = 0x00000800 const m_O_RDONLY2 = 0x0000 const m_O_TRUNC2 = 0x00000400 const m_O_WRONLY2 = 0x0001 // C documentation // // /* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from // state->fd, and update state->eof, state->err, and state->msg as appropriate. // This function needs to loop on read(), since read() is not guaranteed to // read the number of bytes requested, depending on the type of descriptor. */ func _gz_load(tls *libc.TLS, state Tgz_statep, buf uintptr, len1 uint32, have uintptr) (r int32) { var get, max uint32 var ret int32 _, _, _ = get, max, ret max = libc.Uint32FromInt32(-libc.Int32FromInt32(1))>>libc.Int32FromInt32(2) + libc.Uint32FromInt32(1) *(*uint32)(unsafe.Pointer(have)) = uint32(0) for cond := true; cond; cond = *(*uint32)(unsafe.Pointer(have)) < len1 { get = len1 - *(*uint32)(unsafe.Pointer(have)) if get > max { get = max } ret = int32(libc.Xread(tls, (*Tgz_state)(unsafe.Pointer(state)).Ffd, buf+uintptr(*(*uint32)(unsafe.Pointer(have))), uint64(get))) if ret <= 0 { break } *(*uint32)(unsafe.Pointer(have)) += libc.Uint32FromInt32(ret) } if ret < 0 { Xgz_error(tls, state, -int32(1), libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) return -int32(1) } if ret == 0 { (*Tgz_state)(unsafe.Pointer(state)).Feof = int32(1) } return 0 } // C documentation // // /* Load up input buffer and set eof flag if last data loaded -- return -1 on // error, 0 otherwise. Note that the eof flag is set when the end of the input // file is reached, even though there may be unused data in the buffer. Once // that data has been used, no more attempts will be made to read the file. // If strm->avail_in != 0, then the current data is moved to the beginning of // the input buffer, and then the remainder of the buffer is loaded with the // available data from the input file. */ func _gz_avail(tls *libc.TLS, state Tgz_statep) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) var n, v1 uint32 var p, q, v3, v4 uintptr var strm Tz_streamp var _ /* got at bp+0 */ uint32 _, _, _, _, _, _, _ = n, p, q, strm, v1, v3, v4 strm = state + 128 if (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK && (*Tgz_state)(unsafe.Pointer(state)).Ferr != -int32(5) { return -int32(1) } if (*Tgz_state)(unsafe.Pointer(state)).Feof == 0 { if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in != 0 { /* copy what's there to the start */ p = (*Tgz_state)(unsafe.Pointer(state)).Fin q = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in n = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in for { v3 = p p++ v4 = q q++ *(*uint8)(unsafe.Pointer(v3)) = *(*uint8)(unsafe.Pointer(v4)) goto _2 _2: ; n-- v1 = n if !(v1 != 0) { break } } } if _gz_load(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fin+uintptr((*Tz_stream)(unsafe.Pointer(strm)).Favail_in), (*Tgz_state)(unsafe.Pointer(state)).Fsize-(*Tz_stream)(unsafe.Pointer(strm)).Favail_in, bp) == -int32(1) { return -int32(1) } *(*TuInt)(unsafe.Pointer(strm + 8)) += *(*uint32)(unsafe.Pointer(bp)) (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in = (*Tgz_state)(unsafe.Pointer(state)).Fin } return 0 } // C documentation // // /* Look for gzip header, set up for inflate or copy. state->x.have must be 0. // If this is the first time in, allocate required memory. state->how will be // left unchanged if there is no more input data available, will be set to COPY // if there is no gzip header and direct copying will be performed, or it will // be set to GZIP for decompression. If direct copying, then leftover input // data from the input buffer will be copied to the output buffer. In that // case, all further file reads will be directly to either the output buffer or // a user buffer. If decompressing, the inflate state will be initialized. // gz_look() will return 0 on success or -1 on failure. */ func _gz_look(tls *libc.TLS, state Tgz_statep) (r int32) { var strm Tz_streamp _ = strm strm = state + 128 /* allocate read buffers and inflate memory */ if (*Tgz_state)(unsafe.Pointer(state)).Fsize == uint32(0) { /* allocate buffers */ (*Tgz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, uint64((*Tgz_state)(unsafe.Pointer(state)).Fwant)) (*Tgz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, uint64((*Tgz_state)(unsafe.Pointer(state)).Fwant< uint32(1) && libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fnext_in))) == int32(31) && libc.Int32FromUint8(*(*TBytef)(unsafe.Pointer((*Tz_stream)(unsafe.Pointer(strm)).Fnext_in + 1))) == int32(139) { XinflateReset(tls, strm) (*Tgz_state)(unsafe.Pointer(state)).Fhow = int32(m_GZIP) (*Tgz_state)(unsafe.Pointer(state)).Fdirect = 0 return 0 } /* no gzip header -- if we were decoding gzip before, then this is trailing garbage. Ignore the trailing garbage and finish. */ if (*Tgz_state)(unsafe.Pointer(state)).Fdirect == 0 { (*Tz_stream)(unsafe.Pointer(strm)).Favail_in = uint32(0) (*Tgz_state)(unsafe.Pointer(state)).Feof = int32(1) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) return 0 } /* doing raw i/o, copy any leftover input to output -- this assumes that the output buffer is larger than the input buffer, which also assures space for gzungetc() */ (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Tgz_state)(unsafe.Pointer(state)).Fout libc.X__builtin___memcpy_chk(tls, (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext, (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in, uint64((*Tz_stream)(unsafe.Pointer(strm)).Favail_in), ^t__predefined_size_t(0)) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in (*Tz_stream)(unsafe.Pointer(strm)).Favail_in = uint32(0) (*Tgz_state)(unsafe.Pointer(state)).Fhow = int32(m_COPY) (*Tgz_state)(unsafe.Pointer(state)).Fdirect = int32(1) return 0 } // C documentation // // /* Decompress from input to the provided next_out and avail_out in the state. // On return, state->x.have and state->x.next point to the just decompressed // data. If the gzip stream completes, state->how is reset to LOOK to look for // the next gzip stream or raw data, once state->x.have is depleted. Returns 0 // on success, -1 on failure. */ func _gz_decomp(tls *libc.TLS, state Tgz_statep) (r int32) { var had uint32 var ret int32 var strm Tz_streamp var v1 uintptr _, _, _, _ = had, ret, strm, v1 ret = m_Z_OK strm = state + 128 /* fill output buffer up to end of deflate stream */ had = (*Tz_stream)(unsafe.Pointer(strm)).Favail_out for cond := true; cond; cond = (*Tz_stream)(unsafe.Pointer(strm)).Favail_out != 0 && ret != int32(m_Z_STREAM_END) { /* get more input for inflate() */ if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in == uint32(0) && _gz_avail(tls, state) == -int32(1) { return -int32(1) } if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in == uint32(0) { Xgz_error(tls, state, -int32(5), __ccgo_ts+619) break } /* decompress and handle errors */ ret = Xinflate(tls, strm, m_Z_NO_FLUSH) if ret == -int32(2) || ret == int32(m_Z_NEED_DICT) { Xgz_error(tls, state, -int32(2), __ccgo_ts+642) return -int32(1) } if ret == -int32(4) { Xgz_error(tls, state, -int32(4), __ccgo_ts+595) return -int32(1) } if ret == -int32(3) { /* deflate stream invalid */ if (*Tz_stream)(unsafe.Pointer(strm)).Fmsg == libc.UintptrFromInt32(0) { v1 = __ccgo_ts + 681 } else { v1 = (*Tz_stream)(unsafe.Pointer(strm)).Fmsg } Xgz_error(tls, state, -int32(3), v1) return -int32(1) } } /* update available output */ (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave = had - (*Tz_stream)(unsafe.Pointer(strm)).Favail_out (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out - uintptr((*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave) /* if the gzip stream completed successfully, look for another */ if ret == int32(m_Z_STREAM_END) { (*Tgz_state)(unsafe.Pointer(state)).Fhow = m_LOOK } /* good decompression */ return 0 } // C documentation // // /* Fetch data and put it in the output buffer. Assumes state->x.have is 0. // Data is either copied from the input file or decompressed from the input // file depending on state->how. If state->how is LOOK, then a gzip header is // looked for to determine whether to copy or decompress. Returns -1 on error, // otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the // end of the input file has been reached and all data has been processed. */ func _gz_fetch(tls *libc.TLS, state Tgz_statep) (r int32) { var strm Tz_streamp _ = strm strm = state + 128 for cond := true; cond; cond = (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) && (!((*Tgz_state)(unsafe.Pointer(state)).Feof != 0) || (*Tz_stream)(unsafe.Pointer(strm)).Favail_in != 0) { switch (*Tgz_state)(unsafe.Pointer(state)).Fhow { case m_LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */ if _gz_look(tls, state) == -int32(1) { return -int32(1) } if (*Tgz_state)(unsafe.Pointer(state)).Fhow == m_LOOK { return 0 } case int32(m_COPY): /* -> COPY */ if _gz_load(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fout, (*Tgz_state)(unsafe.Pointer(state)).Fsize< GZIP or LOOK (if end of gzip stream) */ (*Tz_stream)(unsafe.Pointer(strm)).Favail_out = (*Tgz_state)(unsafe.Pointer(state)).Fsize << int32(1) (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out = (*Tgz_state)(unsafe.Pointer(state)).Fout if _gz_decomp(tls, state) == -int32(1) { return -int32(1) } } } return 0 } // C documentation // // /* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ func _gz_skip(tls *libc.TLS, state Tgz_statep, len1 Toff_t) (r int32) { var n, v1 uint32 _, _ = n, v1 /* skip over len bytes or reach end-of-file, whichever comes first */ for len1 != 0 { /* skip over whatever is in output buffer */ if (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { if libc.Bool(libc.Bool(uint64(4) == uint64(8)) && (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave > Xgz_intmax(tls)) || libc.Int64FromUint32((*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave) > len1 { v1 = libc.Uint32FromInt64(len1) } else { v1 = (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave } n = v1 (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave -= n (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext += uintptr(n) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos += libc.Int64FromUint32(n) len1 -= libc.Int64FromUint32(n) } else { if (*Tgz_state)(unsafe.Pointer(state)).Feof != 0 && (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == uint32(0) { break } else { /* get more output, looking for header if required */ if _gz_fetch(tls, state) == -int32(1) { return -int32(1) } } } } return 0 } // C documentation // // /* Read len bytes into buf from file, or less than len up to the end of the // input. Return the number of bytes read. If zero is returned, either the // end of file was reached, or there was an error. state->err must be // consulted in that case to determine which. */ func _gz_read(tls *libc.TLS, state Tgz_statep, buf Tvoidp, len1 Tz_size_t) (r Tz_size_t) { bp := tls.Alloc(16) defer tls.Free(16) var got Tz_size_t var _ /* n at bp+0 */ uint32 _ = got /* if len is zero, avoid unnecessary operations */ if len1 == uint64(0) { return uint64(0) } /* process a skip request */ if (*Tgz_state)(unsafe.Pointer(state)).Fseek != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 if _gz_skip(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fskip) == -int32(1) { return uint64(0) } } /* get len bytes to buf, or less than len if at the end */ got = uint64(0) for cond := true; cond; cond = len1 != 0 { /* set n to the maximum amount of len that fits in an unsigned int */ *(*uint32)(unsafe.Pointer(bp)) = libc.Uint32FromInt32(-libc.Int32FromInt32(1)) if uint64(*(*uint32)(unsafe.Pointer(bp))) > len1 { *(*uint32)(unsafe.Pointer(bp)) = uint32(len1) } /* first just try copying data from the output buffer */ if (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { if (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave < *(*uint32)(unsafe.Pointer(bp)) { *(*uint32)(unsafe.Pointer(bp)) = (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave } libc.X__builtin___memcpy_chk(tls, buf, (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(*(*uint32)(unsafe.Pointer(bp))), ^t__predefined_size_t(0)) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext += uintptr(*(*uint32)(unsafe.Pointer(bp))) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave -= *(*uint32)(unsafe.Pointer(bp)) } else { if (*Tgz_state)(unsafe.Pointer(state)).Feof != 0 && (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == uint32(0) { (*Tgz_state)(unsafe.Pointer(state)).Fpast = int32(1) /* tried to read past end */ break } else { if (*Tgz_state)(unsafe.Pointer(state)).Fhow == m_LOOK || *(*uint32)(unsafe.Pointer(bp)) < (*Tgz_state)(unsafe.Pointer(state)).Fsize<how == GZIP */ (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_out = *(*uint32)(unsafe.Pointer(bp)) (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Fnext_out = buf if _gz_decomp(tls, state) == -int32(1) { return uint64(0) } *(*uint32)(unsafe.Pointer(bp)) = (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(0) } } } } /* update progress */ len1 -= uint64(*(*uint32)(unsafe.Pointer(bp))) buf = buf + uintptr(*(*uint32)(unsafe.Pointer(bp))) got += uint64(*(*uint32)(unsafe.Pointer(bp))) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos += libc.Int64FromUint32(*(*uint32)(unsafe.Pointer(bp))) } /* return number of bytes read into user buffer */ return got } // C documentation // // /* -- see zlib.h -- */ func Xgzread(tls *libc.TLS, file TgzFile, buf Tvoidp, len1 uint32) (r int32) { var state Tgz_statep _ = state /* get internal structure */ if file == libc.UintptrFromInt32(0) { return -int32(1) } state = file /* check that we're reading and that there's no (serious) error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK && (*Tgz_state)(unsafe.Pointer(state)).Ferr != -int32(5) { return -int32(1) } /* since an int is returned, make sure len fits in one, otherwise return with an error (this avoids a flaw in the interface) */ if libc.Int32FromUint32(len1) < 0 { Xgz_error(tls, state, -int32(2), __ccgo_ts+703) return -int32(1) } /* read len or fewer bytes to buf */ len1 = uint32(_gz_read(tls, state, buf, uint64(len1))) /* check for an error */ if len1 == uint32(0) && (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK && (*Tgz_state)(unsafe.Pointer(state)).Ferr != -int32(5) { return -int32(1) } /* return the number of bytes read (this is assured to fit in an int) */ return libc.Int32FromUint32(len1) } // C documentation // // /* -- see zlib.h -- */ func Xgzfread(tls *libc.TLS, buf Tvoidp, size Tz_size_t, nitems Tz_size_t, file TgzFile) (r Tz_size_t) { var len1 Tz_size_t var state Tgz_statep var v1 uint64 _, _, _ = len1, state, v1 /* get internal structure */ if file == libc.UintptrFromInt32(0) { return uint64(0) } state = file /* check that we're reading and that there's no (serious) error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK && (*Tgz_state)(unsafe.Pointer(state)).Ferr != -int32(5) { return uint64(0) } /* compute bytes to read -- error on overflow */ len1 = nitems * size if size != 0 && len1/size != nitems { Xgz_error(tls, state, -int32(2), __ccgo_ts+734) return uint64(0) } /* read len or fewer bytes to buf, return the number of full items read */ if len1 != 0 { v1 = _gz_read(tls, state, buf, len1) / size } else { v1 = uint64(0) } return v1 } // C documentation // // /* -- see zlib.h -- */ func Xgzgetc(tls *libc.TLS, file TgzFile) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) var state Tgz_statep var v1, v2 uintptr var v3 int32 var _ /* buf at bp+0 */ [1]uint8 _, _, _, _ = state, v1, v2, v3 /* get internal structure */ if file == libc.UintptrFromInt32(0) { return -int32(1) } state = file /* check that we're reading and that there's no (serious) error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK && (*Tgz_state)(unsafe.Pointer(state)).Ferr != -int32(5) { return -int32(1) } /* try output buffer (no need to check for skip request) */ if (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave-- (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos++ v2 = state + 8 v1 = *(*uintptr)(unsafe.Pointer(v2)) *(*uintptr)(unsafe.Pointer(v2))++ return libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(v1))) } /* nothing there -- try gz_read() */ if _gz_read(tls, state, bp, uint64(1)) < uint64(1) { v3 = -int32(1) } else { v3 = libc.Int32FromUint8((*(*[1]uint8)(unsafe.Pointer(bp)))[0]) } return v3 } func Xgzgetc_(tls *libc.TLS, file TgzFile) (r int32) { return Xgzgetc(tls, file) } // C documentation // // /* -- see zlib.h -- */ func Xgzungetc(tls *libc.TLS, c int32, file TgzFile) (r int32) { var dest, src, v1, v2 uintptr var state Tgz_statep _, _, _, _, _ = dest, src, state, v1, v2 /* get internal structure */ if file == libc.UintptrFromInt32(0) { return -int32(1) } state = file /* in case this was just opened, set up the input buffer */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) && (*Tgz_state)(unsafe.Pointer(state)).Fhow == m_LOOK && (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { _gz_look(tls, state) } /* check that we're reading and that there's no (serious) error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK && (*Tgz_state)(unsafe.Pointer(state)).Ferr != -int32(5) { return -int32(1) } /* process a skip request */ if (*Tgz_state)(unsafe.Pointer(state)).Fseek != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 if _gz_skip(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fskip) == -int32(1) { return -int32(1) } } /* can't push EOF */ if c < 0 { return -int32(1) } /* if output buffer empty, put byte at end (allows more pushing) */ if (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave = uint32(1) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Tgz_state)(unsafe.Pointer(state)).Fout + uintptr((*Tgz_state)(unsafe.Pointer(state)).Fsize< (*Tgz_state)(unsafe.Pointer(state)).Fout { dest-- v1 = dest src-- v2 = src *(*uint8)(unsafe.Pointer(v1)) = *(*uint8)(unsafe.Pointer(v2)) } (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext = dest } (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave++ (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext-- *(*uint8)(unsafe.Pointer((*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext)) = libc.Uint8FromInt32(c) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos-- (*Tgz_state)(unsafe.Pointer(state)).Fpast = 0 return c } // C documentation // // /* -- see zlib.h -- */ func Xgzgets(tls *libc.TLS, file TgzFile, buf uintptr, len1 int32) (r uintptr) { var eol, str uintptr var left, n, v1 uint32 var state Tgz_statep _, _, _, _, _, _ = eol, left, n, state, str, v1 /* check parameters and get internal structure */ if file == libc.UintptrFromInt32(0) || buf == libc.UintptrFromInt32(0) || len1 < int32(1) { return libc.UintptrFromInt32(0) } state = file /* check that we're reading and that there's no (serious) error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK && (*Tgz_state)(unsafe.Pointer(state)).Ferr != -int32(5) { return libc.UintptrFromInt32(0) } /* process a skip request */ if (*Tgz_state)(unsafe.Pointer(state)).Fseek != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 if _gz_skip(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fskip) == -int32(1) { return libc.UintptrFromInt32(0) } } /* copy output bytes up to new line or len - 1, whichever comes first -- append a terminating zero to the string (we don't check for a zero in the contents, let the user worry about that) */ str = buf left = libc.Uint32FromInt32(len1) - uint32(1) if left != 0 { for cond := true; cond; cond = left != 0 && eol == libc.UintptrFromInt32(0) { /* assure that something is in the output buffer */ if (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) && _gz_fetch(tls, state) == -int32(1) { return libc.UintptrFromInt32(0) } /* error */ if (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { /* end of file */ (*Tgz_state)(unsafe.Pointer(state)).Fpast = int32(1) /* read past end */ break /* return what we have */ } /* look for end-of-line in current output buffer */ if (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave > left { v1 = left } else { v1 = (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave } n = v1 eol = libc.Xmemchr(tls, (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext, int32('\n'), uint64(n)) if eol != libc.UintptrFromInt32(0) { n = libc.Uint32FromInt64(int64(eol)-int64((*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext)) + uint32(1) } /* copy through end-of-line, or remainder if not found */ libc.X__builtin___memcpy_chk(tls, buf, (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(n), ^t__predefined_size_t(0)) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave -= n (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext += uintptr(n) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos += libc.Int64FromUint32(n) left -= n buf += uintptr(n) } } /* return terminated string, or if nothing, end of file */ if buf == str { return libc.UintptrFromInt32(0) } *(*int8)(unsafe.Pointer(buf)) = 0 return str } // C documentation // // /* -- see zlib.h -- */ func Xgzdirect(tls *libc.TLS, file TgzFile) (r int32) { var state Tgz_statep _ = state /* get internal structure */ if file == libc.UintptrFromInt32(0) { return 0 } state = file /* if the state is not known, but we can find out, then do so (this is mainly for right after a gzopen() or gzdopen()) */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode == int32(m_GZ_READ) && (*Tgz_state)(unsafe.Pointer(state)).Fhow == m_LOOK && (*Tgz_state)(unsafe.Pointer(state)).Fx.Fhave == uint32(0) { _gz_look(tls, state) } /* return 1 if transparent, 0 if processing a gzip stream */ return (*Tgz_state)(unsafe.Pointer(state)).Fdirect } // C documentation // // /* -- see zlib.h -- */ func Xgzclose_r(tls *libc.TLS, file TgzFile) (r int32) { var err, ret, v1, v2 int32 var state Tgz_statep _, _, _, _, _ = err, ret, state, v1, v2 /* get internal structure */ if file == libc.UintptrFromInt32(0) { return -int32(2) } state = file /* check that we're reading */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_READ) { return -int32(2) } /* free memory and close file */ if (*Tgz_state)(unsafe.Pointer(state)).Fsize != 0 { XinflateEnd(tls, state+128) libc.Xfree(tls, (*Tgz_state)(unsafe.Pointer(state)).Fout) libc.Xfree(tls, (*Tgz_state)(unsafe.Pointer(state)).Fin) } if (*Tgz_state)(unsafe.Pointer(state)).Ferr == -int32(5) { v1 = -int32(5) } else { v1 = m_Z_OK } err = v1 Xgz_error(tls, state, m_Z_OK, libc.UintptrFromInt32(0)) libc.Xfree(tls, (*Tgz_state)(unsafe.Pointer(state)).Fpath) ret = libc.Xclose(tls, (*Tgz_state)(unsafe.Pointer(state)).Ffd) libc.Xfree(tls, state) if ret != 0 { v2 = -int32(1) } else { v2 = err } return v2 } // C documentation // // /* Initialize state for writing a gzip file. Mark initialization by setting // state->size to non-zero. Return -1 on a memory allocation failure, or 0 on // success. */ func _gz_init(tls *libc.TLS, state Tgz_statep) (r int32) { var ret int32 var strm Tz_streamp _, _ = ret, strm strm = state + 128 /* allocate input buffer (double size for gzprintf) */ (*Tgz_state)(unsafe.Pointer(state)).Fin = libc.Xmalloc(tls, uint64((*Tgz_state)(unsafe.Pointer(state)).Fwant<direct is true, then simply write // to the output file without compressing, and ignore flush. */ func _gz_comp(tls *libc.TLS, state Tgz_statep, flush int32) (r int32) { var have, max, put, v1, v2 uint32 var ret, writ int32 var strm Tz_streamp _, _, _, _, _, _, _, _ = have, max, put, ret, strm, writ, v1, v2 max = libc.Uint32FromInt32(-libc.Int32FromInt32(1))>>libc.Int32FromInt32(2) + libc.Uint32FromInt32(1) strm = state + 128 /* allocate memory if this is the first time through */ if (*Tgz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && _gz_init(tls, state) == -int32(1) { return -int32(1) } /* write directly if requested */ if (*Tgz_state)(unsafe.Pointer(state)).Fdirect != 0 { for (*Tz_stream)(unsafe.Pointer(strm)).Favail_in != 0 { if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in > max { v1 = max } else { v1 = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in } put = v1 writ = int32(libc.Xwrite(tls, (*Tgz_state)(unsafe.Pointer(state)).Ffd, (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in, uint64(put))) if writ < 0 { Xgz_error(tls, state, -int32(1), libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) return -int32(1) } *(*TuInt)(unsafe.Pointer(strm + 8)) -= libc.Uint32FromInt32(writ) *(*uintptr)(unsafe.Pointer(strm)) += uintptr(writ) } return 0 } /* check for a pending reset */ if (*Tgz_state)(unsafe.Pointer(state)).Freset != 0 { /* don't start a new gzip member unless there is data to write */ if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in == uint32(0) { return 0 } XdeflateReset(tls, strm) (*Tgz_state)(unsafe.Pointer(state)).Freset = 0 } /* run deflate() on provided input until it produces no more output */ ret = m_Z_OK for cond := true; cond; cond = have != 0 { /* write out current buffer contents if full, or if flushing, but if doing Z_FINISH then don't write until we get to Z_STREAM_END */ if (*Tz_stream)(unsafe.Pointer(strm)).Favail_out == uint32(0) || flush != m_Z_NO_FLUSH && (flush != int32(m_Z_FINISH) || ret == int32(m_Z_STREAM_END)) { for (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out > (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext { if int64((*Tz_stream)(unsafe.Pointer(strm)).Fnext_out)-int64((*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext) > int64(libc.Int32FromUint32(max)) { v2 = max } else { v2 = libc.Uint32FromInt64(int64((*Tz_stream)(unsafe.Pointer(strm)).Fnext_out) - int64((*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext)) } put = v2 writ = int32(libc.Xwrite(tls, (*Tgz_state)(unsafe.Pointer(state)).Ffd, (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext, uint64(put))) if writ < 0 { Xgz_error(tls, state, -int32(1), libc.Xstrerror(tls, *(*int32)(unsafe.Pointer(libc.X__error(tls))))) return -int32(1) } (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext += uintptr(writ) } if (*Tz_stream)(unsafe.Pointer(strm)).Favail_out == uint32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Favail_out = (*Tgz_state)(unsafe.Pointer(state)).Fsize (*Tz_stream)(unsafe.Pointer(strm)).Fnext_out = (*Tgz_state)(unsafe.Pointer(state)).Fout (*Tgz_state)(unsafe.Pointer(state)).Fx.Fnext = (*Tgz_state)(unsafe.Pointer(state)).Fout } } /* compress */ have = (*Tz_stream)(unsafe.Pointer(strm)).Favail_out ret = Xdeflate(tls, strm, flush) if ret == -int32(2) { Xgz_error(tls, state, -int32(2), __ccgo_ts+798) return -int32(1) } have -= (*Tz_stream)(unsafe.Pointer(strm)).Favail_out } /* if that completed a deflate stream, allow another to start */ if flush == int32(m_Z_FINISH) { (*Tgz_state)(unsafe.Pointer(state)).Freset = int32(1) } /* all done, no errors */ return 0 } // C documentation // // /* Compress len zeros to output. Return -1 on a write error or memory // allocation failure by gz_comp(), or 0 on success. */ func _gz_zero(tls *libc.TLS, state Tgz_statep, len1 Toff_t) (r int32) { var first int32 var n, v1 uint32 var strm Tz_streamp _, _, _, _ = first, n, strm, v1 strm = state + 128 /* consume whatever's left in the input buffer */ if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in != 0 && _gz_comp(tls, state, m_Z_NO_FLUSH) == -int32(1) { return -int32(1) } /* compress len zeros (len guaranteed > 0) */ first = int32(1) for len1 != 0 { if libc.Bool(libc.Bool(uint64(4) == uint64(8)) && (*Tgz_state)(unsafe.Pointer(state)).Fsize > Xgz_intmax(tls)) || libc.Int64FromUint32((*Tgz_state)(unsafe.Pointer(state)).Fsize) > len1 { v1 = libc.Uint32FromInt64(len1) } else { v1 = (*Tgz_state)(unsafe.Pointer(state)).Fsize } n = v1 if first != 0 { libc.X__builtin___memset_chk(tls, (*Tgz_state)(unsafe.Pointer(state)).Fin, 0, uint64(n), ^t__predefined_size_t(0)) first = 0 } (*Tz_stream)(unsafe.Pointer(strm)).Favail_in = n (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in = (*Tgz_state)(unsafe.Pointer(state)).Fin (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos += libc.Int64FromUint32(n) if _gz_comp(tls, state, m_Z_NO_FLUSH) == -int32(1) { return -int32(1) } len1 -= libc.Int64FromUint32(n) } return 0 } // C documentation // // /* Write len bytes from buf to file. Return the number of bytes written. If // the returned value is less than len, then there was an error. */ func _gz_write(tls *libc.TLS, state Tgz_statep, buf Tvoidpc, len1 Tz_size_t) (r Tz_size_t) { var copy1, have, n uint32 var put Tz_size_t _, _, _, _ = copy1, have, n, put put = len1 /* if len is zero, avoid unnecessary operations */ if len1 == uint64(0) { return uint64(0) } /* allocate memory if this is the first time through */ if (*Tgz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && _gz_init(tls, state) == -int32(1) { return uint64(0) } /* check for seek request */ if (*Tgz_state)(unsafe.Pointer(state)).Fseek != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 if _gz_zero(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fskip) == -int32(1) { return uint64(0) } } /* for small len, copy to input buffer, otherwise compress directly */ if len1 < uint64((*Tgz_state)(unsafe.Pointer(state)).Fsize) { /* copy to input buffer, compress when full */ for cond := true; cond; cond = len1 != 0 { if (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_in == uint32(0) { (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = (*Tgz_state)(unsafe.Pointer(state)).Fin } have = libc.Uint32FromInt64(int64((*Tgz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in+uintptr((*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_in)) - int64((*Tgz_state)(unsafe.Pointer(state)).Fin)) copy1 = (*Tgz_state)(unsafe.Pointer(state)).Fsize - have if uint64(copy1) > len1 { copy1 = uint32(len1) } libc.X__builtin___memcpy_chk(tls, (*Tgz_state)(unsafe.Pointer(state)).Fin+uintptr(have), buf, uint64(copy1), ^t__predefined_size_t(0)) (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_in += copy1 (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos += libc.Int64FromUint32(copy1) buf = buf + uintptr(copy1) len1 -= uint64(copy1) if len1 != 0 && _gz_comp(tls, state, m_Z_NO_FLUSH) == -int32(1) { return uint64(0) } } } else { /* consume whatever's left in the input buffer */ if (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_in != 0 && _gz_comp(tls, state, m_Z_NO_FLUSH) == -int32(1) { return uint64(0) } /* directly compress user buffer to file */ (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Fnext_in = buf for cond := true; cond; cond = len1 != 0 { n = libc.Uint32FromInt32(-libc.Int32FromInt32(1)) if uint64(n) > len1 { n = uint32(len1) } (*Tgz_state)(unsafe.Pointer(state)).Fstrm.Favail_in = n (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos += libc.Int64FromUint32(n) if _gz_comp(tls, state, m_Z_NO_FLUSH) == -int32(1) { return uint64(0) } len1 -= uint64(n) } } /* input was all buffered or compressed */ return put } // C documentation // // /* -- see zlib.h -- */ func Xgzwrite(tls *libc.TLS, file TgzFile, buf Tvoidpc, len1 uint32) (r int32) { var state Tgz_statep _ = state /* get internal structure */ if file == libc.UintptrFromInt32(0) { return 0 } state = file /* check that we're writing and that there's no error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK { return 0 } /* since an int is returned, make sure len fits in one, otherwise return with an error (this avoids a flaw in the interface) */ if libc.Int32FromUint32(len1) < 0 { Xgz_error(tls, state, -int32(3), __ccgo_ts+837) return 0 } /* write len bytes from buf (the return value will fit in an int) */ return libc.Int32FromUint64(_gz_write(tls, state, buf, uint64(len1))) } // C documentation // // /* -- see zlib.h -- */ func Xgzfwrite(tls *libc.TLS, buf Tvoidpc, size Tz_size_t, nitems Tz_size_t, file TgzFile) (r Tz_size_t) { var len1 Tz_size_t var state Tgz_statep var v1 uint64 _, _, _ = len1, state, v1 /* get internal structure */ if file == libc.UintptrFromInt32(0) { return uint64(0) } state = file /* check that we're writing and that there's no error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK { return uint64(0) } /* compute bytes to read -- error on overflow */ len1 = nitems * size if size != 0 && len1/size != nitems { Xgz_error(tls, state, -int32(2), __ccgo_ts+734) return uint64(0) } /* write len bytes to buf, return the number of full items written */ if len1 != 0 { v1 = _gz_write(tls, state, buf, len1) / size } else { v1 = uint64(0) } return v1 } // C documentation // // /* -- see zlib.h -- */ func Xgzputc(tls *libc.TLS, file TgzFile, c int32) (r int32) { bp := tls.Alloc(16) defer tls.Free(16) var have uint32 var state Tgz_statep var strm Tz_streamp var _ /* buf at bp+0 */ [1]uint8 _, _, _ = have, state, strm /* get internal structure */ if file == libc.UintptrFromInt32(0) { return -int32(1) } state = file strm = state + 128 /* check that we're writing and that there's no error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK { return -int32(1) } /* check for seek request */ if (*Tgz_state)(unsafe.Pointer(state)).Fseek != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 if _gz_zero(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fskip) == -int32(1) { return -int32(1) } } /* try writing to input buffer for speed (state->size == 0 if buffer not initialized) */ if (*Tgz_state)(unsafe.Pointer(state)).Fsize != 0 { if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in == uint32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in = (*Tgz_state)(unsafe.Pointer(state)).Fin } have = libc.Uint32FromInt64(int64((*Tz_stream)(unsafe.Pointer(strm)).Fnext_in+uintptr((*Tz_stream)(unsafe.Pointer(strm)).Favail_in)) - int64((*Tgz_state)(unsafe.Pointer(state)).Fin)) if have < (*Tgz_state)(unsafe.Pointer(state)).Fsize { *(*uint8)(unsafe.Pointer((*Tgz_state)(unsafe.Pointer(state)).Fin + uintptr(have))) = libc.Uint8FromInt32(c) (*Tz_stream)(unsafe.Pointer(strm)).Favail_in++ (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos++ return c & int32(0xff) } } /* no room in buffer or not initialized, use gz_write() */ (*(*[1]uint8)(unsafe.Pointer(bp)))[0] = libc.Uint8FromInt32(c) if _gz_write(tls, state, bp, uint64(1)) != uint64(1) { return -int32(1) } return c & int32(0xff) } // C documentation // // /* -- see zlib.h -- */ func Xgzputs(tls *libc.TLS, file TgzFile, s uintptr) (r int32) { var len1, put Tz_size_t var state Tgz_statep var v1 int32 _, _, _, _ = len1, put, state, v1 /* get internal structure */ if file == libc.UintptrFromInt32(0) { return -int32(1) } state = file /* check that we're writing and that there's no error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK { return -int32(1) } /* write string */ len1 = libc.Xstrlen(tls, s) if libc.Int32FromUint64(len1) < 0 || uint64(uint32(len1)) != len1 { Xgz_error(tls, state, -int32(2), __ccgo_ts+874) return -int32(1) } put = _gz_write(tls, state, s, len1) if put < len1 { v1 = -int32(1) } else { v1 = libc.Int32FromUint64(len1) } return v1 } /*===---- stdarg.h - Variable argument handling ----------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /* * This header is designed to be included multiple times. If any of the __need_ * macros are defined, then only that subset of interfaces are provided. This * can be useful for POSIX headers that need to not expose all of stdarg.h, but * need to use some of its interfaces. Otherwise this header provides all of * the expected interfaces. * * When clang modules are enabled, this header is a textual header to support * the multiple include behavior. As such, it doesn't directly declare anything * so that it doesn't add duplicate declarations to all of its includers' * modules. */ /* GCC always defines __va_copy, but does not define va_copy unless in c99 mode * or -ansi is not specified, since it was not part of C90. */ /*===---- __stdarg_header_macro.h ------------------------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /*===---- __stdarg___gnuc_va_list.h - Definition of __gnuc_va_list ---------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /*===---- __stdarg_va_list.h - Definition of va_list -----------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /*===---- __stdarg_va_arg.h - Definitions of va_start, va_arg, va_end-------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /*===---- __stdarg___va_copy.h - Definition of __va_copy -------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ /*===---- __stdarg_va_copy.h - Definition of va_copy------------------------=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * *===-----------------------------------------------------------------------=== */ // C documentation // // /* -- see zlib.h -- */ func Xgzvprintf(tls *libc.TLS, file TgzFile, format uintptr, va Tva_list) (r int32) { var left uint32 var len1 int32 var next uintptr var state Tgz_statep var strm Tz_streamp _, _, _, _, _ = left, len1, next, state, strm /* get internal structure */ if file == libc.UintptrFromInt32(0) { return -int32(2) } state = file strm = state + 128 /* check that we're writing and that there's no error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK { return -int32(2) } /* make sure we have some buffer space */ if (*Tgz_state)(unsafe.Pointer(state)).Fsize == uint32(0) && _gz_init(tls, state) == -int32(1) { return (*Tgz_state)(unsafe.Pointer(state)).Ferr } /* check for seek request */ if (*Tgz_state)(unsafe.Pointer(state)).Fseek != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 if _gz_zero(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fskip) == -int32(1) { return (*Tgz_state)(unsafe.Pointer(state)).Ferr } } /* do the printf() into the input buffer, put length in len -- the input buffer is double-sized just for this function, so there is guaranteed to be state->size bytes available after the current contents */ if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in == uint32(0) { (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in = (*Tgz_state)(unsafe.Pointer(state)).Fin } next = (*Tgz_state)(unsafe.Pointer(state)).Fin + uintptr(int64((*Tz_stream)(unsafe.Pointer(strm)).Fnext_in)-int64((*Tgz_state)(unsafe.Pointer(state)).Fin)) + uintptr((*Tz_stream)(unsafe.Pointer(strm)).Favail_in) *(*int8)(unsafe.Pointer(next + uintptr((*Tgz_state)(unsafe.Pointer(state)).Fsize-uint32(1)))) = 0 len1 = libc.X__builtin___vsnprintf_chk(tls, next, uint64((*Tgz_state)(unsafe.Pointer(state)).Fsize), 0, ^t__predefined_size_t(0), format, va) /* check that printf() results fit in buffer */ if len1 == 0 || libc.Uint32FromInt32(len1) >= (*Tgz_state)(unsafe.Pointer(state)).Fsize || int32(*(*int8)(unsafe.Pointer(next + uintptr((*Tgz_state)(unsafe.Pointer(state)).Fsize-uint32(1))))) != 0 { return 0 } /* update buffer and position, compress first half if past that */ *(*TuInt)(unsafe.Pointer(strm + 8)) += libc.Uint32FromInt32(len1) (*Tgz_state)(unsafe.Pointer(state)).Fx.Fpos += int64(len1) if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in >= (*Tgz_state)(unsafe.Pointer(state)).Fsize { left = (*Tz_stream)(unsafe.Pointer(strm)).Favail_in - (*Tgz_state)(unsafe.Pointer(state)).Fsize (*Tz_stream)(unsafe.Pointer(strm)).Favail_in = (*Tgz_state)(unsafe.Pointer(state)).Fsize if _gz_comp(tls, state, m_Z_NO_FLUSH) == -int32(1) { return (*Tgz_state)(unsafe.Pointer(state)).Ferr } libc.X__builtin___memmove_chk(tls, (*Tgz_state)(unsafe.Pointer(state)).Fin, (*Tgz_state)(unsafe.Pointer(state)).Fin+uintptr((*Tgz_state)(unsafe.Pointer(state)).Fsize), uint64(left), ^t__predefined_size_t(0)) (*Tz_stream)(unsafe.Pointer(strm)).Fnext_in = (*Tgz_state)(unsafe.Pointer(state)).Fin (*Tz_stream)(unsafe.Pointer(strm)).Favail_in = left } return len1 } func Xgzprintf(tls *libc.TLS, file TgzFile, format uintptr, va1 uintptr) (r int32) { var ret int32 var va Tva_list _, _ = ret, va va = va1 ret = Xgzvprintf(tls, file, format, va) _ = va return ret } // C documentation // // /* -- see zlib.h -- */ func Xgzflush(tls *libc.TLS, file TgzFile, flush int32) (r int32) { var state Tgz_statep _ = state /* get internal structure */ if file == libc.UintptrFromInt32(0) { return -int32(2) } state = file /* check that we're writing and that there's no error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK { return -int32(2) } /* check flush parameter */ if flush < 0 || flush > int32(m_Z_FINISH) { return -int32(2) } /* check for seek request */ if (*Tgz_state)(unsafe.Pointer(state)).Fseek != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 if _gz_zero(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fskip) == -int32(1) { return (*Tgz_state)(unsafe.Pointer(state)).Ferr } } /* compress remaining data with requested flush */ _gz_comp(tls, state, flush) return (*Tgz_state)(unsafe.Pointer(state)).Ferr } // C documentation // // /* -- see zlib.h -- */ func Xgzsetparams(tls *libc.TLS, file TgzFile, level int32, strategy int32) (r int32) { var state Tgz_statep var strm Tz_streamp _, _ = state, strm /* get internal structure */ if file == libc.UintptrFromInt32(0) { return -int32(2) } state = file strm = state + 128 /* check that we're writing and that there's no error */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) || (*Tgz_state)(unsafe.Pointer(state)).Ferr != m_Z_OK || (*Tgz_state)(unsafe.Pointer(state)).Fdirect != 0 { return -int32(2) } /* if no change is requested, then do nothing */ if level == (*Tgz_state)(unsafe.Pointer(state)).Flevel && strategy == (*Tgz_state)(unsafe.Pointer(state)).Fstrategy { return m_Z_OK } /* check for seek request */ if (*Tgz_state)(unsafe.Pointer(state)).Fseek != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 if _gz_zero(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fskip) == -int32(1) { return (*Tgz_state)(unsafe.Pointer(state)).Ferr } } /* change compression parameters for subsequent input */ if (*Tgz_state)(unsafe.Pointer(state)).Fsize != 0 { /* flush previous input with previous parameters before changing */ if (*Tz_stream)(unsafe.Pointer(strm)).Favail_in != 0 && _gz_comp(tls, state, int32(m_Z_BLOCK)) == -int32(1) { return (*Tgz_state)(unsafe.Pointer(state)).Ferr } XdeflateParams(tls, strm, level, strategy) } (*Tgz_state)(unsafe.Pointer(state)).Flevel = level (*Tgz_state)(unsafe.Pointer(state)).Fstrategy = strategy return m_Z_OK } // C documentation // // /* -- see zlib.h -- */ func Xgzclose_w(tls *libc.TLS, file TgzFile) (r int32) { var ret int32 var state Tgz_statep _, _ = ret, state ret = m_Z_OK /* get internal structure */ if file == libc.UintptrFromInt32(0) { return -int32(2) } state = file /* check that we're writing */ if (*Tgz_state)(unsafe.Pointer(state)).Fmode != int32(m_GZ_WRITE) { return -int32(2) } /* check for seek request */ if (*Tgz_state)(unsafe.Pointer(state)).Fseek != 0 { (*Tgz_state)(unsafe.Pointer(state)).Fseek = 0 if _gz_zero(tls, state, (*Tgz_state)(unsafe.Pointer(state)).Fskip) == -int32(1) { ret = (*Tgz_state)(unsafe.Pointer(state)).Ferr } } /* flush, free memory, and close file */ if _gz_comp(tls, state, int32(m_Z_FINISH)) == -int32(1) { ret = (*Tgz_state)(unsafe.Pointer(state)).Ferr } if (*Tgz_state)(unsafe.Pointer(state)).Fsize != 0 { if !((*Tgz_state)(unsafe.Pointer(state)).Fdirect != 0) { XdeflateEnd(tls, state+128) libc.Xfree(tls, (*Tgz_state)(unsafe.Pointer(state)).Fout) } libc.Xfree(tls, (*Tgz_state)(unsafe.Pointer(state)).Fin) } Xgz_error(tls, state, m_Z_OK, libc.UintptrFromInt32(0)) libc.Xfree(tls, (*Tgz_state)(unsafe.Pointer(state)).Fpath) if libc.Xclose(tls, (*Tgz_state)(unsafe.Pointer(state)).Ffd) == -int32(1) { ret = -int32(1) } libc.Xfree(tls, state) return ret } func __ccgo_fp(f interface{}) uintptr { type iface [2]uintptr return (*iface)(unsafe.Pointer(&f))[1] } var x__dist_code = [512]Tuch{ 1: uint8(1), 2: uint8(2), 3: uint8(3), 4: uint8(4), 5: uint8(4), 6: uint8(5), 7: uint8(5), 8: uint8(6), 9: uint8(6), 10: uint8(6), 11: uint8(6), 12: uint8(7), 13: uint8(7), 14: uint8(7), 15: uint8(7), 16: uint8(8), 17: uint8(8), 18: uint8(8), 19: uint8(8), 20: uint8(8), 21: uint8(8), 22: uint8(8), 23: uint8(8), 24: uint8(9), 25: uint8(9), 26: uint8(9), 27: uint8(9), 28: uint8(9), 29: uint8(9), 30: uint8(9), 31: uint8(9), 32: uint8(10), 33: uint8(10), 34: uint8(10), 35: uint8(10), 36: uint8(10), 37: uint8(10), 38: uint8(10), 39: uint8(10), 40: uint8(10), 41: uint8(10), 42: uint8(10), 43: uint8(10), 44: uint8(10), 45: uint8(10), 46: uint8(10), 47: uint8(10), 48: uint8(11), 49: uint8(11), 50: uint8(11), 51: uint8(11), 52: uint8(11), 53: uint8(11), 54: uint8(11), 55: uint8(11), 56: uint8(11), 57: uint8(11), 58: uint8(11), 59: uint8(11), 60: uint8(11), 61: uint8(11), 62: uint8(11), 63: uint8(11), 64: uint8(12), 65: uint8(12), 66: uint8(12), 67: uint8(12), 68: uint8(12), 69: uint8(12), 70: uint8(12), 71: uint8(12), 72: uint8(12), 73: uint8(12), 74: uint8(12), 75: uint8(12), 76: uint8(12), 77: uint8(12), 78: uint8(12), 79: uint8(12), 80: uint8(12), 81: uint8(12), 82: uint8(12), 83: uint8(12), 84: uint8(12), 85: uint8(12), 86: uint8(12), 87: uint8(12), 88: uint8(12), 89: uint8(12), 90: uint8(12), 91: uint8(12), 92: uint8(12), 93: uint8(12), 94: uint8(12), 95: uint8(12), 96: uint8(13), 97: uint8(13), 98: uint8(13), 99: uint8(13), 100: uint8(13), 101: uint8(13), 102: uint8(13), 103: uint8(13), 104: uint8(13), 105: uint8(13), 106: uint8(13), 107: uint8(13), 108: uint8(13), 109: uint8(13), 110: uint8(13), 111: uint8(13), 112: uint8(13), 113: uint8(13), 114: uint8(13), 115: uint8(13), 116: uint8(13), 117: uint8(13), 118: uint8(13), 119: uint8(13), 120: uint8(13), 121: uint8(13), 122: uint8(13), 123: uint8(13), 124: uint8(13), 125: uint8(13), 126: uint8(13), 127: uint8(13), 128: uint8(14), 129: uint8(14), 130: uint8(14), 131: uint8(14), 132: uint8(14), 133: uint8(14), 134: uint8(14), 135: uint8(14), 136: uint8(14), 137: uint8(14), 138: uint8(14), 139: uint8(14), 140: uint8(14), 141: uint8(14), 142: uint8(14), 143: uint8(14), 144: uint8(14), 145: uint8(14), 146: uint8(14), 147: uint8(14), 148: uint8(14), 149: uint8(14), 150: uint8(14), 151: uint8(14), 152: uint8(14), 153: uint8(14), 154: uint8(14), 155: uint8(14), 156: uint8(14), 157: uint8(14), 158: uint8(14), 159: uint8(14), 160: uint8(14), 161: uint8(14), 162: uint8(14), 163: uint8(14), 164: uint8(14), 165: uint8(14), 166: uint8(14), 167: uint8(14), 168: uint8(14), 169: uint8(14), 170: uint8(14), 171: uint8(14), 172: uint8(14), 173: uint8(14), 174: uint8(14), 175: uint8(14), 176: uint8(14), 177: uint8(14), 178: uint8(14), 179: uint8(14), 180: uint8(14), 181: uint8(14), 182: uint8(14), 183: uint8(14), 184: uint8(14), 185: uint8(14), 186: uint8(14), 187: uint8(14), 188: uint8(14), 189: uint8(14), 190: uint8(14), 191: uint8(14), 192: uint8(15), 193: uint8(15), 194: uint8(15), 195: uint8(15), 196: uint8(15), 197: uint8(15), 198: uint8(15), 199: uint8(15), 200: uint8(15), 201: uint8(15), 202: uint8(15), 203: uint8(15), 204: uint8(15), 205: uint8(15), 206: uint8(15), 207: uint8(15), 208: uint8(15), 209: uint8(15), 210: uint8(15), 211: uint8(15), 212: uint8(15), 213: uint8(15), 214: uint8(15), 215: uint8(15), 216: uint8(15), 217: uint8(15), 218: uint8(15), 219: uint8(15), 220: uint8(15), 221: uint8(15), 222: uint8(15), 223: uint8(15), 224: uint8(15), 225: uint8(15), 226: uint8(15), 227: uint8(15), 228: uint8(15), 229: uint8(15), 230: uint8(15), 231: uint8(15), 232: uint8(15), 233: uint8(15), 234: uint8(15), 235: uint8(15), 236: uint8(15), 237: uint8(15), 238: uint8(15), 239: uint8(15), 240: uint8(15), 241: uint8(15), 242: uint8(15), 243: uint8(15), 244: uint8(15), 245: uint8(15), 246: uint8(15), 247: uint8(15), 248: uint8(15), 249: uint8(15), 250: uint8(15), 251: uint8(15), 252: uint8(15), 253: uint8(15), 254: uint8(15), 255: uint8(15), 258: uint8(16), 259: uint8(17), 260: uint8(18), 261: uint8(18), 262: uint8(19), 263: uint8(19), 264: uint8(20), 265: uint8(20), 266: uint8(20), 267: uint8(20), 268: uint8(21), 269: uint8(21), 270: uint8(21), 271: uint8(21), 272: uint8(22), 273: uint8(22), 274: uint8(22), 275: uint8(22), 276: uint8(22), 277: uint8(22), 278: uint8(22), 279: uint8(22), 280: uint8(23), 281: uint8(23), 282: uint8(23), 283: uint8(23), 284: uint8(23), 285: uint8(23), 286: uint8(23), 287: uint8(23), 288: uint8(24), 289: uint8(24), 290: uint8(24), 291: uint8(24), 292: uint8(24), 293: uint8(24), 294: uint8(24), 295: uint8(24), 296: uint8(24), 297: uint8(24), 298: uint8(24), 299: uint8(24), 300: uint8(24), 301: uint8(24), 302: uint8(24), 303: uint8(24), 304: uint8(25), 305: uint8(25), 306: uint8(25), 307: uint8(25), 308: uint8(25), 309: uint8(25), 310: uint8(25), 311: uint8(25), 312: uint8(25), 313: uint8(25), 314: uint8(25), 315: uint8(25), 316: uint8(25), 317: uint8(25), 318: uint8(25), 319: uint8(25), 320: uint8(26), 321: uint8(26), 322: uint8(26), 323: uint8(26), 324: uint8(26), 325: uint8(26), 326: uint8(26), 327: uint8(26), 328: uint8(26), 329: uint8(26), 330: uint8(26), 331: uint8(26), 332: uint8(26), 333: uint8(26), 334: uint8(26), 335: uint8(26), 336: uint8(26), 337: uint8(26), 338: uint8(26), 339: uint8(26), 340: uint8(26), 341: uint8(26), 342: uint8(26), 343: uint8(26), 344: uint8(26), 345: uint8(26), 346: uint8(26), 347: uint8(26), 348: uint8(26), 349: uint8(26), 350: uint8(26), 351: uint8(26), 352: uint8(27), 353: uint8(27), 354: uint8(27), 355: uint8(27), 356: uint8(27), 357: uint8(27), 358: uint8(27), 359: uint8(27), 360: uint8(27), 361: uint8(27), 362: uint8(27), 363: uint8(27), 364: uint8(27), 365: uint8(27), 366: uint8(27), 367: uint8(27), 368: uint8(27), 369: uint8(27), 370: uint8(27), 371: uint8(27), 372: uint8(27), 373: uint8(27), 374: uint8(27), 375: uint8(27), 376: uint8(27), 377: uint8(27), 378: uint8(27), 379: uint8(27), 380: uint8(27), 381: uint8(27), 382: uint8(27), 383: uint8(27), 384: uint8(28), 385: uint8(28), 386: uint8(28), 387: uint8(28), 388: uint8(28), 389: uint8(28), 390: uint8(28), 391: uint8(28), 392: uint8(28), 393: uint8(28), 394: uint8(28), 395: uint8(28), 396: uint8(28), 397: uint8(28), 398: uint8(28), 399: uint8(28), 400: uint8(28), 401: uint8(28), 402: uint8(28), 403: uint8(28), 404: uint8(28), 405: uint8(28), 406: uint8(28), 407: uint8(28), 408: uint8(28), 409: uint8(28), 410: uint8(28), 411: uint8(28), 412: uint8(28), 413: uint8(28), 414: uint8(28), 415: uint8(28), 416: uint8(28), 417: uint8(28), 418: uint8(28), 419: uint8(28), 420: uint8(28), 421: uint8(28), 422: uint8(28), 423: uint8(28), 424: uint8(28), 425: uint8(28), 426: uint8(28), 427: uint8(28), 428: uint8(28), 429: uint8(28), 430: uint8(28), 431: uint8(28), 432: uint8(28), 433: uint8(28), 434: uint8(28), 435: uint8(28), 436: uint8(28), 437: uint8(28), 438: uint8(28), 439: uint8(28), 440: uint8(28), 441: uint8(28), 442: uint8(28), 443: uint8(28), 444: uint8(28), 445: uint8(28), 446: uint8(28), 447: uint8(28), 448: uint8(29), 449: uint8(29), 450: uint8(29), 451: uint8(29), 452: uint8(29), 453: uint8(29), 454: uint8(29), 455: uint8(29), 456: uint8(29), 457: uint8(29), 458: uint8(29), 459: uint8(29), 460: uint8(29), 461: uint8(29), 462: uint8(29), 463: uint8(29), 464: uint8(29), 465: uint8(29), 466: uint8(29), 467: uint8(29), 468: uint8(29), 469: uint8(29), 470: uint8(29), 471: uint8(29), 472: uint8(29), 473: uint8(29), 474: uint8(29), 475: uint8(29), 476: uint8(29), 477: uint8(29), 478: uint8(29), 479: uint8(29), 480: uint8(29), 481: uint8(29), 482: uint8(29), 483: uint8(29), 484: uint8(29), 485: uint8(29), 486: uint8(29), 487: uint8(29), 488: uint8(29), 489: uint8(29), 490: uint8(29), 491: uint8(29), 492: uint8(29), 493: uint8(29), 494: uint8(29), 495: uint8(29), 496: uint8(29), 497: uint8(29), 498: uint8(29), 499: uint8(29), 500: uint8(29), 501: uint8(29), 502: uint8(29), 503: uint8(29), 504: uint8(29), 505: uint8(29), 506: uint8(29), 507: uint8(29), 508: uint8(29), 509: uint8(29), 510: uint8(29), 511: uint8(29), } var x__length_code = [256]Tuch{ 1: uint8(1), 2: uint8(2), 3: uint8(3), 4: uint8(4), 5: uint8(5), 6: uint8(6), 7: uint8(7), 8: uint8(8), 9: uint8(8), 10: uint8(9), 11: uint8(9), 12: uint8(10), 13: uint8(10), 14: uint8(11), 15: uint8(11), 16: uint8(12), 17: uint8(12), 18: uint8(12), 19: uint8(12), 20: uint8(13), 21: uint8(13), 22: uint8(13), 23: uint8(13), 24: uint8(14), 25: uint8(14), 26: uint8(14), 27: uint8(14), 28: uint8(15), 29: uint8(15), 30: uint8(15), 31: uint8(15), 32: uint8(16), 33: uint8(16), 34: uint8(16), 35: uint8(16), 36: uint8(16), 37: uint8(16), 38: uint8(16), 39: uint8(16), 40: uint8(17), 41: uint8(17), 42: uint8(17), 43: uint8(17), 44: uint8(17), 45: uint8(17), 46: uint8(17), 47: uint8(17), 48: uint8(18), 49: uint8(18), 50: uint8(18), 51: uint8(18), 52: uint8(18), 53: uint8(18), 54: uint8(18), 55: uint8(18), 56: uint8(19), 57: uint8(19), 58: uint8(19), 59: uint8(19), 60: uint8(19), 61: uint8(19), 62: uint8(19), 63: uint8(19), 64: uint8(20), 65: uint8(20), 66: uint8(20), 67: uint8(20), 68: uint8(20), 69: uint8(20), 70: uint8(20), 71: uint8(20), 72: uint8(20), 73: uint8(20), 74: uint8(20), 75: uint8(20), 76: uint8(20), 77: uint8(20), 78: uint8(20), 79: uint8(20), 80: uint8(21), 81: uint8(21), 82: uint8(21), 83: uint8(21), 84: uint8(21), 85: uint8(21), 86: uint8(21), 87: uint8(21), 88: uint8(21), 89: uint8(21), 90: uint8(21), 91: uint8(21), 92: uint8(21), 93: uint8(21), 94: uint8(21), 95: uint8(21), 96: uint8(22), 97: uint8(22), 98: uint8(22), 99: uint8(22), 100: uint8(22), 101: uint8(22), 102: uint8(22), 103: uint8(22), 104: uint8(22), 105: uint8(22), 106: uint8(22), 107: uint8(22), 108: uint8(22), 109: uint8(22), 110: uint8(22), 111: uint8(22), 112: uint8(23), 113: uint8(23), 114: uint8(23), 115: uint8(23), 116: uint8(23), 117: uint8(23), 118: uint8(23), 119: uint8(23), 120: uint8(23), 121: uint8(23), 122: uint8(23), 123: uint8(23), 124: uint8(23), 125: uint8(23), 126: uint8(23), 127: uint8(23), 128: uint8(24), 129: uint8(24), 130: uint8(24), 131: uint8(24), 132: uint8(24), 133: uint8(24), 134: uint8(24), 135: uint8(24), 136: uint8(24), 137: uint8(24), 138: uint8(24), 139: uint8(24), 140: uint8(24), 141: uint8(24), 142: uint8(24), 143: uint8(24), 144: uint8(24), 145: uint8(24), 146: uint8(24), 147: uint8(24), 148: uint8(24), 149: uint8(24), 150: uint8(24), 151: uint8(24), 152: uint8(24), 153: uint8(24), 154: uint8(24), 155: uint8(24), 156: uint8(24), 157: uint8(24), 158: uint8(24), 159: uint8(24), 160: uint8(25), 161: uint8(25), 162: uint8(25), 163: uint8(25), 164: uint8(25), 165: uint8(25), 166: uint8(25), 167: uint8(25), 168: uint8(25), 169: uint8(25), 170: uint8(25), 171: uint8(25), 172: uint8(25), 173: uint8(25), 174: uint8(25), 175: uint8(25), 176: uint8(25), 177: uint8(25), 178: uint8(25), 179: uint8(25), 180: uint8(25), 181: uint8(25), 182: uint8(25), 183: uint8(25), 184: uint8(25), 185: uint8(25), 186: uint8(25), 187: uint8(25), 188: uint8(25), 189: uint8(25), 190: uint8(25), 191: uint8(25), 192: uint8(26), 193: uint8(26), 194: uint8(26), 195: uint8(26), 196: uint8(26), 197: uint8(26), 198: uint8(26), 199: uint8(26), 200: uint8(26), 201: uint8(26), 202: uint8(26), 203: uint8(26), 204: uint8(26), 205: uint8(26), 206: uint8(26), 207: uint8(26), 208: uint8(26), 209: uint8(26), 210: uint8(26), 211: uint8(26), 212: uint8(26), 213: uint8(26), 214: uint8(26), 215: uint8(26), 216: uint8(26), 217: uint8(26), 218: uint8(26), 219: uint8(26), 220: uint8(26), 221: uint8(26), 222: uint8(26), 223: uint8(26), 224: uint8(27), 225: uint8(27), 226: uint8(27), 227: uint8(27), 228: uint8(27), 229: uint8(27), 230: uint8(27), 231: uint8(27), 232: uint8(27), 233: uint8(27), 234: uint8(27), 235: uint8(27), 236: uint8(27), 237: uint8(27), 238: uint8(27), 239: uint8(27), 240: uint8(27), 241: uint8(27), 242: uint8(27), 243: uint8(27), 244: uint8(27), 245: uint8(27), 246: uint8(27), 247: uint8(27), 248: uint8(27), 249: uint8(27), 250: uint8(27), 251: uint8(27), 252: uint8(27), 253: uint8(27), 254: uint8(27), 255: uint8(28), } var Xdeflate_copyright = [68]int8{' ', 'd', 'e', 'f', 'l', 'a', 't', 'e', ' ', '1', '.', '3', '.', '1', ' ', 'C', 'o', 'p', 'y', 'r', 'i', 'g', 'h', 't', ' ', '1', '9', '9', '5', '-', '2', '0', '2', '4', ' ', 'J', 'e', 'a', 'n', '-', 'l', 'o', 'u', 'p', ' ', 'G', 'a', 'i', 'l', 'l', 'y', ' ', 'a', 'n', 'd', ' ', 'M', 'a', 'r', 'k', ' ', 'A', 'd', 'l', 'e', 'r', ' '} var Xinflate_copyright = [47]int8{' ', 'i', 'n', 'f', 'l', 'a', 't', 'e', ' ', '1', '.', '3', '.', '1', ' ', 'C', 'o', 'p', 'y', 'r', 'i', 'g', 'h', 't', ' ', '1', '9', '9', '5', '-', '2', '0', '2', '4', ' ', 'M', 'a', 'r', 'k', ' ', 'A', 'd', 'l', 'e', 'r', ' '} var Xz_errmsg = [10]uintptr{ 0: __ccgo_ts + 467, 1: __ccgo_ts + 483, 2: __ccgo_ts + 494, 3: __ccgo_ts + 495, 4: __ccgo_ts + 506, 5: __ccgo_ts + 519, 6: __ccgo_ts + 530, 7: __ccgo_ts + 550, 8: __ccgo_ts + 563, 9: __ccgo_ts + 494, } var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data var __ccgo_ts1 = "1.3.1\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\x00need dictionary\x00stream end\x00\x00file error\x00stream error\x00data error\x00insufficient memory\x00buffer error\x00incompatible version\x00%s\x00\x00out of memory\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\x00string length does not fit in int\x00"